I was running some General Fuse Algorithm (henceforth simply "fuse") operations involving shapes with BSpline surfaces (henceforth "BSpline boxes"), and I observed the following peculiar results.
- The fuse between a BSpline box and a regular box (with 6 flat faces) results in a regular box plus parts of the BSpline box that are inside the regular box. The rest of the BSpline box disappears.
- The fuse between two BSpline boxes results only in one BSpline box which is slightly deformed from the original inputs.
Here are a little bit more details on the tests.
1. The BSpline box is created using the following steps. (Please also see the attached CreateBSplineBox.cpp)
- Create the top and bottom surfaces using GeomAPI_PointsToBSplineSurface
- Convert these surfaces into faces using BRepBuilderAPI_MakeFace
- Get the wires of these faces using TopExp_Explorer
- Identify the vertices of the wires
- Create vertical edges connecting vertices at the top and bottom
- Create vertical wires, and subsequently faces
- Add the top surface, the bottom surface, and all the vertical faces into a shell
- Add this shell into a solid, and return it
2. Perform the fuse using BOPAlgo_Builder. (fuse-snippet.cpp)
In this snippet, one box's corner is at (0.8,0.8,0.8), and the other at (1,1,1). Both have the size of 2x2x2 units.
The attached images show the resulting shapes, visualised using CAD Assistant:
- BSpline-and-regular.png --> The result of fusing a BSpline box and a regular box
- two-BSplines-boxes.png --> The result of fusing two BSpline boxes
My expectation is the results should resemble the fuse results between two regular boxes. That is, the overlapping area inside both boxes is identified, while parts of the shapes outside this overlap are preserved. However, apparently I didn't get such results. May I just verify if these are intentional, or if I made a mistake somewhere?
I am using Open CASCADE 7.1.0 (64 bit), Visual Studio 2017, and Windows 8.1.
Thank you in advance for your help.