"Object" information lost after transformation in Grasshopper

Hi. My goal is to create blocks using Grasshopper. I understand that parametrically creatred block definition has always its origin at 0, 0, 0. So I transform all objects accordinly to the world origin, create a block definition and then make an block instance with inverse transformation.

Easy.

But here is the problem: “Transform” operation (as well as “Orient” and probably other components) wipe out all “Object” related parameters (everything that is assigned with “Model Object” component). As far as I understand, this is due to the character of the transform operation - it just doesn’t support “Object” parameters. So it only works with geometry.

My workaround: Get all “Model Object” information before the transformation, transform, apply “Model Object” again (re-assing) and then create the desired block with origin as a base point.

Is there some better convinient way to achieve my goal?

Maybe consider attaching an example file ?

In most situations you can plug the geometry into a model object G input…

In your case, you would add a model object component after the merge. Add a second model object component after the transformation…

Doing this, you replace the geometry but keep the attributes.

2 Likes

This looks promising! Didn’t know about that feature. However it could be tricky when assigning Object attributes and transforming (before the final block definition) mismatches the data tree logic (e.g. assign object attributes, reorder branches somehow for easier manipulation, transform using different tree structure). So I have to keep track of data tree changes in order to re-assign attributes correctly. But okay, I could probably deal with that :mechanical_arm::robot::smiley:

1 Like

If you need help with this, try to break down a situation into an example of a manageable size and share it here.