[BugReport] triangulation of BRepPrimAPI_MakeRevol fails under some circumstances

hi there,

triangulation of BRepPrimAPI_MakeRevol fails under some circumstances.
reproduceable in 6.3 and 6.5 versions
bug reproduction in pseudocode:

(1) revol a Face: point of gp_ax1 has SAME coordinates as a point in the profile for revolution

p1 gp_Pnt(0,10,0)
p2 gp_Pnt(0,10,10)
p3 gp_Pnt(0,0,-10)
dir1 gp_Dir(0,0,1)

ax1 gp_Ax1(p1,dir1)

v1 BRepPrimAPI_MakeVertex(p1)
v2 BRepPrimAPI_MakeVertex(p2)
v3 BRepPrimAPI_MakeVertex(p3)

e1 BRepPrimAPI_MakeEdge(v1,v2)
e2 BRepPrimAPI_MakeEdge(v2,v3)
e3 BRepPrimAPI_MakeEdge(v3,v1)

w1 BRepPrimAPI_MakeWire(e1,e2,e3)

f1 BRepPrimAPI_MakeFace(w1)

rev1 BRepPrimAPI_Makerevol(f1,ax1,180°) #i know its in rads but for readability

=> front and back faces are not created, face of revolution looks weird

(2) revol a Face: point of gp_ax1 has OTHER coordinates as a point in the profile for revolution

p1 gp_Pnt(0,10,0)
p2 gp_Pnt(0,10,10)
p3 gp_Pnt(0,5,5)

p4 gp_Pnt(0,0,-10)
dir1 gp_Dir(0,0,1)

ax1 gp_Ax1(p4,dir1)

v1 BRepPrimAPI_MakeVertex(p1)
v2 BRepPrimAPI_MakeVertex(p2)
v3 BRepPrimAPI_MakeVertex(p3)

e1 BRepPrimAPI_MakeEdge(v1,v2)
e2 BRepPrimAPI_MakeEdge(v2,v3)
e3 BRepPrimAPI_MakeEdge(v3,v1)

w1 BRepPrimAPI_MakeWire(e1,e2,e3)

f1 BRepPrimAPI_MakeFace(w1)

rev1 BRepPrimAPI_Makerevol(f1,ax1,180°) #i know its in rads but for readability

=> front and back faces are not created

(3) revol a Geom_Interpolate: point of gp_ax1 has same coordinates as a point in the profile for revolution

p1 gp_Pnt(0,0,0)
p2 gp_Pnt(5,7,0)
p3 gp_Pnt(10,10,0)
dir1 gp_Dir(0,1,0)

ax1 gp_Ax1(p1,dir1)

harray TColgp_HArray1OfPnt(1,3)
harray->setValue(1,p1)
harray->setValue(2,p2)
harray->setValue(3,p3)

spline GeomAPI_Interpolate(harray ,false,10E-7)
spline->perform
Geom_BSplineCurve s = repSpline.Curve();

e1 BRepPrimAPI_MakeEdge(s)

rev1 BRepPrimAPI_Makerevol(e1,ax1,180°) #i know its in rads but for readability

=> no face at all, only edge created

Forum supervisor's picture

Dear Jens,
I would like to inform you that the posted problem has been checked and partly reproduced. We confirm the existence of a triangulation problem in the resulting shape, but it differs from the provided description. The triangulation problem is reproducible for revolution surface only if slice angle is <= 180 degree. Starting and ending faces looks well. See the corresponding pictures for case 1 and case 2 in attached zip file.
Draw reproducer (for case 1):
pload MODELING AISV
vertex v1 0 10 0
vertex v2 0 10 10
vertex v3 0 0 -10
edge e1 v1 v2
edge e2 v2 v3
edge e3 v3 v1
wire w1 e1 e2 e3
plane pln 0 10 0 1 0 0
mkface f1 pln
add w1 f1
don f1
revol r f1 0 10 0 0 0 1 180
fit
checkshape r
vinit
vsetdispmode 1
vdisplay r
vfit

The corresponding issue with ID = 22818 has been registered for this case.
Later you may check if the issue is resolved by checking references to the specified ID in OCCT Release Notes. The analysis of the issue will take some time depending on our technical capability and availability of resources.
If the problem is urgent for you, you may contact us via the Contact Form http://www.opencascade.org/about/contacts/.
Regards

Attachments: