Open jirihnidek opened 8 years ago
Example of "extruded" B-Spline surface:
Example of mesh (GMSH):
The code is part of bapprox. Some screenshots:
Surface can be cropped:
Seems good, what about cropping by ~1000 side polygon. Timing appreciated.
OCC boolean operations are not realible. :-1: When area is not convex or terrain has high resolution, then it produce strange results:
It seams that this code can fix the problem:
my_lib = OCC.BRepLib.breplib()
my_lib.OrientClosedSolid(solid)
Good hint was from this forum post: http://www.opencascade.com/content/problem-surface-normal-0
I did some measurement an it seams that boolean operations between volume objects have linear dependence. The volume of terrain volume was the same for all measurements. The number of poles was 15x15. I only increased number of border area points.
Data from measurement:
N | t [s] |
---|---|
6 | 2.05 |
12 | 3.46 |
24 | 7.05 |
48 | 14.89 |
96 | 28.79 |
192 | 51.73 |
384 | 112.55 |
Example of fractal border area (3 iterations - 48 border edges):
It seams that increasing of poles does not have linear dependency (N is number of poles in both directions). The number of border area points was 6 in all cases.
N | t [s] |
---|---|
15 | 1.51 |
30 | 4.00 |
45 | 9.82 |
60 | 15.76 |
BTW: I tested extreme situation, when surface with 60x60 poles was computed and it was cutted using polygon with 384 points/edges. It took 918.22 seconds (15 minutes).
It will be possible to make extruded surface smother using and test using different B-Spline surface for generating volume:
RemoveUKnot(index, new_multiplicity, tolerance)
RemoveVKnot(index, new_multiplicity, tolerance)
When new_multiplicity=0
, then knots (poles) with given index are removed.
Results of benchmark tests: boolean operations between area and surface (not surface extruded to volume) are similar to boolean operations between two volumes.
N | t[s] |
---|---|
6 | 1.05 |
12 | 1.89 |
24 | 4.02 |
48 | 8.08 |
96 | 15.14 |
192 | 32.42 |
384 | 62.59 |