MantisBT - Open CASCADE
View Issue Details
0028602Open CASCADE[OCCT] OCCT:Shape Healingpublic2017-03-28 11:492019-09-04 13:04
msv 
isn 
normalminor 
assignedopen 
[OCCT] 7.1.0 
[OCCT] 7.5.0* 
0028602: Prevent ShapeFix_Shape to modify the input shape
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.
box b 10 10 10
tolerance b

# Initial tolerances:
#Tolerance MAX=9.9999999999999995e-008 AVG=9.9999999999999995e-008 MIN=9.9999999999999995e-008
#FACE : MAX=9.9999999999999995e-008 AVG=9.9999999999999995e-008 MIN=9.9999999999999995e-008
#EDGE : MAX=9.9999999999999995e-008 AVG=9.9999999999999995e-008 MIN=9.9999999999999995e-008
#VERTEX : MAX=9.9999999999999995e-008 AVG=9.9999999999999995e-008 MIN=9.9999999999999995e-008

fixshape b1 b
tolerance b

# Result tolerances:
#Tolerance MAX=1.0001000025000001e-007 AVG=1.0000923099999988e-007 MIN=9.9999999999999995e-008
#FACE : MAX=9.9999999999999995e-008 AVG=9.9999999999999995e-008 MIN=9.9999999999999995e-008
#EDGE : MAX=1.0001000025000001e-007 AVG=1.0001000025000001e-007 MIN=1.0001000025000001e-007
#VERTEX : MAX=1.0001000025000001e-007 AVG=1.0001000025000001e-007 MIN=1.0001000025000001e-007
No tags attached.
related to 0028601closed bugmaster ShapeFix_Shape increases tolerance of sub-shapes of a valid shape 
related to 0028227closed bugmaster ShapeUpgrade_UnifySameDomain modifies the edges even if it is not requested 
Issue History
2017-03-28 11:49msvNew Issue
2017-03-28 11:49msvAssigned To => gka
2017-03-28 11:49msvRelationship addedrelated to 0028601
2017-04-04 16:21msvSummaryAdd SafeMode option in ShapeFix_Shape to prevent modification of the input shape => Prevent ShapeFix_Shape to modify the input shape
2017-04-04 16:21msvDescription Updatedbug_revision_view_page.php?rev_id=16346#r16346
2017-04-04 16:22msvNote Added: 0064902
2017-04-04 16:22msvAssigned Togka => imn
2017-04-04 16:22msvStatusnew => assigned
2017-04-04 18:04imnNote Added: 0064905
2017-04-04 18:04imnNote Edited: 0064905bug_revision_view_page.php?bugnote_id=64905#r16350
2017-04-04 18:10imnNote Edited: 0064905bug_revision_view_page.php?bugnote_id=64905#r16351
2017-04-04 18:35msvRelationship addedrelated to 0028227
2017-04-04 18:56msvNote Added: 0064910
2017-04-21 20:21gitNote Added: 0065451
2017-04-21 20:29imnNote Added: 0065453
2017-04-21 20:29imnAssigned Toimn => msv
2017-04-21 20:29imnStatusassigned => resolved
2017-04-24 16:11msvNote Added: 0065482
2017-04-24 16:12gitNote Added: 0065483
2017-04-24 16:12msvStatusresolved => assigned
2017-05-05 18:47msvAssigned Tomsv => isn
2017-07-20 13:00msvTarget Version7.2.0 => 7.3.0
2018-02-25 21:09abvTarget Version7.3.0 => 7.4.0
2019-09-04 13:04abvTarget Version7.4.0 => 7.5.0*

Notes
(0064902)
msv   
2017-04-04 16:22   
Dear Ivan,
Please check if topomode of fixshape solves the problem.
(0064905)
imn   
2017-04-04 18:04   
(edited on: 2017-04-04 18:10)
"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"

(0064910)
msv   
2017-04-04 18:56   
Dear Ivan,
Please try to get rid of the problem using the new method BRep::SameParameter added in the fix for the bug 0028456.
(0065451)
git   
2017-04-21 20:21   
Branch CR28602 has been created by imn.

SHA-1: 5e415326d97c367884e410523631e184ed0fb7a0


Detailed log of new commits:

Author: imn
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
(0065453)
imn   
2017-04-21 20:29   
Dear Mikhail, the problem was resolved how you suggested, could you please review CR28602.
(0065482)
msv   
2017-04-24 16:11   
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.
(0065483)
git   
2017-04-24 16:12   
Branch CR28602 has been deleted by msv.

SHA-1: 5e415326d97c367884e410523631e184ed0fb7a0