Archived issue #0026934
ShapeFix_Shape damages the revolved shape
Description
Tessellation fails for some results of BRepPrimAPI_MakeRevol and ShapeFix_Shape combination.
Two preconditions must be satisfied:
1 - The revolved shape is a single periodic closed edge, or a face with a boundary of such edge. Like a circle, ellipse or a bspline.
2 - The revolution is a full 360 degrees.
In the most trivial case, a full revolved circular edge produces a torus shell. The exported BRep looks fine, but tessellation fails completely for the revolved surface.
Two preconditions must be satisfied:
1 - The revolved shape is a single periodic closed edge, or a face with a boundary of such edge. Like a circle, ellipse or a bspline.
2 - The revolution is a full 360 degrees.
In the most trivial case, a full revolved circular edge produces a torus shell. The exported BRep looks fine, but tessellation fails completely for the revolved surface.
Steps to reproduce
TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(gp_Circ(gp_Ax2(gp_Pnt(2.0, 0.0, 0.0), gp_Dir(0.0, 0.0, 1.0)), 1.0)).Edge();
gp_Ax1 axis(gp_Pnt(0.0, 0.0, 0.0), gp_Vec(0.0, 1.0, 0.0));
BRepPrimAPI_MakeRevol revolve(edge, axis, 2 * M_PI, Standard_False);
ShapeFix_Shape fixer(revolve.Shape());
fixer.Perform();
Draw script:
circle c 2 0 0 0 0 1 1
mkedge e c
revol r e 0 0 0 0 1 0 360
fixshape r1 r
checkshape r1
gp_Ax1 axis(gp_Pnt(0.0, 0.0, 0.0), gp_Vec(0.0, 1.0, 0.0));
BRepPrimAPI_MakeRevol revolve(edge, axis, 2 * M_PI, Standard_False);
ShapeFix_Shape fixer(revolve.Shape());
fixer.Perform();
Draw script:
circle c 2 0 0 0 0 1 1
mkedge e c
revol r e 0 0 0 0 1 0 360
fixshape r1 r
checkshape r1
Public activity
4 archived notes
Participants are labeled by their role within this record.
I have made the following draw script trying to reproduce this problem.
circle c 2 0 0 0 0 1 1
mkedge e c
revol r e 0 0 0 0 1 0 360
incmesh r 0.01
isos r 0
triangles r
But I have got good triangulation on output. I have attached its snapshot here.
Dear Author, please make similarly the case on which you have got incorrect triangulation.
circle c 2 0 0 0 0 1 1
mkedge e c
revol r e 0 0 0 0 1 0 360
incmesh r 0.01
isos r 0
triangles r
But I have got good triangulation on output. I have attached its snapshot here.
Dear Author, please make similarly the case on which you have got incorrect triangulation.
I'm terribly sorry, the information I missed out is that a ShapeFix_Shape is applied to the result shape which seems to be the culprit here.
Without ShapeFix_Shape, tessellation works fine, but fails on the result of ShapeFix_Shape. This is still a serious issue for us.
Without ShapeFix_Shape, tessellation works fine, but fails on the result of ShapeFix_Shape. This is still a serious issue for us.
I could reproduce the problem. The draw script is in steps to reproduce field.
The shape fixed by fixshape becomes invalid from the point of view of checkshape.
It is strange that if we create simple torus with the following commands fixshape will not damage the shape:
plane pl 0 0 0 0 1 0 1 0 0
ptorus t pl 2 1
Such shape has the same geometry and topology as that got from "revol" command.
The shape fixed by fixshape becomes invalid from the point of view of checkshape.
It is strange that if we create simple torus with the following commands fixshape will not damage the shape:
plane pl 0 0 0 0 1 0 1 0 0
ptorus t pl 2 1
Such shape has the same geometry and topology as that got from "revol" command.
This case is a bug in the ShapeFix_Wire.