Archived issue #0028602
Prevent ShapeFix_Shape to modify the input shape
Description
ShapeFix_Shape modifies the input shape (updates tolerances of sub-shapes, adds p-curves in edges, etc.).
Sometimes the modification of input shape is unwanted. The new sub-shapes are to be created for the result if needed.
Sometimes the modification of input shape is unwanted. The new sub-shapes are to be created for the result if needed.
Steps to reproduce
box b 10 10 10
tolerance b
# Initial tolerances:
#Tolerance MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
#FACE : MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
#EDGE : MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
#VERTEX : MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
fixshape b1 b
tolerance b
# Result tolerances:
#Tolerance MAX=1.[revision removed]-007 AVG=1.[revision removed]-007 MIN=9.[revision removed]-008
#FACE : MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
#EDGE : MAX=1.[revision removed]-007 AVG=1.[revision removed]-007 MIN=1.[revision removed]-007
#VERTEX : MAX=1.[revision removed]-007 AVG=1.[revision removed]-007 MIN=1.[revision removed]-007
tolerance b
# Initial tolerances:
#Tolerance MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
#FACE : MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
#EDGE : MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
#VERTEX : MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
fixshape b1 b
tolerance b
# Result tolerances:
#Tolerance MAX=1.[revision removed]-007 AVG=1.[revision removed]-007 MIN=9.[revision removed]-008
#FACE : MAX=9.[revision removed]-008 AVG=9.[revision removed]-008 MIN=9.[revision removed]-008
#EDGE : MAX=1.[revision removed]-007 AVG=1.[revision removed]-007 MIN=1.[revision removed]-007
#VERTEX : MAX=1.[revision removed]-007 AVG=1.[revision removed]-007 MIN=1.[revision removed]-007
Public activity
7 archived notes
Participants are labeled by their role within this record.
Dear Ivan,
Please check if topomode of fixshape solves the problem.
Please check if topomode of fixshape solves the problem.
"Topomode" of fixshape doesn't solve the problem.
And also detected error the same as in bug #0028227.
Reproduce in DRAW:
pload ALL
vertex v1 0 0 0
vertex v2 10 10 10
edge e v1 v2
setflags e locked
fixshape res e
Result: **Exception** TopoDS_LockedShape: BRep_Builder::SameParameter
This error occurs in the method "FixSameParameter" in class "ShapeFix_Edge"
And also detected error the same as in bug #0028227.
Reproduce in DRAW:
pload ALL
vertex v1 0 0 0
vertex v2 10 10 10
edge e v1 v2
setflags e locked
fixshape res e
Result: **Exception** TopoDS_LockedShape: BRep_Builder::SameParameter
This error occurs in the method "FixSameParameter" in class "ShapeFix_Edge"
Dear Ivan,
Please try to get rid of the problem using the new method BRep::SameParameter added in the fix for the bug #0028456.
Please try to get rid of the problem using the new method BRep::SameParameter added in the fix for the bug #0028456.
Branch [archived branch] has been created by Commenter 2.
[revision removed]
Detailed log of new commits:
Author: Commenter 2
Date: Fri Apr 21 20:18:17 2017 +0300
0028602: Prevent ShapeFix_Shape to modify the input shape
- Is used the new method BRepLib::SameParameter
[revision removed]
Detailed log of new commits:
Author: Commenter 2
Date: Fri Apr 21 20:18:17 2017 +0300
0028602: Prevent ShapeFix_Shape to modify the input shape
- Is used the new method BRepLib::SameParameter
Dear Mikhail, the problem was resolved how you suggested, could you please review CR28602.
The branch CR28602 contains no solution that is needed.
The main idea is written in the bug description: "The new sub-shapes are to be created for the result if needed." It means, for example, if some edge is modified in order to recompute pcurves or increase tolerance in it, the new copy of the edge is to be created and then put in the result instead of the original edge.
The fix #0028456 contains some new overloads of the method BRepLib::SameParameter. E.g.:
TopoDS_Edge SameParameter(const TopoDS_Edge& theEdge,
const Standard_Real theTolerance,
Standard_Real& theNewTol,
Standard_Boolean IsUseOldEdge);
This method returns such a copy and does not touch the original edge.
The main idea is written in the bug description: "The new sub-shapes are to be created for the result if needed." It means, for example, if some edge is modified in order to recompute pcurves or increase tolerance in it, the new copy of the edge is to be created and then put in the result instead of the original edge.
The fix #0028456 contains some new overloads of the method BRepLib::SameParameter. E.g.:
TopoDS_Edge SameParameter(const TopoDS_Edge& theEdge,
const Standard_Real theTolerance,
Standard_Real& theNewTol,
Standard_Boolean IsUseOldEdge);
This method returns such a copy and does not touch the original edge.
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Related records