From 8ba7a91005d74fd40656c5e385c1462ce5ba783c Mon Sep 17 00:00:00 2001 From: isn Date: Tue, 16 Jan 2018 16:16:12 +0300 Subject: [PATCH] corrections --- src/BRepFill/BRepFill_Generator.cxx | 122 +++++++++--------- src/BRepFill/BRepFill_Generator.hxx | 16 ++- .../BRepOffsetAPI_ThruSections.cxx | 27 ++-- .../BRepOffsetAPI_ThruSections.hxx | 6 +- src/BRepTest/BRepTest_SweepCommands.cxx | 6 +- tests/thrusection/grids.list | 3 +- tests/thrusection/not_solids_locked/A1 | 2 +- tests/thrusection/not_solids_locked/B1 | 2 +- tests/thrusection/not_solids_locked/C1 | 2 +- tests/thrusection/not_solids_locked/D1 | 2 +- tests/thrusection/not_solids_locked/F1 | 2 +- tests/thrusection/not_solids_locked/G1 | 2 +- tests/thrusection/not_solids_locked/H1 | 2 +- tests/thrusection/not_solids_locked/I1 | 2 +- tests/thrusection/not_solids_locked/J1 | 2 +- tests/thrusection/not_solids_locked/K1 | 2 +- tests/thrusection/not_solids_locked/L1 | 2 +- tests/thrusection/not_solids_locked/M1 | 2 +- tests/thrusection/not_solids_locked/N1 | 2 +- tests/thrusection/not_solids_locked/O1 | 2 +- tests/thrusection/not_solids_locked/P1 | 2 +- tests/thrusection/not_solids_locked/Q1 | 2 +- tests/thrusection/not_solids_locked/R1 | 2 +- tests/thrusection/not_solids_locked/S1 | 2 +- tests/thrusection/not_solids_locked/T1 | 2 +- tests/thrusection/not_solids_locked/U1 | 2 +- tests/thrusection/not_solids_locked/V1 | 2 +- tests/thrusection/not_solids_locked/W1 | 2 +- tests/thrusection/not_solids_locked/W8 | 2 +- tests/thrusection/solids_locked/A1 | 2 +- tests/thrusection/solids_locked/A2 | 2 +- tests/thrusection/solids_locked/A3 | 2 +- tests/thrusection/solids_locked/A4 | 2 +- tests/thrusection/solids_locked/A5 | 2 +- tests/thrusection/solids_locked/A6 | 2 +- tests/thrusection/solids_locked/A7 | 2 +- tests/thrusection/solids_locked/A8 | 2 +- tests/thrusection/solids_locked/A9 | 2 +- tests/thrusection/specific/N5 | 18 +++ tests/thrusection/specific/N6 | 18 +++ tests/thrusection/specific_locked/A1 | 2 +- tests/thrusection/specific_locked/A2 | 2 +- tests/thrusection/specific_locked/A3 | 2 +- tests/thrusection/specific_locked/A4 | 2 +- tests/thrusection/specific_locked/A6 | 2 +- tests/thrusection/specific_locked/A7 | 2 +- tests/thrusection/specific_locked/A8 | 2 +- tests/thrusection/specific_locked/B1 | 2 +- tests/thrusection/specific_locked/B2 | 2 +- tests/thrusection/specific_locked/B3 | 2 +- tests/thrusection/specific_locked/B5 | 2 +- tests/thrusection/specific_locked/B6 | 2 +- tests/thrusection/specific_locked/B7 | 2 +- tests/thrusection/specific_locked/B9 | 2 +- tests/thrusection/specific_locked/C1 | 2 +- tests/thrusection/specific_locked/C2 | 2 +- tests/thrusection/specific_locked/C4 | 2 +- tests/thrusection/specific_locked/C5 | 2 +- tests/thrusection/specific_locked/C6 | 2 +- tests/thrusection/specific_locked/C8 | 2 +- tests/thrusection/specific_locked/C9 | 2 +- tests/thrusection/specific_locked/D1 | 2 +- tests/thrusection/specific_locked/D3 | 2 +- tests/thrusection/specific_locked/D4 | 2 +- tests/thrusection/specific_locked/D5 | 2 +- tests/thrusection/specific_locked/D7 | 2 +- tests/thrusection/specific_locked/D8 | 2 +- tests/thrusection/specific_locked/D9 | 2 +- tests/thrusection/specific_locked/E1 | 2 +- tests/thrusection/specific_locked/E2 | 2 +- tests/thrusection/specific_locked/E3 | 2 +- tests/thrusection/specific_locked/E4 | 2 +- tests/thrusection/specific_locked/E6 | 2 +- tests/thrusection/specific_locked/E7 | 2 +- tests/thrusection/specific_locked/E8 | 2 +- tests/thrusection/specific_locked/F1 | 2 +- tests/thrusection/specific_locked/F2 | 2 +- tests/thrusection/specific_locked/F3 | 2 +- tests/thrusection/specific_locked/F5 | 2 +- tests/thrusection/specific_locked/F6 | 2 +- tests/thrusection/specific_locked/F7 | 2 +- tests/thrusection/specific_locked/F9 | 2 +- tests/thrusection/specific_locked/G1 | 2 +- tests/thrusection/specific_locked/G2 | 2 +- tests/thrusection/specific_locked/G4 | 2 +- tests/thrusection/specific_locked/G6 | 2 +- tests/thrusection/specific_locked/N5 | 24 ++++ tests/thrusection/specific_locked/N6 | 24 ++++ 88 files changed, 256 insertions(+), 164 deletions(-) create mode 100644 tests/thrusection/specific/N5 create mode 100644 tests/thrusection/specific/N6 create mode 100644 tests/thrusection/specific_locked/N5 create mode 100644 tests/thrusection/specific_locked/N6 diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index cd8ee6dfc3..70ead961f3 100644 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -613,45 +613,37 @@ void BRepFill_Generator::Perform() 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); @@ -857,17 +849,24 @@ void BRepFill_Generator::Perform() 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 @@ -975,9 +974,13 @@ void BRepFill_Generator::Perform() // 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(); @@ -990,11 +993,19 @@ void BRepFill_Generator::Perform() } //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)); } @@ -1014,7 +1025,7 @@ void BRepFill_Generator::Perform() 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); } @@ -1063,7 +1074,7 @@ const TopTools_DataMapOfShapeListOfShape& BRepFill_Generator::Generated() const //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; @@ -1076,15 +1087,6 @@ TopoDS_Shape BRepFill_Generator::Modified (const TopoDS_Shape& theShape) const 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 : @@ -1098,7 +1100,7 @@ void BRepFill_Generator::SetMutableInput(const Standard_Boolean IsMutableInput) //function : GetMutableInput //purpose : //======================================================================= -Standard_Boolean BRepFill_Generator::GetMutableInput() const +Standard_Boolean BRepFill_Generator::IsMutableInput() const { return myMutableInput; } diff --git a/src/BRepFill/BRepFill_Generator.hxx b/src/BRepFill/BRepFill_Generator.hxx index 0f902bf154..0a88838153 100644 --- a/src/BRepFill/BRepFill_Generator.hxx +++ b/src/BRepFill/BRepFill_Generator.hxx @@ -58,15 +58,17 @@ public: //! 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: diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index 819eada337..dcf4f45f82 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -515,7 +515,7 @@ void BRepOffsetAPI_ThruSections::CreateRuled() //?? 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++) { @@ -555,10 +555,8 @@ void BRepOffsetAPI_ThruSections::CreateRuled() 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); @@ -600,19 +598,19 @@ void BRepOffsetAPI_ThruSections::CreateRuled() 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)) { @@ -622,7 +620,7 @@ void BRepOffsetAPI_ThruSections::CreateRuled() } } 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); @@ -1306,7 +1304,7 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) 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()) @@ -1340,7 +1338,7 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) 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()) @@ -1367,13 +1365,12 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) 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); @@ -1570,7 +1567,7 @@ void BRepOffsetAPI_ThruSections::SetMutableInput(const Standard_Boolean IsMutabl //function : GetMutableInput //purpose : //======================================================================= -Standard_Boolean BRepOffsetAPI_ThruSections::GetMutableInput() const +Standard_Boolean BRepOffsetAPI_ThruSections::IsMutableInput() const { return myMutableInput; } diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx index cbd8db5c2a..dc7b8a5fb1 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx @@ -146,6 +146,9 @@ public: //! 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 @@ -154,7 +157,8 @@ public: //! 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: diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx index ad7bd03578..635363d73d 100644 --- a/src/BRepTest/BRepTest_SweepCommands.cxx +++ b/src/BRepTest/BRepTest_SweepCommands.cxx @@ -379,7 +379,7 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char* 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; @@ -997,7 +997,9 @@ void BRepTest::SweepCommands(Draw_Interpretor& theCommands) 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", diff --git a/tests/thrusection/grids.list b/tests/thrusection/grids.list index 681670312c..cb68540472 100644 --- a/tests/thrusection/grids.list +++ b/tests/thrusection/grids.list @@ -2,5 +2,6 @@ 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 diff --git a/tests/thrusection/not_solids_locked/A1 b/tests/thrusection/not_solids_locked/A1 index b8102c6489..91b288036f 100644 --- a/tests/thrusection/not_solids_locked/A1 +++ b/tests/thrusection/not_solids_locked/A1 @@ -3,5 +3,5 @@ restore [locate_data_file D1] w2 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 diff --git a/tests/thrusection/not_solids_locked/B1 b/tests/thrusection/not_solids_locked/B1 index 2f0ca68fab..f3d0ab2a38 100644 --- a/tests/thrusection/not_solids_locked/B1 +++ b/tests/thrusection/not_solids_locked/B1 @@ -3,5 +3,5 @@ restore [locate_data_file D4] w2 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 diff --git a/tests/thrusection/not_solids_locked/C1 b/tests/thrusection/not_solids_locked/C1 index 722dbf3c33..18614eb808 100644 --- a/tests/thrusection/not_solids_locked/C1 +++ b/tests/thrusection/not_solids_locked/C1 @@ -3,5 +3,5 @@ restore [locate_data_file D1] w2 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 diff --git a/tests/thrusection/not_solids_locked/D1 b/tests/thrusection/not_solids_locked/D1 index a526343aa5..6258d60a54 100644 --- a/tests/thrusection/not_solids_locked/D1 +++ b/tests/thrusection/not_solids_locked/D1 @@ -3,5 +3,5 @@ restore [locate_data_file D4] w2 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 diff --git a/tests/thrusection/not_solids_locked/F1 b/tests/thrusection/not_solids_locked/F1 index 3a9d0c190e..9d2da63359 100644 --- a/tests/thrusection/not_solids_locked/F1 +++ b/tests/thrusection/not_solids_locked/F1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/G1 b/tests/thrusection/not_solids_locked/G1 index db367bd1bd..62ac4b45b2 100644 --- a/tests/thrusection/not_solids_locked/G1 +++ b/tests/thrusection/not_solids_locked/G1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/H1 b/tests/thrusection/not_solids_locked/H1 index bea18c1ad4..6f9a0396fa 100644 --- a/tests/thrusection/not_solids_locked/H1 +++ b/tests/thrusection/not_solids_locked/H1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/I1 b/tests/thrusection/not_solids_locked/I1 index 836c4d8643..2d588a4b64 100644 --- a/tests/thrusection/not_solids_locked/I1 +++ b/tests/thrusection/not_solids_locked/I1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/J1 b/tests/thrusection/not_solids_locked/J1 index 2e607e33fd..7e549d5722 100644 --- a/tests/thrusection/not_solids_locked/J1 +++ b/tests/thrusection/not_solids_locked/J1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/K1 b/tests/thrusection/not_solids_locked/K1 index 1b887cd6a4..de685a6751 100644 --- a/tests/thrusection/not_solids_locked/K1 +++ b/tests/thrusection/not_solids_locked/K1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/L1 b/tests/thrusection/not_solids_locked/L1 index c6e0914170..d91b0e5092 100644 --- a/tests/thrusection/not_solids_locked/L1 +++ b/tests/thrusection/not_solids_locked/L1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/M1 b/tests/thrusection/not_solids_locked/M1 index 2a98b501c9..1891756d93 100644 --- a/tests/thrusection/not_solids_locked/M1 +++ b/tests/thrusection/not_solids_locked/M1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/N1 b/tests/thrusection/not_solids_locked/N1 index 9c03f09951..02316db242 100644 --- a/tests/thrusection/not_solids_locked/N1 +++ b/tests/thrusection/not_solids_locked/N1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/O1 b/tests/thrusection/not_solids_locked/O1 index b20d314288..b907157c6d 100644 --- a/tests/thrusection/not_solids_locked/O1 +++ b/tests/thrusection/not_solids_locked/O1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/P1 b/tests/thrusection/not_solids_locked/P1 index 1a48455680..42d1ab3008 100644 --- a/tests/thrusection/not_solids_locked/P1 +++ b/tests/thrusection/not_solids_locked/P1 @@ -3,5 +3,5 @@ restore [locate_data_file C1] w2 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 diff --git a/tests/thrusection/not_solids_locked/Q1 b/tests/thrusection/not_solids_locked/Q1 index bc072dfaa3..7de395109e 100644 --- a/tests/thrusection/not_solids_locked/Q1 +++ b/tests/thrusection/not_solids_locked/Q1 @@ -2,5 +2,5 @@ restore [locate_data_file C13] w1 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 diff --git a/tests/thrusection/not_solids_locked/R1 b/tests/thrusection/not_solids_locked/R1 index 5a0df7bf1f..e2f822a21a 100644 --- a/tests/thrusection/not_solids_locked/R1 +++ b/tests/thrusection/not_solids_locked/R1 @@ -3,5 +3,5 @@ restore [locate_data_file C10] w2 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 diff --git a/tests/thrusection/not_solids_locked/S1 b/tests/thrusection/not_solids_locked/S1 index 61f5a46a35..ebf2a14bb8 100644 --- a/tests/thrusection/not_solids_locked/S1 +++ b/tests/thrusection/not_solids_locked/S1 @@ -3,5 +3,5 @@ restore [locate_data_file C11] w2 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 diff --git a/tests/thrusection/not_solids_locked/T1 b/tests/thrusection/not_solids_locked/T1 index b5359a7ead..89245176ed 100644 --- a/tests/thrusection/not_solids_locked/T1 +++ b/tests/thrusection/not_solids_locked/T1 @@ -3,5 +3,5 @@ restore [locate_data_file C12] w2 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 diff --git a/tests/thrusection/not_solids_locked/U1 b/tests/thrusection/not_solids_locked/U1 index fd1216b6f7..286814b8bf 100644 --- a/tests/thrusection/not_solids_locked/U1 +++ b/tests/thrusection/not_solids_locked/U1 @@ -2,5 +2,5 @@ restore [locate_data_file C7] w1 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 diff --git a/tests/thrusection/not_solids_locked/V1 b/tests/thrusection/not_solids_locked/V1 index 111b2ca6e9..8972a93298 100644 --- a/tests/thrusection/not_solids_locked/V1 +++ b/tests/thrusection/not_solids_locked/V1 @@ -3,5 +3,5 @@ restore [locate_data_file C10] w2 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 diff --git a/tests/thrusection/not_solids_locked/W1 b/tests/thrusection/not_solids_locked/W1 index 06d4859ca8..ce47c9e2ec 100644 --- a/tests/thrusection/not_solids_locked/W1 +++ b/tests/thrusection/not_solids_locked/W1 @@ -3,5 +3,5 @@ restore [locate_data_file C11] w2 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 diff --git a/tests/thrusection/not_solids_locked/W8 b/tests/thrusection/not_solids_locked/W8 index 337bb1dc6c..6c597250ff 100644 --- a/tests/thrusection/not_solids_locked/W8 +++ b/tests/thrusection/not_solids_locked/W8 @@ -2,5 +2,5 @@ dall 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 diff --git a/tests/thrusection/solids_locked/A1 b/tests/thrusection/solids_locked/A1 index 037ef2b756..2d904b7428 100644 --- a/tests/thrusection/solids_locked/A1 +++ b/tests/thrusection/solids_locked/A1 @@ -7,5 +7,5 @@ explode f3 w 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 diff --git a/tests/thrusection/solids_locked/A2 b/tests/thrusection/solids_locked/A2 index 2842046725..f2cb0a91c9 100644 --- a/tests/thrusection/solids_locked/A2 +++ b/tests/thrusection/solids_locked/A2 @@ -2,5 +2,5 @@ restore [locate_data_file cts21570_1.rle] w1 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 diff --git a/tests/thrusection/solids_locked/A3 b/tests/thrusection/solids_locked/A3 index 9e0b83a24f..94c7cb78db 100644 --- a/tests/thrusection/solids_locked/A3 +++ b/tests/thrusection/solids_locked/A3 @@ -2,5 +2,5 @@ restore [locate_data_file cts21570_1.rle] w1 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 diff --git a/tests/thrusection/solids_locked/A4 b/tests/thrusection/solids_locked/A4 index 41e264e575..32a3e9624e 100644 --- a/tests/thrusection/solids_locked/A4 +++ b/tests/thrusection/solids_locked/A4 @@ -3,5 +3,5 @@ restore [locate_data_file cts21570_2.rle] w2 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 diff --git a/tests/thrusection/solids_locked/A5 b/tests/thrusection/solids_locked/A5 index ba5c430352..b6c5120934 100644 --- a/tests/thrusection/solids_locked/A5 +++ b/tests/thrusection/solids_locked/A5 @@ -3,5 +3,5 @@ restore [locate_data_file cts21570_2.rle] w2 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 diff --git a/tests/thrusection/solids_locked/A6 b/tests/thrusection/solids_locked/A6 index 8cfffe962b..6a8b0a773c 100644 --- a/tests/thrusection/solids_locked/A6 +++ b/tests/thrusection/solids_locked/A6 @@ -4,5 +4,5 @@ orientation w1 F 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 diff --git a/tests/thrusection/solids_locked/A7 b/tests/thrusection/solids_locked/A7 index 5347189795..a76184fca5 100644 --- a/tests/thrusection/solids_locked/A7 +++ b/tests/thrusection/solids_locked/A7 @@ -4,5 +4,5 @@ orientation w1 F 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 diff --git a/tests/thrusection/solids_locked/A8 b/tests/thrusection/solids_locked/A8 index 4b3c95202a..a24d8473f3 100644 --- a/tests/thrusection/solids_locked/A8 +++ b/tests/thrusection/solids_locked/A8 @@ -5,5 +5,5 @@ orientation w2 R 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 diff --git a/tests/thrusection/solids_locked/A9 b/tests/thrusection/solids_locked/A9 index 553f83545c..3fafcc58c2 100644 --- a/tests/thrusection/solids_locked/A9 +++ b/tests/thrusection/solids_locked/A9 @@ -5,5 +5,5 @@ orientation w2 R 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 diff --git a/tests/thrusection/specific/N5 b/tests/thrusection/specific/N5 new file mode 100644 index 0000000000..2f6526995b --- /dev/null +++ b/tests/thrusection/specific/N5 @@ -0,0 +1,18 @@ +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 + diff --git a/tests/thrusection/specific/N6 b/tests/thrusection/specific/N6 new file mode 100644 index 0000000000..1e153720ff --- /dev/null +++ b/tests/thrusection/specific/N6 @@ -0,0 +1,18 @@ +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 + diff --git a/tests/thrusection/specific_locked/A1 b/tests/thrusection/specific_locked/A1 index a25d7c7390..d1bd049316 100644 --- a/tests/thrusection/specific_locked/A1 +++ b/tests/thrusection/specific_locked/A1 @@ -41,7 +41,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/A2 b/tests/thrusection/specific_locked/A2 index 801df566ee..67c60d1b49 100644 --- a/tests/thrusection/specific_locked/A2 +++ b/tests/thrusection/specific_locked/A2 @@ -41,7 +41,7 @@ setflags v5 locked 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 diff --git a/tests/thrusection/specific_locked/A3 b/tests/thrusection/specific_locked/A3 index 5f40b36f6b..188bea4597 100644 --- a/tests/thrusection/specific_locked/A3 +++ b/tests/thrusection/specific_locked/A3 @@ -42,7 +42,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/A4 b/tests/thrusection/specific_locked/A4 index 5cd7c0597b..52a1e8e672 100644 --- a/tests/thrusection/specific_locked/A4 +++ b/tests/thrusection/specific_locked/A4 @@ -42,7 +42,7 @@ setflags v5 locked 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 diff --git a/tests/thrusection/specific_locked/A6 b/tests/thrusection/specific_locked/A6 index d504aee1a4..a5e87f9f15 100644 --- a/tests/thrusection/specific_locked/A6 +++ b/tests/thrusection/specific_locked/A6 @@ -37,7 +37,7 @@ setflags v5 locked 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 diff --git a/tests/thrusection/specific_locked/A7 b/tests/thrusection/specific_locked/A7 index 3179e5921d..645e9bc26c 100644 --- a/tests/thrusection/specific_locked/A7 +++ b/tests/thrusection/specific_locked/A7 @@ -38,7 +38,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/A8 b/tests/thrusection/specific_locked/A8 index af1eaa46aa..2ba4a370da 100644 --- a/tests/thrusection/specific_locked/A8 +++ b/tests/thrusection/specific_locked/A8 @@ -37,7 +37,7 @@ setflags v5 locked 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 diff --git a/tests/thrusection/specific_locked/B1 b/tests/thrusection/specific_locked/B1 index 09bc3fe87b..e32c7fee99 100644 --- a/tests/thrusection/specific_locked/B1 +++ b/tests/thrusection/specific_locked/B1 @@ -21,7 +21,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/B2 b/tests/thrusection/specific_locked/B2 index 79cc971193..b2d991bf23 100644 --- a/tests/thrusection/specific_locked/B2 +++ b/tests/thrusection/specific_locked/B2 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/B3 b/tests/thrusection/specific_locked/B3 index afc25febfd..fe3d2a128d 100644 --- a/tests/thrusection/specific_locked/B3 +++ b/tests/thrusection/specific_locked/B3 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/B5 b/tests/thrusection/specific_locked/B5 index 5a28837a5f..1b7446026f 100644 --- a/tests/thrusection/specific_locked/B5 +++ b/tests/thrusection/specific_locked/B5 @@ -23,7 +23,7 @@ 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 2160.94 diff --git a/tests/thrusection/specific_locked/B6 b/tests/thrusection/specific_locked/B6 index 2cd15534f5..2f17105d3e 100644 --- a/tests/thrusection/specific_locked/B6 +++ b/tests/thrusection/specific_locked/B6 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/B7 b/tests/thrusection/specific_locked/B7 index 564494b89b..54fae39339 100644 --- a/tests/thrusection/specific_locked/B7 +++ b/tests/thrusection/specific_locked/B7 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/B9 b/tests/thrusection/specific_locked/B9 index 6c044c8032..12c7c081de 100644 --- a/tests/thrusection/specific_locked/B9 +++ b/tests/thrusection/specific_locked/B9 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/C1 b/tests/thrusection/specific_locked/C1 index 480f35765e..5fafb9107a 100644 --- a/tests/thrusection/specific_locked/C1 +++ b/tests/thrusection/specific_locked/C1 @@ -19,7 +19,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/C2 b/tests/thrusection/specific_locked/C2 index c55c29120e..400cc3852c 100644 --- a/tests/thrusection/specific_locked/C2 +++ b/tests/thrusection/specific_locked/C2 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/C4 b/tests/thrusection/specific_locked/C4 index e5d893a186..cec06960db 100644 --- a/tests/thrusection/specific_locked/C4 +++ b/tests/thrusection/specific_locked/C4 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/C5 b/tests/thrusection/specific_locked/C5 index 26a4c500a1..ed09ff1bcc 100644 --- a/tests/thrusection/specific_locked/C5 +++ b/tests/thrusection/specific_locked/C5 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/C6 b/tests/thrusection/specific_locked/C6 index 6346fa977a..7d55cef302 100644 --- a/tests/thrusection/specific_locked/C6 +++ b/tests/thrusection/specific_locked/C6 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/C8 b/tests/thrusection/specific_locked/C8 index 095a211a41..bbc0d65a05 100644 --- a/tests/thrusection/specific_locked/C8 +++ b/tests/thrusection/specific_locked/C8 @@ -23,7 +23,7 @@ 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 449.295 diff --git a/tests/thrusection/specific_locked/C9 b/tests/thrusection/specific_locked/C9 index 8463b7ec57..27b4ca1a1d 100644 --- a/tests/thrusection/specific_locked/C9 +++ b/tests/thrusection/specific_locked/C9 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/D1 b/tests/thrusection/specific_locked/D1 index 3fe1b5d57a..910d8e822f 100644 --- a/tests/thrusection/specific_locked/D1 +++ b/tests/thrusection/specific_locked/D1 @@ -21,7 +21,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/D3 b/tests/thrusection/specific_locked/D3 index 143442064a..62ad151469 100644 --- a/tests/thrusection/specific_locked/D3 +++ b/tests/thrusection/specific_locked/D3 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/D4 b/tests/thrusection/specific_locked/D4 index bdccabb803..22b503b55f 100644 --- a/tests/thrusection/specific_locked/D4 +++ b/tests/thrusection/specific_locked/D4 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/D5 b/tests/thrusection/specific_locked/D5 index ecd4aec76d..38124d179e 100644 --- a/tests/thrusection/specific_locked/D5 +++ b/tests/thrusection/specific_locked/D5 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/D7 b/tests/thrusection/specific_locked/D7 index d6e945a8b8..02481fb28e 100644 --- a/tests/thrusection/specific_locked/D7 +++ b/tests/thrusection/specific_locked/D7 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/D8 b/tests/thrusection/specific_locked/D8 index 48aed94cd3..61dc388fc8 100644 --- a/tests/thrusection/specific_locked/D8 +++ b/tests/thrusection/specific_locked/D8 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/D9 b/tests/thrusection/specific_locked/D9 index 202223ebc3..51ab82724a 100644 --- a/tests/thrusection/specific_locked/D9 +++ b/tests/thrusection/specific_locked/D9 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/E1 b/tests/thrusection/specific_locked/E1 index e767e05261..76590a9af2 100644 --- a/tests/thrusection/specific_locked/E1 +++ b/tests/thrusection/specific_locked/E1 @@ -21,7 +21,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/E2 b/tests/thrusection/specific_locked/E2 index 94a2bca2b3..68bedc9811 100644 --- a/tests/thrusection/specific_locked/E2 +++ b/tests/thrusection/specific_locked/E2 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/E3 b/tests/thrusection/specific_locked/E3 index fc56b058ac..c570bcd71a 100644 --- a/tests/thrusection/specific_locked/E3 +++ b/tests/thrusection/specific_locked/E3 @@ -22,7 +22,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/E4 b/tests/thrusection/specific_locked/E4 index eb32f5835d..471209cc43 100644 --- a/tests/thrusection/specific_locked/E4 +++ b/tests/thrusection/specific_locked/E4 @@ -24,7 +24,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/E6 b/tests/thrusection/specific_locked/E6 index 587caeb937..85c8034d35 100644 --- a/tests/thrusection/specific_locked/E6 +++ b/tests/thrusection/specific_locked/E6 @@ -138,7 +138,7 @@ setflags w111 locked 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 diff --git a/tests/thrusection/specific_locked/E7 b/tests/thrusection/specific_locked/E7 index 46c2b01c54..02170a4856 100644 --- a/tests/thrusection/specific_locked/E7 +++ b/tests/thrusection/specific_locked/E7 @@ -138,7 +138,7 @@ setflags v5 locked # 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 diff --git a/tests/thrusection/specific_locked/E8 b/tests/thrusection/specific_locked/E8 index e2fd082fde..f691491927 100644 --- a/tests/thrusection/specific_locked/E8 +++ b/tests/thrusection/specific_locked/E8 @@ -138,7 +138,7 @@ setflags v5 locked # 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 diff --git a/tests/thrusection/specific_locked/F1 b/tests/thrusection/specific_locked/F1 index 34f3668e21..a83c817328 100644 --- a/tests/thrusection/specific_locked/F1 +++ b/tests/thrusection/specific_locked/F1 @@ -137,7 +137,7 @@ setflags v5 locked # 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 diff --git a/tests/thrusection/specific_locked/F2 b/tests/thrusection/specific_locked/F2 index d9041b7d1a..7319643954 100644 --- a/tests/thrusection/specific_locked/F2 +++ b/tests/thrusection/specific_locked/F2 @@ -139,7 +139,7 @@ setflags v5 locked # 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 diff --git a/tests/thrusection/specific_locked/F3 b/tests/thrusection/specific_locked/F3 index fa90c0ffb3..0008b0cfba 100644 --- a/tests/thrusection/specific_locked/F3 +++ b/tests/thrusection/specific_locked/F3 @@ -139,7 +139,7 @@ setflags v5 locked # 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 diff --git a/tests/thrusection/specific_locked/F5 b/tests/thrusection/specific_locked/F5 index 893604106d..cdf66fe9fe 100644 --- a/tests/thrusection/specific_locked/F5 +++ b/tests/thrusection/specific_locked/F5 @@ -32,7 +32,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/F6 b/tests/thrusection/specific_locked/F6 index ddb804d57d..f9acb74d97 100644 --- a/tests/thrusection/specific_locked/F6 +++ b/tests/thrusection/specific_locked/F6 @@ -33,7 +33,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/F7 b/tests/thrusection/specific_locked/F7 index 2bac73de60..f41a5824d3 100644 --- a/tests/thrusection/specific_locked/F7 +++ b/tests/thrusection/specific_locked/F7 @@ -33,7 +33,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/F9 b/tests/thrusection/specific_locked/F9 index 1006e771ad..ae4da3d21f 100644 --- a/tests/thrusection/specific_locked/F9 +++ b/tests/thrusection/specific_locked/F9 @@ -33,7 +33,7 @@ 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 419.166 diff --git a/tests/thrusection/specific_locked/G1 b/tests/thrusection/specific_locked/G1 index 8907d120c0..e384592adb 100644 --- a/tests/thrusection/specific_locked/G1 +++ b/tests/thrusection/specific_locked/G1 @@ -34,7 +34,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/G2 b/tests/thrusection/specific_locked/G2 index 9355ae2c31..3f6bac6866 100644 --- a/tests/thrusection/specific_locked/G2 +++ b/tests/thrusection/specific_locked/G2 @@ -33,7 +33,7 @@ setflags w1 locked 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 diff --git a/tests/thrusection/specific_locked/G4 b/tests/thrusection/specific_locked/G4 index c6f22d5ae3..bf823e5460 100644 --- a/tests/thrusection/specific_locked/G4 +++ b/tests/thrusection/specific_locked/G4 @@ -165,7 +165,7 @@ setflags w21 locked 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 diff --git a/tests/thrusection/specific_locked/G6 b/tests/thrusection/specific_locked/G6 index d1dc6163c7..ea646acc36 100644 --- a/tests/thrusection/specific_locked/G6 +++ b/tests/thrusection/specific_locked/G6 @@ -163,7 +163,7 @@ setflags v5 locked 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 diff --git a/tests/thrusection/specific_locked/N5 b/tests/thrusection/specific_locked/N5 new file mode 100644 index 0000000000..64cf89dfaf --- /dev/null +++ b/tests/thrusection/specific_locked/N5 @@ -0,0 +1,24 @@ +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 + diff --git a/tests/thrusection/specific_locked/N6 b/tests/thrusection/specific_locked/N6 new file mode 100644 index 0000000000..9b32f14dfd --- /dev/null +++ b/tests/thrusection/specific_locked/N6 @@ -0,0 +1,24 @@ +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 + -- 2.39.5