Grasshopper

algorithmic modeling for Rhino

hello,

trying to resolve Voronoi on a Brep to make the ends on each of the 6 faces (in this case the Brep is a box) to coincide. Everything works fine if the faces are given one by one (please see the rhino model) , some issue when the Brep is given as a whole. I have been quite careful to keep the hierarchy of the datastructures consistent but I can't figure out why the points extracted from the 2D Voronoi are not evaluated correctly on each of the faces when given the Brep as whole as initial input.

attached definition

thanks



brep voronoi coincident ends.ghx
brep voronoi coincident ends.3dm


Views: 4084

Replies to This Discussion

Hi Gennaro,

Try using the 3d voronoi routine instead:


1. take a bunch of points inside the box
2. calculate the 3d voronoi diagram using dimitrie's or vicente's definiton
3. intersect the resulting faces with the box

Cheers,
JJ
thanks for your feedback Jacek,

to be honest I'm less interested in the production of the pattern itself and more into the matching of the datastructures. I took this as an exercise to work a bit on tree matching without any coding. Having said that, I think the approach you suggest will definitely lead to the coincidence of points on the edges but I reckon the setting of the input points it is not fully controllable. If you are familiar with trees and you fancy taking a look at the definition posted in first post would be great

thanks


thanks
Alright, I understand you now.

See attached definition for comments on the resolved issue with data trees. Tell me whether it's clear enough or not.

(Still, the 2d method won't always give you coincident ends at the edges of the box. It depends on the position of the random points and how far are they from the face edge. If you're interested in investigating this subject a little further let me know.)
Attachments:
great Jasek,

I thought about duplicating the faces but I tried to avoid that because it was looking a bit to cumbersome, the second strategy you suggest is much clever in fact
having said that it would only work with Brep made of planar surfaces, am I right ?

I realised (and it is also quite obvious actually) that the coincidence is not assured just 5 mins after replying to your first answer, maybe jsut thinking on top on my mind one could think about placing the point in a way that his happen but I wouldn't know how now

or another approach would be to match the coordinate of the end points in a way that they conincide, I mean forcing them to coincide after the voronoi is created.....
thanks a lot for your feedback and yes I would be intereted in getting the coincidence

cheers
yes, the simplified solution will work only with planar surfaces.

yes, placing those random points in a special constrained area will do the job - just keep away from the gray circles:

- see attached ghx for details

I wouldn't go for the alternative approach with post-processing the diagram, it's a messy solution...
Attachments:
great stuff Jacek,
I understand now how not to make extra point on the edge,
staying away from the zone of influence of the regions generated by the edge points which I think should not be exactly circular though (in fact sometimes when you go inside a circular region with the test point it is still possible to go further without creating the extra point on the edge contour, espcially for the bigger region) but this is a very good approximation

thanks for the feedback and the interesting conversation
Anytime :)

As for the issue you've mentioned - actually, it's always circles...
...but when the two points lay on different segments (like in the case of the "bigger regions" in the example above) those circles should be constructed in a different way.

I didn't take this into account and that's why you get inconsistent results.

You can either define those specific corner situations separatly or add those 4 corner points to the pointset and the definition will work just fine.
yeah you are right, it always circle actually,
adding the corner points works just fine

best
Jacek,

a post thought on the matching of the datastructures:

the reason why I got stuck is because I thought that when having two trees such as {A;B} and {A;B;C} GH would be able to match the higher hierarchy automatically
like you would do in a for loop when you use the 2nd order branches '(B) of the first tree with 2nd order branches of the second (B) and the particular command (in this case "evaluate") could take an array or list of input enclosed in the third order branch of the second tree (C)

if this is not possibe in any way than can we say that matching of trees implies them to have an identical structure and that this is the only way to make the matching ?

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service