Standard_Boolean degen2
= BRep_Tool::Degenerated(anOrEd2);
- if ( degen1 ) {
- //if (!myOldNewShapes.IsBound(anOrEd1)) //?? multiple coping
- {
- TopoDS_Shape aLocalShape = anOrEd1.EmptyCopied();
- Edge1 = TopoDS::Edge(aLocalShape);
- // Edge1 = TopoDS::Edge(ex1.Current().EmptyCopied());
- // aLocalShape = ex1.Current();
- // TopExp::Vertices(TopoDS::Edge(aLocalShape),V1f,V1l);
- TopExp::Vertices(anOrEd1,V1f,V1l);
- V1f.Orientation(TopAbs_FORWARD);
- B.Add(Edge1,V1f);
- V1l.Orientation(TopAbs_REVERSED);
- B.Add(Edge1,V1l);
- B.Range(Edge1,0,1);
- myOldNewShapes.Bind(anOrEd1, Edge1);
- }
- //else
- // Edge1 = TopoDS::Edge(myOldNewShapes(anOrEd1));
+ if ( degen1 )
+ {
+ TopoDS_Shape aLocalShape = anOrEd1.EmptyCopied();
+ Edge1 = TopoDS::Edge(aLocalShape);
+ // Edge1 = TopoDS::Edge(ex1.Current().EmptyCopied());
+ // aLocalShape = ex1.Current();
+ // TopExp::Vertices(TopoDS::Edge(aLocalShape),V1f,V1l);
+ TopExp::Vertices(anOrEd1,V1f,V1l);
+ V1f.Orientation(TopAbs_FORWARD);
+ B.Add(Edge1,V1f);
+ V1l.Orientation(TopAbs_REVERSED);
+ B.Add(Edge1,V1l);
+ B.Range(Edge1,0,1);
+ myOldNewShapes.Bind(anOrEd1, Edge1);
}
else {
Edge1 = TopoDS::Edge(anOrEd1);
}
- if ( degen2 ) {
- //if (!myOldNewShapes.IsBound(anOrEd2))
- {
- TopoDS_Shape aLocalShape = anOrEd2.EmptyCopied();
- Edge2 = TopoDS::Edge(aLocalShape);
- // Edge2 = TopoDS::Edge(ex2.Current().EmptyCopied());
- TopExp::Vertices(anOrEd2,V2f,V2l);
- V2f.Orientation(TopAbs_FORWARD);
- B.Add(Edge2,V2f);
- V2l.Orientation(TopAbs_REVERSED);
- B.Add(Edge2,V2l);
- B.Range(Edge2,0,1);
- myOldNewShapes.Bind(anOrEd2, Edge2);
- }
- //else
- // Edge2 = TopoDS::Edge(myOldNewShapes(anOrEd2));
+ if ( degen2 )
+ {
+ TopoDS_Shape aLocalShape = anOrEd2.EmptyCopied();
+ Edge2 = TopoDS::Edge(aLocalShape);
+ // Edge2 = TopoDS::Edge(ex2.Current().EmptyCopied());
+ TopExp::Vertices(anOrEd2,V2f,V2l);
+ V2f.Orientation(TopAbs_FORWARD);
+ B.Add(Edge2,V2f);
+ V2l.Orientation(TopAbs_REVERSED);
+ B.Add(Edge2,V2l);
+ B.Range(Edge2,0,1);
+ myOldNewShapes.Bind(anOrEd2, Edge2);
}
else {
Edge2 = TopoDS::Edge(anOrEd2);
if (!myMutableInput)
{
- const TopoDS_Shape* aNewEd1 = myOldNewShapes.Seek(Edge1);
- if (aNewEd1)
- Edge1 = TopoDS::Edge(*aNewEd1);
- else if (aFirstWire && !degen1 && (IType != 4 || BRep_Tool::SameParameter(Edge1) || BRep_Tool::SameRange(Edge1)))
- Edge1 = CreateNewEdge(Edge1, myOldNewShapes, Wire1, aModifWires);
-
- const TopoDS_Shape* aNewEd2 = myOldNewShapes.Seek(Edge2);
- if (aNewEd2)
- Edge2 = TopoDS::Edge(*aNewEd2);
- else if (!degen2 && (IType != 4 || BRep_Tool::SameParameter(Edge2) || BRep_Tool::SameRange(Edge2)))
- Edge2 = CreateNewEdge(Edge2, myOldNewShapes, Wire2, aModifWires);
+ if (!degen1) //if true=>already empty-copied
+ {
+ const TopoDS_Shape* aNewEd1 = myOldNewShapes.Seek(Edge1);
+ if (aNewEd1)
+ Edge1 = TopoDS::Edge(*aNewEd1);
+ else if (aFirstWire && (IType != 4 || BRep_Tool::SameParameter(Edge1) || BRep_Tool::SameRange(Edge1)))
+ //if such expression is true and mutableInput is false => pre-copy the edge to prevent a following modifying (see code below)
+ Edge1 = CreateNewEdge(Edge1, myOldNewShapes, Wire1, aModifWires);
+ }
+
+ if (!degen2)
+ {
+ const TopoDS_Shape* aNewEd2 = myOldNewShapes.Seek(Edge2);
+ if (aNewEd2)
+ Edge2 = TopoDS::Edge(*aNewEd2);
+ else if (IType != 4 || BRep_Tool::SameParameter(Edge2) || BRep_Tool::SameRange(Edge2))
+ Edge2 = CreateNewEdge(Edge2, myOldNewShapes, Wire2, aModifWires);
+ }
}
// set the pcurves
// complete myMap for edge1
if (! (degen1 && IType == 4))
{
+ TopoDS_Edge aREd = anOrEd1;
+ if (degen1)
+ aREd = Edge1; //??
TopTools_ListOfShape Empty;
- if (!myMap.IsBound(Edge1)) myMap.Bind(Edge1,Empty);
- myMap(Edge1).Append(Face);
+ if (!myMap.IsBound(anOrEd1))
+ myMap.Bind(anOrEd1,Empty);
+ myMap(anOrEd1).Append(Face);
}
tantque = ex1.More() && ex2.More();
}
//all vertices from myShell are the part of orig. section wires
- //add edges from the myShell which can be safely updated to reshaper?? (i.e. already empty-copied/newly created)
if (myMutableInput)
BRepLib::SameParameter(myShell);
else
{
+ TopTools_DataMapIteratorOfDataMapOfShapeShape itM(myOldNewShapes);
+ for (;itM.More();itM.Next())
+ {
+ const TopoDS_Shape& aK = itM.Key();
+ if (aK.ShapeType() != TopAbs_EDGE)
+ continue; //additional check, should be edge anyway
+ const TopoDS_Shape& aVal = itM.Value();
+ myReshaper.Replace(aK, aVal);
+ }
BRepLib::SameParameter(myShell, myReshaper );
myShell = TopoDS::Shell(myReshaper.Apply(myShell));
}
for (;anExpE.More();anExpE.Next())
{
const TopoDS_Shape& aCurE = anExpE.Current();
- const TopoDS_Shape& aNSEdge = Modified(aCurE);
+ const TopoDS_Shape& aNSEdge = ResultShape(aCurE);
B.Add(aNewW, aNSEdge);
}
//function : Modified
//purpose :
//=======================================================================
-TopoDS_Shape BRepFill_Generator::Modified (const TopoDS_Shape& theShape) const
+TopoDS_Shape BRepFill_Generator::ResultShape (const TopoDS_Shape& theShape) const
{
const TopoDS_Shape* aDSh = myOldNewShapes.Seek(theShape);
TopoDS_Shape aNsh = aDSh ? *aDSh : theShape;
return aNsh;
}
-//=======================================================================
-//function : IsModified
-//purpose :
-//=======================================================================
-Standard_Boolean BRepFill_Generator::IsModified (const TopoDS_Shape& theShape) const
-{
- return myOldNewShapes.IsBound(theShape) || myReshaper.IsRecorded(theShape);
-}
-
//=======================================================================
//function : SetMutableInput
//purpose :
//function : GetMutableInput
//purpose :
//=======================================================================
-Standard_Boolean BRepFill_Generator::GetMutableInput() const
+Standard_Boolean BRepFill_Generator::IsMutableInput() const
{
return myMutableInput;
}
//! <SSection> of a section.
Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SSection) const;
- //! Returns a modified shape
- Standard_EXPORT TopoDS_Shape Modified (const TopoDS_Shape& theShape) const;
-
- //! Check if shape have been modified
- Standard_EXPORT Standard_Boolean IsModified (const TopoDS_Shape& theShape) const;
+ //! Returns a modified shape in the constructed shell,
+ //! If shape is not changed (replaced) during operation => returns the same shape
+ Standard_EXPORT TopoDS_Shape ResultShape (const TopoDS_Shape& theShape) const;
+ //! Sets the mutable input state
+ //! If true then the input profile can be modified
+ //! inside the operation
Standard_EXPORT void SetMutableInput(const Standard_Boolean IsMutableInput);
-
- Standard_EXPORT Standard_Boolean GetMutableInput() const;
+
+ //! Returns the current mutable input state
+ Standard_EXPORT Standard_Boolean IsMutableInput() const;
protected:
//?? should we clean myBFGenerator in some other places??
myBFGenerator.Nullify();
myBFGenerator = new BRepFill_Generator();
- myBFGenerator->SetMutableInput(GetMutableInput());
+ myBFGenerator->SetMutableInput(IsMutableInput());
// for (Standard_Integer i=1; i<=nbSects; i++) {
Standard_Integer i;
for (i=1; i<=nbSects; i++) {
TopoDS_Wire wire2 = TopoDS::Wire(myWires.Last());
//myBFGenerator stores the same 'myWires'
- if (myBFGenerator->IsModified(wire1))
- wire1 = TopoDS::Wire(myBFGenerator->Modified(wire1));
- if (myBFGenerator->IsModified(wire2))
- wire2 = TopoDS::Wire(myBFGenerator->Modified(wire2));
+ wire1 = TopoDS::Wire(myBFGenerator->ResultShape(wire1));
+ wire2 = TopoDS::Wire(myBFGenerator->ResultShape(wire2));
myShape = MakeSolid(shell, wire1, wire2, myPres3d, myFirst, myLast);
TopTools_MapOfShape MapFaces;
if (degen2){
- TopoDS_Vertex Vdegen = TopoDS::Vertex(myBFGenerator->Modified(TopExp::FirstVertex(TopoDS::Edge(edge2))));
+ TopoDS_Vertex Vdegen = TopoDS::Vertex(myBFGenerator->ResultShape(TopExp::FirstVertex(TopoDS::Edge(edge2))));
for (it.Initialize(MV.FindFromKey(Vdegen)); it.More(); it.Next()) {
MapFaces.Add(it.Value());
}
}
else {
- for (it.Initialize(M.FindFromKey(myBFGenerator->Modified(edge2))); it.More(); it.Next()) {
+ for (it.Initialize(M.FindFromKey(myBFGenerator->ResultShape(edge2))); it.More(); it.Next()) {
MapFaces.Add(it.Value());
}
}
if (degen1) {
- TopoDS_Vertex Vdegen = TopoDS::Vertex(myBFGenerator->Modified(TopExp::FirstVertex(TopoDS::Edge(edge1))));
+ TopoDS_Vertex Vdegen = TopoDS::Vertex(myBFGenerator->ResultShape(TopExp::FirstVertex(TopoDS::Edge(edge1))));
for (it.Initialize(MV.FindFromKey(Vdegen)); it.More(); it.Next()) {
const TopoDS_Shape& Face = it.Value();
if (MapFaces.Contains(Face)) {
}
}
else {
- for (it.Initialize(M.FindFromKey(myBFGenerator->Modified(edge1))); it.More(); it.Next()) {
+ for (it.Initialize(M.FindFromKey(myBFGenerator->ResultShape(edge1))); it.More(); it.Next()) {
const TopoDS_Shape& Face = it.Value();
if (MapFaces.Contains(Face)) {
myEdgeFace.Bind(edge1, Face);
TopTools_IndexedMapOfShape Emap;
TopoDS_Shape aNewS = S;
if (myIsRuled && !myBFGenerator.IsNull())
- aNewS = myBFGenerator->Modified(S);
+ aNewS = myBFGenerator->ResultShape(S);
const TopTools_ListOfShape& Elist = VEmap.FindFromKey(aNewS);
TopTools_ListIteratorOfListOfShape itl(Elist);
for (; itl.More(); itl.Next())
TopTools_IndexedMapOfShape EmapOfSection;
TopoDS_Shape aWsec = myWires(IndOfSec);
if (myIsRuled && !myBFGenerator.IsNull())
- aWsec = myBFGenerator->Modified(aWsec);
+ aWsec = myBFGenerator->ResultShape(aWsec);
TopExp::MapShapes(aWsec, TopAbs_EDGE, EmapOfSection);
TopoDS_Edge NextEdge;
for (itl.Initialize(EElist); itl.More(); itl.Next())
for (Standard_Integer inde = 1; itw.More(); itw.Next(),inde++)
{
FirstEdge = TopoDS::Edge(itw.Value());
+ if (myIsRuled && !myBFGenerator.IsNull())
+ FirstEdge = TopoDS::Edge(myBFGenerator->ResultShape(FirstEdge));
if (inde == Eindex)
break;
}
- if (myIsRuled && !myBFGenerator.IsNull())
- FirstEdge = TopoDS::Edge(myBFGenerator->Modified(FirstEdge));
-
//Find the first longitudinal edge
TopoDS_Face FirstFace = TopoDS::Face(AllFaces(Eindex));
FirstFace.Orientation(TopAbs_FORWARD);
//function : GetMutableInput
//purpose :
//=======================================================================
-Standard_Boolean BRepOffsetAPI_ThruSections::GetMutableInput() const
+Standard_Boolean BRepOffsetAPI_ThruSections::IsMutableInput() const
{
return myMutableInput;
}
//! Returns the Face generated by each edge of the first wire
Standard_EXPORT TopoDS_Shape GeneratedFace (const TopoDS_Shape& Edge) const;
+ //! Sets the mutable input state
+ //! If true then the input profile can be modified
+ //! inside the thrusection operation
Standard_EXPORT void SetMutableInput(const Standard_Boolean IsMutableInput);
//! Returns a list of new shapes generated from the shape
//! S can be an edge or a vertex of a given Profile (see methods AddWire and AddVertex).
Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
- Standard_EXPORT Standard_Boolean GetMutableInput() const;
+ //! Returns the current mutable input state
+ Standard_EXPORT Standard_Boolean IsMutableInput() const;
protected:
Standard_Integer NbEdges = 0;
Standard_Boolean IsFirstWire = Standard_False;
for ( Standard_Integer i = index+2; i<= n-1 ; i++) {
- if (!strcmp(a[i],"-save"))
+ if (!strcmp(a[i],"-safe"))
{
IsMutableInput = Standard_False;
continue;
theCommands.Add("gener", "gener result wire1 wire2 [..wire..]",
__FILE__,gener,g);
- theCommands.Add("thrusections", "thrusections [-N] result issolid isruled shape1 shape2 [..shape..], the option -N means no check on wires, shapes must be wires or vertices (only first or last)",
+ theCommands.Add("thrusections", "thrusections [-N] result issolid isruled shape1 shape2 [..shape..] [-safe], "
+ "the option -N means no check on wires, shapes must be wires or vertices (only first or last), "
+ "-safe option allows to prevent the modifying of input shapes",
__FILE__,thrusections,g);
theCommands.Add("genthrus", "genthrus res subshape_of_profile",
002 not_solids
003 specific
004 bugs
-005 not_solids_locked006 solids_locked
+005 not_solids_locked
+006 solids_locked
007 specific_locked
\ No newline at end of file
ttranslate w2 0 20 0
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 200
ttranslate w2 0 20 0
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 161.603
ttranslate w2 0 20 0
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 200
ttranslate w2 0 20 0
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 161.603
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2513.27
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2196.82
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2513.27
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2513.27
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2196.82
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2020.65
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2020.65
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 1834.5
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2020.65
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2020.65
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 1834.5
restore [locate_data_file C1] w2
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 1295.31
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 2020.65
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 1690.09
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 1834.5
restore [locate_data_file C13] w2
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 762.417
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 1507.96
ttranslate w2 0 0 40
setflags w1 locked
setflags w2 locked
-thrusections result 0 0 w1 w2 -save
+thrusections result 0 0 w1 w2 -safe
checkprops result -s 1314
restore [locate_data_file buc60318.rle] w
explode w W
setflags w locked
-thrusections result 0 0 w_1 w_2 w_3 w_4 w_5 -save
+thrusections result 0 0 w_1 w_2 w_3 w_4 w_5 -safe
checkprops result -s 254109
setflags f1_1 locked
setflags f2_1 locked
setflags f3_1 locked
-thrusections result 1 0 f1_1 f2_1 f3_1 -save
+thrusections result 1 0 f1_1 f2_1 f3_1 -safe
checkprops result -s 49757.1
restore [locate_data_file cts21570_2.rle] w2
setflags w1 locked
setflags w2 locked
-thrusections result 1 0 w1 w2 -save
+thrusections result 1 0 w1 w2 -safe
checkprops result -s 29817.5
restore [locate_data_file cts21570_2.rle] w2
setflags w1 locked
setflags w2 locked
-thrusections result 1 0 w2 w1 -save
+thrusections result 1 0 w2 w1 -safe
checkprops result -s 29817.5
orientation w1 F
setflags w1 locked
setflags w2 locked
-thrusections result 1 0 w1 w2 -save
+thrusections result 1 0 w1 w2 -safe
checkprops result -s 29817.5
orientation w1 F
setflags w1 locked
setflags w2 locked
-thrusections result 1 0 w2 w1 -save
+thrusections result 1 0 w2 w1 -safe
checkprops result -s 29817.5
orientation w2 R
setflags w1 locked
setflags w2 locked
-thrusections result 1 0 w1 w2 -save
+thrusections result 1 0 w1 w2 -safe
checkprops result -s 29817.5
orientation w2 R
setflags w1 locked
setflags w2 locked
-thrusections result 1 0 w2 w1 -save
+thrusections result 1 0 w2 w1 -safe
checkprops result -s 29817.5
orientation w1 R
setflags w1 locked
setflags w2 locked
-thrusections result 1 0 w1 w2 -save
+thrusections result 1 0 w1 w2 -safe
checkprops result -s 29817.5
orientation w1 R
setflags w1 locked
setflags w2 locked
-thrusections result 1 0 w2 w1 -save
+thrusections result 1 0 w2 w1 -safe
checkprops result -s 29817.5
--- /dev/null
+puts "========"
+puts "OCC28642"
+puts "========"
+puts ""
+#########################################
+# BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections
+#########################################
+
+#check "closed" thrusection (first profile is same as the last)
+polyline p1 0 0 0 1 0 0
+polyline p2 2 1 0 2 2 0
+polyline p3 3 0 0 4 0 0
+polyline p4 2 -1 0 2 -2 0
+thrusections result 0 0 p1 p2 p3 p4 p1
+
+checkprops result -s 10.1587
+checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8
+
--- /dev/null
+puts "========"
+puts "OCC28642"
+puts "========"
+puts ""
+#########################################
+# BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections
+#########################################
+
+#check "closed" thrusection (first profile is same as the last)
+polyline p1 0 0 0 1 0 0
+polyline p2 2 1 0 2 2 0
+polyline p3 3 0 0 4 0 0
+polyline p4 2 -1 0 2 -2 0
+thrusections result 0 1 p1 p2 p3 p4 p1
+
+checkprops result -s 6
+checknbshapes result -vertex 8 -edge 12 -wire 4 -face 4 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 29
+
setflags v4 locked
setflags v5 locked
-thrusections result ${issolid} ${isruled} v4 w1 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 v5 -safe
checkprops result -s 490.101
set issolid 1
set isruled 1
-thrusections result ${issolid} ${isruled} v4 w1 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 v5 -safe
checkprops result -s 490.101
setflags v4 locked
setflags v5 locked
-thrusections result ${issolid} ${isruled} v4 w1 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 v5 -safe
checkprops result -s 651.466
set issolid 1
set isruled 0
-thrusections result ${issolid} ${isruled} v4 w1 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 v5 -safe
checkprops result -s 651.466
set issolid 1
set isruled 1
-thrusections result ${issolid} ${isruled} v4 w1 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 v5 -safe
checkprops result -s 485.502
setflags v4 locked
setflags v5 locked
-thrusections result ${issolid} ${isruled} v4 w1 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 v5 -safe
checkprops result -s 646.621
set issolid 1
set isruled 0
-thrusections result ${issolid} ${isruled} v4 w1 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 v5 -safe
checkprops result -s 646.621
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 1404.96
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 1829.23
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 1829.23
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 2160.94
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 2556.25
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 2556.25
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 1021.13
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 1346.42
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save }
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe }
checkprops result -s 1346.42
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 1353.78
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 1683.87
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 1683.87
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 449.295
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 597.473
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save }
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe }
checkprops result -s 597.473
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 740.079
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 881.045
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 881.045
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 245.485
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 327.161
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 327.161
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 400.925
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 400.925
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 478.063
setflags v1 locked
setflags v2 locked
-catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save}
+catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe}
checkprops result -s 422.859
setflags w101 locked
setflags v5 locked
-thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe
checkprops result -s 12651.5
#
set issolid 0
set isruled 0
-thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe
checkprops result -s 56691.9
#
set issolid 1
set isruled 0
-thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe
checkprops result -s 56691.9
#
set issolid 1
set isruled 1
-thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe
checkprops result -s 12301.8
#
set issolid 0
set isruled 0
-thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe
checkprops result -s 37693.9
#
set issolid 1
set isruled 0
-thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe
checkprops result -s 37693.9
setflags wc2 locked
#catch {thrusections result ${issolid} ${isruled} v1 w1 v2}
-catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save}
+catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe}
checkprops result -s 256.875
setflags wc2 locked
#catch {thrusections result ${issolid} ${isruled} v1 w1 v2}
-catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save}
+catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe}
checkprops result -s 332.724
setflags wc2 locked
#catch {thrusections result ${issolid} ${isruled} v1 w1 v2 }
-catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save}
+catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe}
checkprops result -s 314.974
#catch {thrusections result ${issolid} ${isruled} v1 w1 v2}
-catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save}
+catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe}
checkprops result -s 419.166
setflags wc2 locked
#catch {thrusections result ${issolid} ${isruled} v1 w1 v2}
-catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save}
+catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe}
checkprops result -s 702.858
setflags wc2 locked
#catch {thrusections result ${issolid} ${isruled} v1 w1 v2 }
-catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save}
+catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe}
checkprops result -s 702.921
set issolid 1
set isruled 1
#thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5
-thrusections result ${issolid} ${isruled} v4 w1 wbzc1 w11 wpbc1 w21 wpbc2 w111 wbzc2 w101 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 wbzc1 w11 wpbc1 w21 wpbc2 w111 wbzc2 w101 v5 -safe
checkprops result -s 12786.5
set issolid 1
set isruled 1
#thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5
-thrusections result ${issolid} ${isruled} v4 w1 wbzc1 w11 wpbc1 w21 wpbc2 w111 wbzc2 w101 v5 -save
+thrusections result ${issolid} ${isruled} v4 w1 wbzc1 w11 wpbc1 w21 wpbc2 w111 wbzc2 w101 v5 -safe
checkprops result -s 12436.8
--- /dev/null
+puts "========"
+puts "OCC28642"
+puts "========"
+puts ""
+#########################################
+# BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections
+#########################################
+
+#check "closed" thrusection (first profile is same as the last)
+polyline p1 0 0 0 1 0 0
+polyline p2 2 1 0 2 2 0
+polyline p3 3 0 0 4 0 0
+polyline p4 2 -1 0 2 -2 0
+
+setflags p1 locked
+setflags p2 locked
+setflags p3 locked
+setflags p4 locked
+
+thrusections result 0 0 p1 p2 p3 p4 p1 -safe
+
+checkprops result -s 10.1587
+checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8
+
--- /dev/null
+puts "========"
+puts "OCC28642"
+puts "========"
+puts ""
+#########################################
+# BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections
+#########################################
+
+#check "closed" thrusection (first profile is same as the last)
+polyline p1 0 0 0 1 0 0
+polyline p2 2 1 0 2 2 0
+polyline p3 3 0 0 4 0 0
+polyline p4 2 -1 0 2 -2 0
+
+setflags p1 locked
+setflags p2 locked
+setflags p3 locked
+setflags p4 locked
+
+thrusections result 0 1 p1 p2 p3 p4 p1 -safe
+
+checkprops result -s 6
+checknbshapes result -vertex 8 -edge 12 -wire 4 -face 4 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 29
+