Brep GetBoundingBox


My plugin is performing quite a lot of operations of trimming and getboundingbox, however this is actually making plugin run very slow. Is there a way to make those brep operations being performed faster?

Hi Karol,

You haven’t provide much details as to what you are trying to do and why. We’ll likely need more details to be helpful.

– Dale

Hi Karol,

Shot from the hip: how about increasing the tolerance, it can have quite a big impact on runtime of intersection operations. If you are only after the BBOX size and tolerance can be less tight it might be an option to consider.

Also it might be that instead of trimming you can get away with only finding intersection curves or projected/pulled curves and get the bbox of those new edgecurves-to be, instead of also performing and applying the trimming on the brep.


I’m performing more advanced hydrostatics, however simple values like length of waterline or drought is taken from bounding box of immersed volume. So eventually I end up with volume that is a representation of an underwater part of hull. The most time consuming operation is creating bounding box around 2200 ms for my test model, then brep split around 600 ms. How to cut down this results?

One solution could be to extract mesh from brep, and use it instead for calculations, however I haven’t done any reliable tests so far Maybe there is anything better?

Without samples models and/or sample code, we can only speculate what is going on.

But in many cases, calculating the tight bounding box of a Brep will for the object to be meshed, as accurate bounding boxes are calculated from a Brep’s mesh. On a complex Brep, this can be time consuming.

ON a complex Brep, trimming can also be time consuming. So can joining up the pieces left over from the split operation. And of course, a new Brep will require a new display mesh.