Currently I'm doing some research for a simulation project I am in.
It is devided into a GUI part, that mainly reads STEP geometries and does some preprocessing and a computation part that does the simulation itself. The GUI is using OpenCascade for reading the STEP files, drawing it and so on.
Now I'm trying to find out whether we could use OpenCascade for the computation core as well.
The requirements are that we have an exact 2D geometry (like the b-rep we get from OpenCascade when reading STEP files) and this geometry will be intersected with many (tousands and millions or even more!) paraxial rectangles (lets call them patches).
Most of them (~ more then 90%) lie within geometry so the intersection is trival. The others intersect with the boundary so it will get more complicated.
After the intersection has been done I do not need the exact representation of the resulting types shapes anymore. An approximation is better now so I want to generate one.
The following image trys to explain all this:
I tried to do this with BRepAlgoAPI_Section but it seams to be a little to slow for my purposes.
I think it could be a way faster if there was a algorithm that takes account on the facts that I only need 2D data, that one of the intersection operands is allways a paraxial rectangular and that first checks whether the patch compleatly lies withing the other geometry.
So my question is whether there is some kind of that intersection algorithm in OpenCascade or a way to construct one from the many that are provided?
The second question is whether there is a way to do the approximation of the exact geometry after that intersection (that may has splines, circles, ...) to a simple polygon.
Would be nice if someone could give me some hints!