Grasshopper

algorithmic modeling for Rhino

Hi fellows,

 

Have a look at the picture below:

Path{4} output two "planar curve" rather than "closed planar curve" as others. Those two planar curves would not generate planar (trimed) surface .These curves are generated by intersection between plans and one closed brep .My question here is : could it be possible to get unclosed curves between plan&closed brep??If this is a bug ,I wish our David could have a look at this and release a fix .Thanks .

Views: 1271

Replies to This Discussion

I am waiting for help! for I lose one floor in my WIP project...    


Hi Alpha, if the open curves have just a tiny gap, you could manually close it puting a line in between the ends and join the two. Or move one of the end points to the other. Maybe you can get away with this...(?). You could also get the open curves control points and create a new closed curve from these. There will be deviation from the original though...
I'm also wondering if this is a bug, and I'm trying to find out when an intersection fails. I haven't come up with a solution with a nurbs curve yet. Hope this helps.

It might be a bug, maybe it's a tolerance issue. If the intersection thinks it's closed within tolerance, but creates a curve that thinks it's not closed within tolerance, this is what you'd expect.

 

If that's true, I have to add code to 'repair' curves that come out of Brep|Plane intersection. Or maybe I have to add a component that closes a curve (sounds like a good idea anyway).

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

In the meantime, you can use the attached script to close curves.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

@Piter

I guess it is of the "tiny gap" or "tolerance" thing .The gap is so tiny that it looks like a bug !?!

 

David's "close curve" code work like a charm ,but I tend to think it is a bug until I could understand that intersection between closed brep and plane may generate unclosed curve ?

 

@David,

thanks !! the close curve code help me out !!
Hi Alpha, David, maybe this little definition is another good option (suits my needs best)
(nm: I noticed I forgot to join the pieces~:)
Attachments:
Hi Pieter ,your solution is one good solution as well !! Maybe David would combine your solution to his code(maybe new compoonnet next release) as  a third option .Great work!!

Closedness (in the platonic sense) is a property useful to mathematicians and philosophers, but not to programmers. A brep is not really ever Closed (capital C), it's only ever closed to within some predetermined tolerance. If the brep has very clean faces that join together well -say, a cube- then the brep is probably closed to within as many digits as is possible in double-precision computing.

 

If however the brep consists of trimmed and freeform faces then there will probably be gaps and fissures when two faces meet. As long as these imperfections are smaller than the document tolerance, we'll treat them as closed. Our meshing algorithm will repair these fissures and our brep display algorithm will only present a single edge curve, where there are in fact two edges very close together. So to all intents and purposes it appears to be a perfectly closed brep and all our commands should treat it that way.

 

To give you an example, imagine creating a boolean difference of a torus and a sphere:

 

This operation should result in a closed brep (and it does), and no matter how much you zoom in on the sharp edge, you'll only ever see a single curve and no gaps in the mesh.

 

But what if I don't use BooleanDifference but instead use Split. Now Rhino has no way of knowing we want the two trimmed edges to line up.

 

And now if I zoom in on the sharp edge, I do get two very different edge curves. (This image is a very large magnification. The distance between the two edges is ~0.0002 mm while the sphere had a radius of 10mm).

 

If I now proceed to join these two surfaces, Rhino will detect that the edges are well within tolerance, and it will treat it (and display it) as a single, closed edge. But that's just display trickery, the underlying brep faces still have the same gap between them.

 

This is why I suspect your Brep|Plane intersection results in an open curve. It's because the real intersection is not closed. I don't know why the closedness-repair-algorithms didn't kick in, but now at least you understand why the bug occurs.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks a lot for this clear explanation David:)
OK, Thanks for this great clarification David ! It helps.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service