I using RhinoSplitBrepFace() to split.
It cost about 10 min.
I using “Split” command to split the same model.
It only cost about 5 sec.
How can I improve efficiency?
The value of dTol - is it the same as the value of the model absolute tolerance when you run the Split command? If dTol << document tolerance (more strict), the split operation takes longer.
I ran your code on your file and it took pretty much exactly the same amount of time as the Rhino Split command. About 25 sec in a debug build. I was using the V6 WIP. Were you doing this in V5?
I seem to remember a problem in V5 like this that was fixed in the past year or so. I don’t remember whether the fix made it into the V5 code, though. I don’t have V5 code on this computer but will check as soon as I can get on a machine with V5.
@dale I’m not sure I can do this in the next couple days. If you get to this before I do, I think the problem was that CPA.SplitAtIntersections( *srf, tolerance ); was inside the for loop rather than outside in RhinoSplitBrepFace()
The feature is only in Rhino5.
Have any other solution to fix the problem (or pass around) in Rhino5?
Why the “Split” command has no performance problem in Rhino5?
Can I using the functions or procedures (used in “Split” command) to fix performance problem in Rhino5?
Thanks for your help.
With the sample model you originally posted, can you provide me a model of what you are looking to achieve. Some of the model’s curve are not closed, so its not clear to me what you want or expect…
If you have a planer surface and you want to quickly punch a bunch of holes in it, then ON_Brep::NewPlanarFaceLoop can be quite useful. If the ‘hole’ curve are closed then you will need to add them one at a time.
Thanks for your sample code.
It works.
I want to split complex case(not only single closed loop).
ON_Brep::NewPlanarFaceLoop can not split complex case.
I will try running “Split” command by scrip.