jlopezbi / rhinoUnfolder

unwrap meshes in rhino!
GNU General Public License v3.0
8 stars 2 forks source link

Use bounding-box rectangle for distribute #40

Closed jlopezbi closed 8 years ago

jlopezbi commented 8 years ago

Because edge geometry is lumped under a group, its uncertain how to get only the edge lines for making the boundary polyline. This polyline was being used to check if two islands are intersecting, containing one or the other, or disjoint (not overlapping). However, for the sake of keeping things clean in the code, it makes sense to avoid finding the boundary polyline, which requires some special storage of cut-line geometry, and instead simply add a rectangle based on the bounding box of all of the geometry of the island. Of course the bounding box would be generated from all of the geometry of the island... which might get slow for big islands.. so it might make sense to store geometry from cut-edges (since they are on the perimeter) in a list for quick bounding-box creation (the rhinoscriptsyntax method takes in a list of guids). Another option is to not worry about speed and make a method which gets all the geometry for the island. This would probably iterate through all flatEdges (or flatVerts, flatFaces, if they have representative geometry) and get all the geometry for the group-name associated with that element.

jlopezbi commented 8 years ago

well this is a good idea, and Ill remember it later if ever makes sense. For now not so hard to just get perimeter using lines