Hello
one way is to measure the distance between many points of the cell faces with the box. If there is a distance quite equal to zero face must touch the box.
To my knowledge Voronoi 3d output cells as Brep, not Mesh.
Hello
it is doable just be using components
Deconstruct the cell (brep but could be mesh faces),
calculate the center, could be another point
Calculate the center distance to the brep (could be a mesh, surface …)
Sort the distance, the lowest will be at index 0
if this distance is less than a threshold say it is OK
Dispatch the cells
Or for more queries (any in fact) get a VF conn tree and check the Face Normals against the global X, Y, Z (as static) vectors. Or (Plan B) get the EF conn tree etc etc.
Given any Brep in the collection this means that there’s one CoM pt and several “outer” BrepFaces (2-3 [case: corners] etc). These (since are planar) define Planes for the Mirror Transform. So you want all the Transformations … or there’s additional criteria desired?
Thank you for your kind response.
Mainly I want to make meshing of a box culvert shape in another software by using data of grasshopper data. In this regard, I want to have all the mirror transformations considering the number of BrepFaces connected to the boundary of the model. Please see the attached file outlining the inner seed points (I1, I2, etc) and their required mirror transformations (O1 (two transformations for corner element), O2, etc.)
But if the Boundary/Donor Object is some sort of Blob (meaning no planar BrepFaces) … a few lines more are required. If time permits (not a given right now) I’ll do a C# that does all that.
Thank you for your kind response. I will study it further, sorry for my very limited knowledge related to Grasshopper.
Your support has been very valuable.
Well … as far I’m concerned this issue of yours is a matter of C# (rather entry level, truth to be said) meaning that you’ll get the solution … but it would be a black box for you (unless you have plans to walk the right walk).
That said the general case (Voronoi Breps out of any donor Brep, most notably a Blop) it would be SLOW (R is a surface modeller after all).
The only light that deals with any imaginable dark tunnels is the coding thing - most notably if you are in the AEC market sector. Start walking the walk right now: in 1-2 years you’ll know what to do and in approx 10 you’ll know what not to do (pretty much anything).
May I have the opportunity to get this C# code identifying all the boundary surfaces?
A “thank you” word may not be sufficient to express my gratitude to you.
Get the solution for a Box (the general case - any Blob - is so SLOW … that I refuse to spend time on that - plus I hate Voronoi 2d/3d things like my sins). By Blob (or any Brep collection in fact) I mean these (spot the Elapsed when using … er … me) :
That said the Planes collection is nullable (case: non planar Vor Breps Faces where centroids should not being mirrored VS the relative Plane) … but then my nerves broke … blah, blah.
BTW: 3 dim paths are used for the mirrored pts (1st is the index of the Brep, 2nd is the index of the Face and 3d is the index of the coincident box Plane). I do hope that you can handle a similar DataTree (can you?).
BTW: This thing is NOT suitable for you: is using solely code meaning that we are talking about 3 C#'s (rnd pts in a Box > 3d Vor Breps > filter [+ your mirrored centroids]) that you can’t change/modify/etc by any means … unless you have plans to walk the right walk.
Really thank you for all the support.
This past couple of weeks, I could learn a lot about Grasshopper, my knowledge is still elementary, however, I believe, I have grown a lot due to your support.
I will surely try to walk on the right path and make sure there is no train on the opposite side of tunnel.