Splitting a face using 3d trimming curves unreliable


#1

I am trying to split a face using a number of 3d trimming curves. However, the Split function in RhinoCommon as well as the split command in Rhino seems to be really unreliable in determining if the curve interesects the surface or not.

I have tried generating the curves by interpolating them on the surface as well as pulling them to the surface. I also tried extending the curves along the surface to see if that helps, but i can not find a reliable solution to splitting the face into any number of pieces. It also seems to be dependent on the order of splitting. I tried splitting with only some of the curves, and then splitting with the rest, and that provided different results although still nothing reliable.

Does anyone know of some method to ensure that the face can be split by the trimming curves?


(Dale Fugier) #2

Can you post some sample geometry, along with some sample source code that you cannot make work?

Thanks!


#3

The source code would be a bit too large to show you here, but i can demonstrate it without. See the following file:

splitfailexample.3dm(131.1 KB)

Simply use the Split command on the surface with all the curves as splitting curves. The splitting fails in two places.


(Dale Fugier) #4

Just curious, where did the surface come from. Did you import it or did you create it in Rhino. If you created it, how so?


#5

The surface in the file was created in Rhino by manipulating a simple grid of control points. I have experienced the issue with a wide variety of surfaces, both ones that are created in Rhino and ones that are imported.


(Dale Fugier) #6

This Brep has sloppy trims or edges. If it were made in Rhino, I’d like instruction on how to create this so we can fix the sloppiness.

I was able to split this by first duplicating the edge curves (DupEdge) and then untrimming the surface (Untrim). I then split the surface from the duplicate edges and then split the sub-surface by your grid of curves. You might be able to skip all these steps using the RebuildEdges command.


#7

Interesting. I did succeed in splitting it after rebuilding the edges of the surface. I will have to check if this was the problem with all the surfaces i have experienced this issue with.

I can assure that the surface was created in Rhino. I didn’t create it myself but I just talked to the person who did, and he is prette sure that he split it from a viewport such as the front view, with a planar polyline curve behind the surface. I hope this can help you in identifying the issue.

I am curious, how did you tell that the edges were sloppy?


(Dale Fugier) #8

Debugging with debug Rhino.exe should give your more information in Visual Studio’s output window.


#9

Where can i find a debug executable? I am using RhinoCommon.


(Dale Fugier) #10

Download the Rhino 5 C++ SDK.

http://www.rhino3d.com/download/rhino-sdk/5.0/commercial