Set definition axes?

Hi,

Is there a way to set the axes of a block definition space while keeping the instances transforms unchanged ?

Here is the use-case :

Let’s say a block definition was defined with the object A, which was rotated randomly beforehand.
Then instances were positioned like in B.
Now we would like gumball to align to the instances as if the definition was created with C (axis-aligned).

Of course updating the geometry in the definition to straighten the cylinder would change the careful positioning and rotating we did in B. So I need a function to transform a definition content while applying the inverse transform to all the instances.

Here is the example file for clarity :
example.3dm (66.4 KB)

Hi Felix - you an use GumballRelocate on the block instance.

-Pascal

3 Likes

Thank you @pascal it does makes things easier.
Any way to relocate the gumball for all instances of a definition by any chance ?

Hi Felix - none that I know of.

@felix.mariotto - you can try this - not very elegant, it flashes in screen a lot because turning off redrawing seems to break the routine (can’t assign a gumball, I assume).

AlignBlockInstanceGumball.py (813 Bytes)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

-Pascal

This could be done in Grasshopper with EleFront:

  1. Reference the single block which will be used to define the new block plane.
  2. The Z aligned new block plane will have to be oriented from the initial block plane of the single block to the block plane of the other four blocks. The modified blocks are baked with a temporary block name.
  3. Delete all five initial blocks.
  4. To rename the new blocks you need to bake them again with a new name. Using the bake name feature, the modified blocks will be overwritten.

block_modify_cplane.gh (26.8 KB)