GH Player not working with blocks!

Hi !
i have some block files and i want to do some scripts in GH and run it in GH Player .
i downloaded Elefront Plugin to deconstract the block so i dont have to explode it.

it’s working nice in grasshopper , and completely fine (as you can see in top of the image) , but when i save the project and run it on GH Player , its not giving me the result ( see down in the image).

can you explain to me what’s the problem here ?

unnamed.gh (8.2 KB)

Hi -

See:

Blocks are not supported natively in Grasshopper.
-wim

1 Like

Hi JP-Mike,

Can you tell us a little more about what you’re trying to achieve? The final outcome, workflow and geometry wise?

Thanks,

Japhy

1 Like

TL;DR: Set it so the Get Geometry input feeds into a GUID Param, then Elefront’s Extended Geometry param. This will reference the block and pass it into the rest of the script.

As @wim explained, Blocks are not native in Grasshopper, but of course Elefront is able to handle them, so if we can find a way to get the block into the script, we have a shot. In this case, the problem is that Grasshopper doesn’t realize it’s referencing a block, because it’s not set up for that. For example, if we have it print out what it thinks it’s operating on, we would expect to see Referenced Blocks:

However when you run this through Grasshopper Player, you get the a different result:

This tells us 3 things:

  • Grasshopper IS reading in the two objects
  • It knows that they are referenced objects
  • It thinks they are Breps (so the Deconstruct Block Elefront component will fail)

This also checks out if you look at the options for the kinds of geometry that the Get Geometry input will accept:

image

Blocks are not listed, because they are not native to Grasshopper.

However, we know it’s properly getting the item in Rhino. So, it’s a bit of a hack, but since you are getting the object, you can get the GUID, then pass that into Elefront’s Extended Geometry parameter which will then convert the Guid into a Referenced Block before passing it into the rest of the script:

That said, I agree with @Japhy that it would be helpful to know what you are trying to do, because this is a bit round-about and there could be better ways to get what you’re after.

1 Like

Thanks for your replies ,
I receive block files , which contain a designs like table or beds legs (as blocks )

sometimes i need to connect or make a bridge (PIPE) between these objects which cross the block in a certain distance then stopped . but the main thing is the pipe need to go inside the block then to be cut
i thought if i can deconstruct the block -select the top face - scale inside - then make it solid - and solid difference from pipe.

this routine makes me bored every time

that’s why I’m thinking of make it a grasshopper script and just give it like a blocks input and entrance points and it will be calculated automatically