Grasshopper

algorithmic modeling for Rhino

Possible to bake geometry and keep object print widths?

Apologies if this questions is very basic, but recently I've noticed that when baking geometry, any object print widths that are not default width get set to the line thickness of the layer the geometry is baked in. How do I go about avoiding this or what settings do I need to fix such that if I have a geometry with varying object print widths for the lines, all of these stay the same even when I bake a transformation of the same geometry?

UPDATE:

Based on some testing, I'm most likely not using the right event commands so I'll do some more research into what other options there are aside from using external Bake plug-ins.

Views: 999

Replies to This Discussion

Bake is pretty basic compared to Elefront's component, maybe this can help?  

http://www.food4rhino.com/app/elefront

Hmm, I'm trying to achieve this without using any other components, just by using Bake. Is there a way to do this by just changing the settings or perhaps Python scripting? 

To better illustrate what I mean, the geometry on the left has two lines with non-default object print widths. The one on the right is the same geometry after a transformation that was baked by a custom component. Is the loss of the object print width data due to settings or do I need to script to solve this?

data like print width, color, etc, is *not* stored in the geometry that grasshopper has access to - it's stored in the object's Attributes. Each object in Rhino contains both a "Geometry" and an "Attributes" but as soon as you bring the object into Rhino you are really only dealing with the Geometry part. You will need to use a plug-in, like Human or Elefront, to bake geometry with attributes specified. It is also possible to script in python:

import Rhino

RhinoDocument = Rhino.RhinoDoc.ActiveDoc
attributes = RhinoDocument.CreateDefaultAttributes()
attributes.PlotWeightSource = Rhino.DocObjects.ObjectPlotWeightSource.PlotWeightFromObject
attributes.PlotWeight = 20
RhinoDocument.Objects.Add(x,attributes)

*as soon as you bring the object into Grasshopper

How would I go about adding this into the Bake event? I've tried the following script in the test file, but there doesn't seem to be any effect on the baking of the attributes.

Is this a problem with the function script or rather, the way I add the bakeEvent function to the Rhino event?

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service