Grasshopper

algorithmic modeling for Rhino

Hey guys, need your help.

Problem: Need to determine which surfaces are rectangular and which are shaped (trapezoid, parallelogram etc.) within a 1/8" tolerance.

1. Some of these surfaces are non-planar which makes me believe I need to unroll the surfaces first before analyzing. The problem here, is that I haven't had any luck with unroll components orienting the surfaces correctly on the xy.

2. I also cant rely on only measuring angles between vectors (surface edges) because as panels are different sizes this will not give me an accurate reading of the overall shape. (if its a small panel with 91 degreee angle it will not effect the shape much, if its a large panel it could be much different.)

I'm not sure if there's a simple solution to this or not, but its got me stumped, any help would be great. Thanks guys!

Views: 1450

Attachments:

Replies to This Discussion

First get yourself a good unroll component, The one i used you can download here

In this example I only tested two sides of the rectangle, if you want to test all four sides for your tolerance you just have to copy the X and Y test again and change the list items to the other two sides 2,3 and 3,0.Also here is the visual result:

Attachments:

Jesse,

thanks for the fast reply, I was actually taking a very similar approach. My only concern was how the unroll component was orienting the unrolled breps on the xy, seemed like there wasnt any particular rule it followed? But i realize you can unroll a set of points along with your breps so the orientation should no longer be a problem... I don't think.

Thanks again for the work! 

hmm still not sure how this component decides how it orients its geometry when unrolled...

Why does it matter?

it doesnt. just wondering if anyone knew.

Here's the original guy who posted this component. 

http://www.grasshopper3d.com/forum/topics/unroll-surface-and-breps

Hi Justin,

Just spotted that one.

Generally speaking this is extremely easy to do with code: see a 10 minutes work demo example (regarding Brep "classification" matters only).

This could being vastly "expanded" by (a) including every test imaginable [like the max allowed "deviations on edge sizes" due to non 90 degrees angles blah, blah] or by (b) creating "layouts" in XY Plane for fabrication or ... whatever.

PS: Load your file first (no internalized test data).

best, Peter

Attachments:

Peter,

Thanks for the work! Unfortunately I'm not so familiar with code...But your component seems like it has it all figured out, pretty impressive stuff. I have a friend who knows csharp so I may have to have him get involved and explain to me how this thing is thinking. But thanks again I really appreciate the help!

Justin (BTW: it's not a component: double click on it to see why - DON'T change anything)

Well ... it's 10 minutes work that one, so consider it as an introductory demo rather than a full working thingy.

PS: Decompose your Breps (one by one) and exploit the order of points: this is where the money is: some are sequential in some clock/anticlock order ... some are enumerated via the classic row order. This is the only smart (so to speak, he he) thing that this C# does: by using something called DotProduct to investigate directions of vectors out of pairs or points and then "re enumerates" them with a "common" way for all the BrepFaces.

So, in order to orient (layout) the panels in xy space (via PlaneToPlane transformations) you'll need to define the correct plane per BrepFace > tell your friend to take into account that "non unified" enumeration mentioned and the rest are easy-busy (if he knows his onions, that is, he he).

best, Peter

BTW: Added just 2 lines more - concerning ONLY the rectangles (and a challenge, he he) to indicate the vertices enumeration "oddity" on these BrepFaces.

Imagine each "panel" being "the same" with the others as regards the vertices (4 of them) enumeration. This means that for any BrepFace ... a plane defined as:

Plane plane = new Plane (p0,p1,p3);

... should being "oriented" with exact the same way VS the others. 

Click on the bool  toggle (red group) added to see that this is not the case.

Therefor for layouts (where PlaneToPlane transformations are used) the plane "orientation" per panel is rather the most important thing.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service