Having issues with a solid difference

Hello, I would like to create a body guard made with two pieces :

  • first a stone wall (represented by a brep)
  • on top of it a classical metallic bodyguard (brep and closed trimmed surface)

I managed to create both as I wish , but the metallic bodyguard is inside the wall sometimes so I would like to do a soliddifference with both my pieces in order to delete the metallic bodyguard inside the stone but I can’t figure it out
I thought about flipping the matrix of my metallic bodyguard but this doesn’t work , I would really appreciate some help here…

I attached a rhino file and my grasshopper scriptBodyguard.3dm (339.1 KB) RambardeMetal_MaisonEgypte.gh (20.4 KB)

Please rename this thread because it’s not immediately obvious that Flip Matrix has anything to do with it. Also, I don’t know what “bodyguard” means in this context?

Which of your two large groups should we look at? These labels mean nothing to me:


P.S. Instead of Solid Difference, why not create the railings on top of the walls?

  • In the Pipe component that makes the vertical tubes (balusters), the ‘Caps’ input is set to ‘Flat’ which makes them ‘Closed Breps’.
  • The input to Solid Union must be flattened to join the balusters with the top and bottom flat extrusions.
  • The output of Move must be grafted to match the Scale NU output (walls).

RambardeMetal_MaisonEgypte_2021Jan9a.gh (15.6 KB)

Nothing whatsoever to do with Flip Matrix.

This is a significantly different approach that doesn’t use Solid Union or Solid Difference.

RambardeMetal_MaisonEgypte_2021Jan9b.gh (19.5 KB)

The top rail is moved separately, the bottom rail is ignored because it’s buried inside the short walls.

Thank you for your help, actually just flattening the input to the SOLID UNION solved my problem !

I don’t think so. The uncapped pipes are not closed breps, it’s quite slow, and your bottom rail is lost.

In case you want to learn more from this… I added bottom rails on the sloping tops of the walls and slightly shortened the guide curve before dividing it to get the baluster points so the first and last ones don’t go past the rails and walls.

RambardeMetal_MaisonEgypte_2021Jan9c.gh (37.0 KB)