I have been slowly learning how to do some things with OpenCASCADE, but it is still a large library and I have difficulty finding how to do things properly.
Currently, I can read STEP files, and explore the different shapes, using a STEPCAFControl_Reader.
What I really need (and have trouble figuring out), is to take the contents of a STEP file, and "convert" it to bezier or bspline patches.
Ideally, I would love to simply generate an array of patches for a given compound or other shape types.
When I look at the planes, cylinders, ... (i.e. types of TopAbs_FACE), they are not cut/trimmed, but it is crucial for me that the patches from the needed conversion incorporate all of this.
As a super simple example, I created a plate with a hole in FreeCAD and exported to STEP (see simpleObjectInFreeCAD.png).
When I read this file, the large faces naturally have no hole, since they are "just" Geom_Planes.
I would like to have a way of splitting the entire thing into patches. Even if the face is just a quad. For example, I imagine my simple example might be split as my expert drawing skills indicate in the attached examplePatches.png, although the way surfaces are split is not very important to me right now.
What is important, is that I can get Bezier/BSpline surfaces, and not polygonal meshes.
I have tried a number of things, such as GeomConvert::SurfaceToBSplineSurface(), BRepBuilderAPI_NurbsConvert, but I keep running into problems (plenty crashes).
Is there a good approach for this? Let's say, I have a Handle(TopoDS_Shape), which is a TopAbs_COMPOUND.