Is there a way to pause meshing in RhinoCommon?

I was cutting lots of shapes out of another shape and the boolean difference was failing.

So…

I cut out each shape in a loop and used a try catch block to catch failures and added them to a reject list. That way I could see what was working and what wasn’t.

The problem is that this was really slow.

I suspect that this was due to mesh building. The more holes I cut the more complex the geometry that I was puncturing so meshing gets slower and slower.

I’d like to be able to pause meshing then cut all my holes then mesh once when all the successful holes have been cut.

Is there a way to do this in RhinoCommon?

Hi @jmcauley,

if you’re doing the boolean operations with “virtual” geometries, meshing should not be performed unless you add the results to the document and the results are visible in a viewport which requires shading. If you’re adding multiple objects to the doc and want to prevent meshing during that process, you could disable redraw until all objects have been added. Once you enable redraw, meshing will happen.

Does that help ?

_
c.

Good point about virtual geometries. I can’t remember if I had preview enabled.

Now I want to see if I can toggle a component’s preview status from within the component. I bet i could come up with some use for that. :slight_smile:

I see RhinoView.EnableDrawing, and it’s a static so its effect must be global .

Thanks, you have given me stuff to think about.