
Fri, 03/16/2012 - 14:46
BRepMesh_IncrementalMesh runs nearly endlessly for a surface created by BRepPrimAPI_MakeRevol.
Test case:
polyline l 1e-6 0 -5 0 0 0
revol r l 0 0 0 0 0 1 360
incmesh r 1
If I dump r before calling incmesh it gives:
...
-------
Dump of 2 Curves
-------
1 : Circle
Center :0, 0, -5
Axis :0, 0, 1
XAxis :1, 0, -0
YAxis :-0, 1, 0
Radius :1e-006
2 : Line
Origin :1e-006, 0, -5
Axis :-1.99999999999996e-007, 0, 0.99999999999998
-------
Dump of 1 surfaces
-------
1 : CylindricalSurface
Origin :0, 0, -5
Axis :0, 0, 1
XAxis :1, 0, -0
YAxis :-0, 1, 0
Radius :1e-006
It seems the cylindrical surface is not correctly defined, having only two curves.
Actually, it should rather be a cone.
If I change the polyline to
polyline l 1e-5 0 -5 0 0 0
the revolution creates a cone and the mesh problem does not occur.
So, it seems to be a bug in BRepPrimAPI_MakeRevol.
I know, it's an extreme case, but it shouldn't be a program blocker.
Regards,
Timo
Fri, 03/16/2012 - 18:07
Dear Timo,
I would like to inform you that the posted problem has been checked and partly reproduced.
Time of IncrementalMesh work is less than 2 minutes (~ 1 min 45 sec). So, it can't be considered as "endlessly".
Concerning creation of cylindrical surface for the fist case (1e-006) it is not a bug.
It is up to the algorithm to choose the type of creating surface depending on input parameters.
You can consider it as limitation of the algorithm in extreme case.
Regards
Fri, 03/16/2012 - 18:47
OK, it's not endless, but it takes a long time for a small surface.
Please, look at the dump of the first case (cylindrical surface). I thought it is not correctly defined, because it has only 1 circle and 1 line, but normally a cylinder should have 2 circles and 1 line.
This is the case, when I define the polyline as follows:
polyline l 1e-6 0 -5 1e-6 0 0
1 : Circle
Center :0, 0, -5
Axis :0, 0, 1
XAxis :1, 0, -0
YAxis :-0, 1, 0
Radius :1e-006
2 : Circle
Center :0, 0, 0
Axis :0, 0, 1
XAxis :1, 0, -0
YAxis :-0, 1, 0
Radius :1e-006
3 : Line
Origin :1e-006, 0, -5
Axis :0, 0, 1
I thought that maybe the meshing takes so long because the cylinder is not correctly defined, but maybe I'm wrong. In the other cases, meshing is very quick.
Regards,
Timo