From 90cc21876df61ea005bd3a52eaf86c5da4663caa Mon Sep 17 00:00:00 2001 From: isn Date: Wed, 5 Apr 2017 15:16:40 +0300 Subject: [PATCH] 0028642: BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections 1) BRepFill_Generator and BRepOffsetAPI_ThruSections now supports 'non-destructive' mode for the input shapes (sections wires). The shape history of this algorithms also has been modified. 2) New test grids (based on the previous ones) has been added. This new cases uses locked shape as input arguments 3) mutable-flag has been added to 'thrusections' command --- src/BRepFill/BRepFill_Generator.cxx | 235 ++++++++++++++---- src/BRepFill/BRepFill_Generator.hxx | 15 +- .../BRepOffsetAPI_ThruSections.cxx | 119 +++++++-- .../BRepOffsetAPI_ThruSections.hxx | 11 +- src/BRepTest/BRepTest_SweepCommands.cxx | 45 ++-- tests/thrusection/grids.list | 3 +- tests/thrusection/not_solids_locked/A1 | 7 + tests/thrusection/not_solids_locked/B1 | 7 + tests/thrusection/not_solids_locked/C1 | 7 + tests/thrusection/not_solids_locked/D1 | 7 + tests/thrusection/not_solids_locked/F1 | 7 + tests/thrusection/not_solids_locked/G1 | 7 + tests/thrusection/not_solids_locked/H1 | 7 + tests/thrusection/not_solids_locked/I1 | 7 + tests/thrusection/not_solids_locked/J1 | 7 + tests/thrusection/not_solids_locked/K1 | 7 + tests/thrusection/not_solids_locked/L1 | 7 + tests/thrusection/not_solids_locked/M1 | 7 + tests/thrusection/not_solids_locked/N1 | 7 + tests/thrusection/not_solids_locked/O1 | 7 + tests/thrusection/not_solids_locked/P1 | 7 + tests/thrusection/not_solids_locked/Q1 | 6 + tests/thrusection/not_solids_locked/R1 | 7 + tests/thrusection/not_solids_locked/S1 | 7 + tests/thrusection/not_solids_locked/T1 | 7 + tests/thrusection/not_solids_locked/U1 | 6 + tests/thrusection/not_solids_locked/V1 | 7 + tests/thrusection/not_solids_locked/W1 | 7 + tests/thrusection/not_solids_locked/W8 | 6 + tests/thrusection/solids_locked/A1 | 11 + tests/thrusection/solids_locked/A2 | 6 + tests/thrusection/solids_locked/A3 | 6 + tests/thrusection/solids_locked/A4 | 7 + tests/thrusection/solids_locked/A5 | 7 + tests/thrusection/solids_locked/A6 | 8 + tests/thrusection/solids_locked/A7 | 8 + tests/thrusection/solids_locked/A8 | 9 + tests/thrusection/solids_locked/A9 | 9 + tests/thrusection/specific_locked/A1 | 55 ++++ tests/thrusection/specific_locked/A2 | 59 +++++ tests/thrusection/specific_locked/A3 | 59 +++++ tests/thrusection/specific_locked/A4 | 60 +++++ tests/thrusection/specific_locked/A6 | 55 ++++ tests/thrusection/specific_locked/A7 | 55 ++++ tests/thrusection/specific_locked/A8 | 55 ++++ tests/thrusection/specific_locked/B1 | 39 +++ tests/thrusection/specific_locked/B2 | 39 +++ tests/thrusection/specific_locked/B3 | 40 +++ tests/thrusection/specific_locked/B5 | 41 +++ tests/thrusection/specific_locked/B6 | 39 +++ tests/thrusection/specific_locked/B7 | 40 +++ tests/thrusection/specific_locked/B9 | 40 +++ tests/thrusection/specific_locked/C1 | 36 +++ tests/thrusection/specific_locked/C2 | 40 +++ tests/thrusection/specific_locked/C4 | 40 +++ tests/thrusection/specific_locked/C5 | 39 +++ tests/thrusection/specific_locked/C6 | 40 +++ tests/thrusection/specific_locked/C8 | 41 +++ tests/thrusection/specific_locked/C9 | 39 +++ tests/thrusection/specific_locked/D1 | 39 +++ tests/thrusection/specific_locked/D3 | 40 +++ tests/thrusection/specific_locked/D4 | 39 +++ tests/thrusection/specific_locked/D5 | 38 +++ tests/thrusection/specific_locked/D7 | 40 +++ tests/thrusection/specific_locked/D8 | 39 +++ tests/thrusection/specific_locked/D9 | 40 +++ tests/thrusection/specific_locked/E1 | 38 +++ tests/thrusection/specific_locked/E2 | 40 +++ tests/thrusection/specific_locked/E3 | 39 +++ tests/thrusection/specific_locked/E4 | 42 ++++ tests/thrusection/specific_locked/E6 | 156 ++++++++++++ tests/thrusection/specific_locked/E7 | 155 ++++++++++++ tests/thrusection/specific_locked/E8 | 156 ++++++++++++ tests/thrusection/specific_locked/F1 | 155 ++++++++++++ tests/thrusection/specific_locked/F2 | 156 ++++++++++++ tests/thrusection/specific_locked/F3 | 157 ++++++++++++ tests/thrusection/specific_locked/F5 | 50 ++++ tests/thrusection/specific_locked/F6 | 50 ++++ tests/thrusection/specific_locked/F7 | 51 ++++ tests/thrusection/specific_locked/F9 | 51 ++++ tests/thrusection/specific_locked/G1 | 51 ++++ tests/thrusection/specific_locked/G2 | 51 ++++ tests/thrusection/specific_locked/G4 | 183 ++++++++++++++ tests/thrusection/specific_locked/G6 | 181 ++++++++++++++ 84 files changed, 3550 insertions(+), 95 deletions(-) create mode 100644 tests/thrusection/not_solids_locked/A1 create mode 100644 tests/thrusection/not_solids_locked/B1 create mode 100644 tests/thrusection/not_solids_locked/C1 create mode 100644 tests/thrusection/not_solids_locked/D1 create mode 100644 tests/thrusection/not_solids_locked/F1 create mode 100644 tests/thrusection/not_solids_locked/G1 create mode 100644 tests/thrusection/not_solids_locked/H1 create mode 100644 tests/thrusection/not_solids_locked/I1 create mode 100644 tests/thrusection/not_solids_locked/J1 create mode 100644 tests/thrusection/not_solids_locked/K1 create mode 100644 tests/thrusection/not_solids_locked/L1 create mode 100644 tests/thrusection/not_solids_locked/M1 create mode 100644 tests/thrusection/not_solids_locked/N1 create mode 100644 tests/thrusection/not_solids_locked/O1 create mode 100644 tests/thrusection/not_solids_locked/P1 create mode 100644 tests/thrusection/not_solids_locked/Q1 create mode 100644 tests/thrusection/not_solids_locked/R1 create mode 100644 tests/thrusection/not_solids_locked/S1 create mode 100644 tests/thrusection/not_solids_locked/T1 create mode 100644 tests/thrusection/not_solids_locked/U1 create mode 100644 tests/thrusection/not_solids_locked/V1 create mode 100644 tests/thrusection/not_solids_locked/W1 create mode 100644 tests/thrusection/not_solids_locked/W8 create mode 100644 tests/thrusection/solids_locked/A1 create mode 100644 tests/thrusection/solids_locked/A2 create mode 100644 tests/thrusection/solids_locked/A3 create mode 100644 tests/thrusection/solids_locked/A4 create mode 100644 tests/thrusection/solids_locked/A5 create mode 100644 tests/thrusection/solids_locked/A6 create mode 100644 tests/thrusection/solids_locked/A7 create mode 100644 tests/thrusection/solids_locked/A8 create mode 100644 tests/thrusection/solids_locked/A9 create mode 100644 tests/thrusection/specific_locked/A1 create mode 100644 tests/thrusection/specific_locked/A2 create mode 100644 tests/thrusection/specific_locked/A3 create mode 100644 tests/thrusection/specific_locked/A4 create mode 100644 tests/thrusection/specific_locked/A6 create mode 100644 tests/thrusection/specific_locked/A7 create mode 100644 tests/thrusection/specific_locked/A8 create mode 100644 tests/thrusection/specific_locked/B1 create mode 100644 tests/thrusection/specific_locked/B2 create mode 100644 tests/thrusection/specific_locked/B3 create mode 100644 tests/thrusection/specific_locked/B5 create mode 100644 tests/thrusection/specific_locked/B6 create mode 100644 tests/thrusection/specific_locked/B7 create mode 100644 tests/thrusection/specific_locked/B9 create mode 100644 tests/thrusection/specific_locked/C1 create mode 100644 tests/thrusection/specific_locked/C2 create mode 100644 tests/thrusection/specific_locked/C4 create mode 100644 tests/thrusection/specific_locked/C5 create mode 100644 tests/thrusection/specific_locked/C6 create mode 100644 tests/thrusection/specific_locked/C8 create mode 100644 tests/thrusection/specific_locked/C9 create mode 100644 tests/thrusection/specific_locked/D1 create mode 100644 tests/thrusection/specific_locked/D3 create mode 100644 tests/thrusection/specific_locked/D4 create mode 100644 tests/thrusection/specific_locked/D5 create mode 100644 tests/thrusection/specific_locked/D7 create mode 100644 tests/thrusection/specific_locked/D8 create mode 100644 tests/thrusection/specific_locked/D9 create mode 100644 tests/thrusection/specific_locked/E1 create mode 100644 tests/thrusection/specific_locked/E2 create mode 100644 tests/thrusection/specific_locked/E3 create mode 100644 tests/thrusection/specific_locked/E4 create mode 100644 tests/thrusection/specific_locked/E6 create mode 100644 tests/thrusection/specific_locked/E7 create mode 100644 tests/thrusection/specific_locked/E8 create mode 100644 tests/thrusection/specific_locked/F1 create mode 100644 tests/thrusection/specific_locked/F2 create mode 100644 tests/thrusection/specific_locked/F3 create mode 100644 tests/thrusection/specific_locked/F5 create mode 100644 tests/thrusection/specific_locked/F6 create mode 100644 tests/thrusection/specific_locked/F7 create mode 100644 tests/thrusection/specific_locked/F9 create mode 100644 tests/thrusection/specific_locked/G1 create mode 100644 tests/thrusection/specific_locked/G2 create mode 100644 tests/thrusection/specific_locked/G4 create mode 100644 tests/thrusection/specific_locked/G6 diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index d71ba4d910..cd8ee6dfc3 100644 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -503,13 +503,33 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, Surf = surface; } +//======================================================================= +//function : CreateNewEdge +//purpose : +//======================================================================= +static TopoDS_Edge CreateNewEdge(const TopoDS_Edge& theEdge, TopTools_DataMapOfShapeShape& theCopiedEdges, + const TopoDS_Wire& theWire, TopTools_IndexedMapOfShape& theModifWires) +{ + BRep_Builder aB; + TopoDS_Edge aNewEdge; + aNewEdge = TopoDS::Edge(theEdge.EmptyCopied()); + TopoDS_Iterator it(theEdge); + for (;it.More(); it.Next()) + aB.Add(aNewEdge, it.Value()); + theCopiedEdges.Bind(theEdge, aNewEdge); + // + if (!theModifWires.Contains(theWire)) + theModifWires.Add(theWire); + // + return aNewEdge; +} //======================================================================= //function : BRepFill_Generator //purpose : //======================================================================= -BRepFill_Generator::BRepFill_Generator() +BRepFill_Generator::BRepFill_Generator() : myMutableInput (Standard_True) { } @@ -541,9 +561,11 @@ void BRepFill_Generator::Perform() B.MakeShell(myShell); Standard_Integer Nb = myWires.Length(); + TopTools_IndexedMapOfShape aModifWires; //indexed map for debugging BRepTools_WireExplorer ex1,ex2; + Standard_Boolean aFirstWire = Standard_True; Standard_Boolean wPoint1, wPoint2, uClosed = Standard_False, DegenFirst = Standard_False, DegenLast = Standard_False; for ( Standard_Integer i = 1; i <= Nb-1; i++) { @@ -583,44 +605,56 @@ void BRepFill_Generator::Perform() while ( tantque ) { TopoDS_Vertex V1f,V1l,V2f,V2l, Vf_toMap, Vl_toMap; + TopoDS_Edge anOrEd1 = TopoDS::Edge(ex1.Current()); + TopoDS_Edge anOrEd2 = TopoDS::Edge(ex2.Current()); Standard_Boolean degen1 - = BRep_Tool::Degenerated(TopoDS::Edge(ex1.Current())); + = BRep_Tool::Degenerated(anOrEd1); Standard_Boolean degen2 - = BRep_Tool::Degenerated(TopoDS::Edge(ex2.Current())); + = BRep_Tool::Degenerated(anOrEd2); if ( degen1 ) { - TopoDS_Shape aLocalShape = ex1.Current().EmptyCopied(); - Edge1 = TopoDS::Edge(aLocalShape); -// Edge1 = TopoDS::Edge(ex1.Current().EmptyCopied()); -// aLocalShape = ex1.Current(); -// TopExp::Vertices(TopoDS::Edge(aLocalShape),V1f,V1l); - TopExp::Vertices(TopoDS::Edge(ex1.Current()),V1f,V1l); - V1f.Orientation(TopAbs_FORWARD); - B.Add(Edge1,V1f); - V1l.Orientation(TopAbs_REVERSED); - B.Add(Edge1,V1l); - B.Range(Edge1,0,1); + //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)); } else { - TopoDS_Shape aLocalShape = ex1.Current(); - Edge1 = TopoDS::Edge(aLocalShape); -// Edge1 = TopoDS::Edge(ex1.Current()); + Edge1 = TopoDS::Edge(anOrEd1); } if ( degen2 ) { - TopoDS_Shape aLocalShape = ex2.Current().EmptyCopied(); - Edge2 = TopoDS::Edge(aLocalShape); -// Edge2 = TopoDS::Edge(ex2.Current().EmptyCopied()); - TopExp::Vertices(TopoDS::Edge(ex2.Current()),V2f,V2l); - V2f.Orientation(TopAbs_FORWARD); - B.Add(Edge2,V2f); - V2l.Orientation(TopAbs_REVERSED); - B.Add(Edge2,V2l); - B.Range(Edge2,0,1); + //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)); } else { - Edge2 = TopoDS::Edge(ex2.Current()); + Edge2 = TopoDS::Edge(anOrEd2); } Standard_Boolean Periodic = (BRep_Tool::IsClosed(Edge1) || degen1) && @@ -821,32 +855,22 @@ void BRepFill_Generator::Perform() Map.Bind(Vl_toMap, Edge4); } - // make the wire - - TopoDS_Wire W; - B.MakeWire(W); - - if (! (degen1 && IType == 4)) - B.Add(W,Edge1); - B.Add(W,Edge4); - if (! (degen2 && IType == 4)) - B.Add(W,Edge2.Reversed()); - B.Add(W,Edge3); - - B.Add(Face,W); - - B.Add(myShell,Face); + 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); + } - // complete myMap for edge1 - if (! (degen1 && IType == 4)) - { - TopTools_ListOfShape Empty; - if (!myMap.IsBound(Edge1)) myMap.Bind(Edge1,Empty); - myMap(Edge1).Append(Face); - } - // set the pcurves - Standard_Real T = Precision::Confusion(); if (IType != 4) //not plane @@ -933,17 +957,80 @@ void BRepFill_Generator::Perform() B.SameRange(Edge3,Standard_False); B.SameRange(Edge4,Standard_False); + // make the wire + + TopoDS_Wire W; + B.MakeWire(W); + + if (! (degen1 && IType == 4)) + B.Add(W,Edge1); + B.Add(W,Edge4); + if (! (degen2 && IType == 4)) + B.Add(W,Edge2.Reversed()); + B.Add(W,Edge3); + + B.Add(Face,W); + B.Add(myShell,Face); + + // complete myMap for edge1 + if (! (degen1 && IType == 4)) + { + TopTools_ListOfShape Empty; + if (!myMap.IsBound(Edge1)) myMap.Bind(Edge1,Empty); + myMap(Edge1).Append(Face); + } + tantque = ex1.More() && ex2.More(); if (wPoint1) tantque = ex2.More(); if (wPoint2) tantque = ex1.More(); } + + aFirstWire = Standard_False; + + } + + //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 + { + BRepLib::SameParameter(myShell, myReshaper ); + myShell = TopoDS::Shell(myReshaper.Apply(myShell)); } - BRepLib::SameParameter(myShell); if (uClosed && DegenFirst && DegenLast) myShell.Closed(Standard_True); -} + //update wire's history + TopExp_Explorer anExpE; + for (int i = 1; i <= aModifWires.Extent(); i++) + { + const TopoDS_Shape& aCurW = aModifWires(i); + TopoDS_Wire aNewW; + B.MakeWire(aNewW); + + anExpE.Init(aCurW, TopAbs_EDGE); + for (;anExpE.More();anExpE.Next()) + { + const TopoDS_Shape& aCurE = anExpE.Current(); + const TopoDS_Shape& aNSEdge = Modified(aCurE); + B.Add(aNewW, aNSEdge); + } + + // + aNewW.Free(aCurW.Free()); + aNewW.Modified(aCurW.Modified()); + aNewW.Checked(aCurW.Checked()); + aNewW.Orientable(aCurW.Orientable()); + aNewW.Closed(aCurW.Closed()); + aNewW.Infinite(aCurW.Infinite()); + aNewW.Convex(aCurW.Convex()); + // + + myOldNewShapes.Bind(aCurW, aNewW); + } +} //======================================================================= //function : GeneratedShapes @@ -972,4 +1059,46 @@ const TopTools_DataMapOfShapeListOfShape& BRepFill_Generator::Generated() const return myMap; } +//======================================================================= +//function : Modified +//purpose : +//======================================================================= +TopoDS_Shape BRepFill_Generator::Modified (const TopoDS_Shape& theShape) const +{ + const TopoDS_Shape* aDSh = myOldNewShapes.Seek(theShape); + TopoDS_Shape aNsh = aDSh ? *aDSh : theShape; + TopoDS_Shape aPrevSh; + do + { + aPrevSh = aNsh; + aNsh = myReshaper.Value(aNsh); + } while (aNsh != aPrevSh); + 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 : +//======================================================================= +void BRepFill_Generator::SetMutableInput(const Standard_Boolean IsMutableInput) +{ + myMutableInput = IsMutableInput; +} +//======================================================================= +//function : GetMutableInput +//purpose : +//======================================================================= +Standard_Boolean BRepFill_Generator::GetMutableInput() const +{ + return myMutableInput; +} diff --git a/src/BRepFill/BRepFill_Generator.hxx b/src/BRepFill/BRepFill_Generator.hxx index 331ea1d111..0f902bf154 100644 --- a/src/BRepFill/BRepFill_Generator.hxx +++ b/src/BRepFill/BRepFill_Generator.hxx @@ -24,12 +24,13 @@ #include #include #include +#include #include +#include class TopoDS_Wire; class TopoDS_Shell; class TopoDS_Shape; - //! Compute a topological surface ( a shell) using //! generating wires. The face of the shell will be //! ruled surfaces passing by the wires. @@ -57,7 +58,15 @@ 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; + Standard_EXPORT void SetMutableInput(const Standard_Boolean IsMutableInput); + + Standard_EXPORT Standard_Boolean GetMutableInput() const; protected: @@ -73,7 +82,9 @@ private: TopTools_SequenceOfShape myWires; TopoDS_Shell myShell; TopTools_DataMapOfShapeListOfShape myMap; - + TopTools_DataMapOfShapeShape myOldNewShapes; + BRepTools_ReShape myReshaper; + Standard_Boolean myMutableInput; }; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index ddacd55679..819eada337 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -90,6 +90,9 @@ #include #include #include +#include +#include +#include //======================================================================= //function : PreciseUpar @@ -253,6 +256,7 @@ BRepOffsetAPI_ThruSections::BRepOffsetAPI_ThruSections(const Standard_Boolean is myDegen1(Standard_False), myDegen2(Standard_False) { myWCheck = Standard_True; + myMutableInput = Standard_True; //---------------------------- myParamType = Approx_ChordLength; myDegMax = 8; @@ -276,6 +280,7 @@ void BRepOffsetAPI_ThruSections::Init(const Standard_Boolean isSolid, const Stan myIsRuled = ruled; myPres3d = pres3d; myWCheck = Standard_True; + myMutableInput = Standard_True; //---------------------------- myParamType = Approx_ChordLength; myDegMax = 6; @@ -507,14 +512,17 @@ void BRepOffsetAPI_ThruSections::Build() void BRepOffsetAPI_ThruSections::CreateRuled() { Standard_Integer nbSects = myWires.Length(); - BRepFill_Generator aGene; + //?? should we clean myBFGenerator in some other places?? + myBFGenerator.Nullify(); + myBFGenerator = new BRepFill_Generator(); + myBFGenerator->SetMutableInput(GetMutableInput()); // for (Standard_Integer i=1; i<=nbSects; i++) { Standard_Integer i; for (i=1; i<=nbSects; i++) { - aGene.AddWire(TopoDS::Wire(myWires(i))); + myBFGenerator->AddWire(TopoDS::Wire(myWires(i))); } - aGene.Perform(); - TopoDS_Shell shell = aGene.Shell(); + myBFGenerator->Perform(); + TopoDS_Shell shell = myBFGenerator->Shell(); if (myIsSolid) { @@ -545,6 +553,13 @@ void BRepOffsetAPI_ThruSections::CreateRuled() TopoDS_Wire wire1 = TopoDS::Wire(myWires.First()); 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)); + myShape = MakeSolid(shell, wire1, wire2, myPres3d, myFirst, myLast); } @@ -585,19 +600,19 @@ void BRepOffsetAPI_ThruSections::CreateRuled() TopTools_MapOfShape MapFaces; if (degen2){ - TopoDS_Vertex Vdegen = TopExp::FirstVertex(TopoDS::Edge(edge2)); + TopoDS_Vertex Vdegen = TopoDS::Vertex(myBFGenerator->Modified(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(edge2)); it.More(); it.Next()) { + for (it.Initialize(M.FindFromKey(myBFGenerator->Modified(edge2))); it.More(); it.Next()) { MapFaces.Add(it.Value()); } } if (degen1) { - TopoDS_Vertex Vdegen = TopExp::FirstVertex(TopoDS::Edge(edge1)); + TopoDS_Vertex Vdegen = TopoDS::Vertex(myBFGenerator->Modified(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)) { @@ -607,7 +622,7 @@ void BRepOffsetAPI_ThruSections::CreateRuled() } } else { - for (it.Initialize(M.FindFromKey(edge1)); it.More(); it.Next()) { + for (it.Initialize(M.FindFromKey(myBFGenerator->Modified(edge1))); it.More(); it.Next()) { const TopoDS_Shape& Face = it.Value(); if (MapFaces.Contains(Face)) { myEdgeFace.Bind(edge1, Face); @@ -929,15 +944,60 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() Done(); } + TopTools_DataMapOfShapeReal aVToTol; TopExp_Explorer ex(myShape,TopAbs_EDGE); while (ex.More()) { - const TopoDS_Edge& CurE = TopoDS::Edge(ex.Current()); - B.SameRange(CurE, Standard_False); - B.SameParameter(CurE, Standard_False); - Standard_Real tol = BRep_Tool::Tolerance(CurE); - BRepLib::SameParameter(CurE,tol); + const TopoDS_Edge& aCurE = TopoDS::Edge(ex.Current()); + B.SameRange(aCurE, Standard_False); + B.SameParameter(aCurE, Standard_False); + Standard_Real aTol = BRep_Tool::Tolerance(aCurE); + if (myMutableInput) + BRepLib::SameParameter(aCurE,aTol); + else + { + //all edges from myShape can be safely updated/changed + //all vertices from myShape are the part of the original wires + Standard_Real aNewTol = -1; + BRepLib::SameParameter(aCurE, aTol, aNewTol, Standard_True); + if (aNewTol > 0) + { + TopoDS_Vertex aV1, aV2; + TopExp::Vertices(aCurE,aV1,aV2); + if (!aV1.IsNull()) + { + const Standard_Real* anOldTol = aVToTol.Seek(aV1); + if (!anOldTol || (anOldTol && *anOldTol < aNewTol)) + aVToTol.Bind(aV1,aNewTol); + } + if (!aV2.IsNull()) + { + const Standard_Real* anOldTol = aVToTol.Seek(aV2); + if (!anOldTol || (anOldTol && *anOldTol < aNewTol)) + aVToTol.Bind(aV2,aNewTol); + } + } + } ex.Next(); } + + if (!myMutableInput) + { + BRepTools_ReShape aReshaper; + TopTools_DataMapIteratorOfDataMapOfShapeReal itM(aVToTol); + for (;itM.More();itM.Next()) + { + const TopoDS_Vertex& aVert = TopoDS::Vertex(itM.Key()); + const Standard_Real& aNewToler = itM.Value(); + if (BRep_Tool::Tolerance(aVert) < aNewToler) + { + TopoDS_Vertex aNVert = TopoDS::Vertex(aVert.EmptyCopied()); + B.UpdateVertex(aNVert, aNewToler); + aReshaper.Replace(aVert, aNVert); + } + } + myShape = aReshaper.Apply(myShape); + //?? Modified(shape) is not present in this class + } } //======================================================================= @@ -1244,7 +1304,10 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) //we return the whole bunch of longitudinal edges TopExp::MapShapesAndAncestors(myShape, TopAbs_VERTEX, TopAbs_EDGE, VEmap); TopTools_IndexedMapOfShape Emap; - const TopTools_ListOfShape& Elist = VEmap.FindFromKey(S); + TopoDS_Shape aNewS = S; + if (myIsRuled && !myBFGenerator.IsNull()) + aNewS = myBFGenerator->Modified(S); + const TopTools_ListOfShape& Elist = VEmap.FindFromKey(aNewS); TopTools_ListIteratorOfListOfShape itl(Elist); for (; itl.More(); itl.Next()) { @@ -1256,8 +1319,8 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) //Comprehensive check for possible case of //one vertex for start and end degenerated sections: //we must take only outgoing or only ingoing edges - if ((IsDegen[0] && S.IsSame(VV[0])) || - (IsDegen[1] && S.IsSame(VV[1]))) + if ((IsDegen[0] && aNewS.IsSame(VV[0])) || + (IsDegen[1] && aNewS.IsSame(VV[1]))) Emap.Add(anEdge); } } @@ -1275,7 +1338,10 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) TopExp::LastVertex(anEdge) : TopExp::FirstVertex(anEdge); const TopTools_ListOfShape& EElist = VEmap.FindFromKey(aVertex); TopTools_IndexedMapOfShape EmapOfSection; - TopExp::MapShapes(myWires(IndOfSec), TopAbs_EDGE, EmapOfSection); + TopoDS_Shape aWsec = myWires(IndOfSec); + if (myIsRuled && !myBFGenerator.IsNull()) + aWsec = myBFGenerator->Modified(aWsec); + TopExp::MapShapes(aWsec, TopAbs_EDGE, EmapOfSection); TopoDS_Edge NextEdge; for (itl.Initialize(EElist); itl.More(); itl.Next()) { @@ -1305,6 +1371,9 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) 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); @@ -1488,7 +1557,23 @@ Standard_Boolean BRepOffsetAPI_ThruSections::UseSmoothing () const return myUseSmoothing; } +//======================================================================= +//function : SetMutableInput +//purpose : +//======================================================================= +void BRepOffsetAPI_ThruSections::SetMutableInput(const Standard_Boolean IsMutableInput) +{ + myMutableInput = IsMutableInput; +} +//======================================================================= +//function : GetMutableInput +//purpose : +//======================================================================= +Standard_Boolean BRepOffsetAPI_ThruSections::GetMutableInput() const +{ + return myMutableInput; +} diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx index 6de1f091f5..cbd8db5c2a 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx @@ -33,12 +33,13 @@ #include #include #include +#include class Standard_DomainError; class TopoDS_Wire; class TopoDS_Vertex; class TopoDS_Shape; class Geom_BSplineSurface; - +class BRepFill_Generator; //! Describes functions to build a loft. This is a shell or a //! solid passing through a set of sections in a given @@ -145,13 +146,16 @@ public: //! Returns the Face generated by each edge of the first wire Standard_EXPORT TopoDS_Shape GeneratedFace (const TopoDS_Shape& Edge) const; + Standard_EXPORT void SetMutableInput(const Standard_Boolean IsMutableInput); + //! Returns a list of new shapes generated from the shape //! S by the shell-generating algorithm. //! This function is redefined from BRepBuilderAPI_MakeShape::Generated. //! 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; + protected: @@ -192,7 +196,8 @@ private: Standard_Integer myDegMax; Standard_Real myCritWeights[3]; Standard_Boolean myUseSmoothing; - + Standard_Boolean myMutableInput; + NCollection_Handle myBFGenerator; }; diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx index 8f3b51f120..ad7bd03578 100644 --- a/src/BRepTest/BRepTest_SweepCommands.cxx +++ b/src/BRepTest/BRepTest_SweepCommands.cxx @@ -357,7 +357,7 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char* Standard_Boolean check = Standard_True; Standard_Boolean samenumber = Standard_True; Standard_Integer index = 2; - // Lecture option + // Lecture option if (!strcmp(a[1],"-N")) { if (n<7) return 1; check = Standard_False; @@ -375,29 +375,34 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char* Generator = 0; } Generator = new BRepOffsetAPI_ThruSections(issolid,isruled); - + Standard_Boolean IsMutableInput = Standard_True; Standard_Integer NbEdges = 0; Standard_Boolean IsFirstWire = Standard_False; for ( Standard_Integer i = index+2; i<= n-1 ; i++) { + if (!strcmp(a[i],"-save")) + { + IsMutableInput = Standard_False; + continue; + } Standard_Boolean IsWire = Standard_True; Shape = DBRep::Get(a[i], TopAbs_WIRE); if (!Shape.IsNull()) - { - Generator->AddWire(TopoDS::Wire(Shape)); - if (!IsFirstWire) - IsFirstWire = Standard_True; - else - IsFirstWire = Standard_False; - } + { + Generator->AddWire(TopoDS::Wire(Shape)); + if (!IsFirstWire) + IsFirstWire = Standard_True; + else + IsFirstWire = Standard_False; + } else - { - Shape = DBRep::Get(a[i], TopAbs_VERTEX); - IsWire = Standard_False; - if (!Shape.IsNull()) - Generator->AddVertex(TopoDS::Vertex(Shape)); - else - return 1; - } + { + Shape = DBRep::Get(a[i], TopAbs_VERTEX); + IsWire = Standard_False; + if (!Shape.IsNull()) + Generator->AddVertex(TopoDS::Vertex(Shape)); + else + return 1; + } Standard_Integer cpt = 0; TopExp_Explorer PE; @@ -408,10 +413,12 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char* NbEdges = cpt; else if (IsWire && cpt != NbEdges) - samenumber = Standard_False; - + samenumber = Standard_False; + } + Generator->SetMutableInput(IsMutableInput); + check = (check || !samenumber); Generator->CheckCompatibility(check); diff --git a/tests/thrusection/grids.list b/tests/thrusection/grids.list index 2d2da6b56c..681670312c 100644 --- a/tests/thrusection/grids.list +++ b/tests/thrusection/grids.list @@ -2,4 +2,5 @@ 002 not_solids 003 specific 004 bugs - +005 not_solids_locked006 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 new file mode 100644 index 0000000000..b8102c6489 --- /dev/null +++ b/tests/thrusection/not_solids_locked/A1 @@ -0,0 +1,7 @@ +restore [locate_data_file D1] w1 +restore [locate_data_file D1] w2 +ttranslate w2 0 20 0 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 200 diff --git a/tests/thrusection/not_solids_locked/B1 b/tests/thrusection/not_solids_locked/B1 new file mode 100644 index 0000000000..2f0ca68fab --- /dev/null +++ b/tests/thrusection/not_solids_locked/B1 @@ -0,0 +1,7 @@ +restore [locate_data_file D2] w1 +restore [locate_data_file D4] w2 +ttranslate w2 0 20 0 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 161.603 diff --git a/tests/thrusection/not_solids_locked/C1 b/tests/thrusection/not_solids_locked/C1 new file mode 100644 index 0000000000..722dbf3c33 --- /dev/null +++ b/tests/thrusection/not_solids_locked/C1 @@ -0,0 +1,7 @@ +restore [locate_data_file D4] w1 +restore [locate_data_file D1] w2 +ttranslate w2 0 20 0 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 200 diff --git a/tests/thrusection/not_solids_locked/D1 b/tests/thrusection/not_solids_locked/D1 new file mode 100644 index 0000000000..a526343aa5 --- /dev/null +++ b/tests/thrusection/not_solids_locked/D1 @@ -0,0 +1,7 @@ +restore [locate_data_file D5] w1 +restore [locate_data_file D4] w2 +ttranslate w2 0 20 0 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 161.603 diff --git a/tests/thrusection/not_solids_locked/F1 b/tests/thrusection/not_solids_locked/F1 new file mode 100644 index 0000000000..3a9d0c190e --- /dev/null +++ b/tests/thrusection/not_solids_locked/F1 @@ -0,0 +1,7 @@ +restore [locate_data_file C2] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2513.27 diff --git a/tests/thrusection/not_solids_locked/G1 b/tests/thrusection/not_solids_locked/G1 new file mode 100644 index 0000000000..db367bd1bd --- /dev/null +++ b/tests/thrusection/not_solids_locked/G1 @@ -0,0 +1,7 @@ +restore [locate_data_file C3] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2196.82 diff --git a/tests/thrusection/not_solids_locked/H1 b/tests/thrusection/not_solids_locked/H1 new file mode 100644 index 0000000000..bea18c1ad4 --- /dev/null +++ b/tests/thrusection/not_solids_locked/H1 @@ -0,0 +1,7 @@ +restore [locate_data_file C4] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2513.27 diff --git a/tests/thrusection/not_solids_locked/I1 b/tests/thrusection/not_solids_locked/I1 new file mode 100644 index 0000000000..836c4d8643 --- /dev/null +++ b/tests/thrusection/not_solids_locked/I1 @@ -0,0 +1,7 @@ +restore [locate_data_file C5] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2513.27 diff --git a/tests/thrusection/not_solids_locked/J1 b/tests/thrusection/not_solids_locked/J1 new file mode 100644 index 0000000000..2e607e33fd --- /dev/null +++ b/tests/thrusection/not_solids_locked/J1 @@ -0,0 +1,7 @@ +restore [locate_data_file C6] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2196.82 diff --git a/tests/thrusection/not_solids_locked/K1 b/tests/thrusection/not_solids_locked/K1 new file mode 100644 index 0000000000..1b887cd6a4 --- /dev/null +++ b/tests/thrusection/not_solids_locked/K1 @@ -0,0 +1,7 @@ +restore [locate_data_file C7] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/L1 b/tests/thrusection/not_solids_locked/L1 new file mode 100644 index 0000000000..c6e0914170 --- /dev/null +++ b/tests/thrusection/not_solids_locked/L1 @@ -0,0 +1,7 @@ +restore [locate_data_file C8] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/M1 b/tests/thrusection/not_solids_locked/M1 new file mode 100644 index 0000000000..2a98b501c9 --- /dev/null +++ b/tests/thrusection/not_solids_locked/M1 @@ -0,0 +1,7 @@ +restore [locate_data_file C9] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 1834.5 diff --git a/tests/thrusection/not_solids_locked/N1 b/tests/thrusection/not_solids_locked/N1 new file mode 100644 index 0000000000..9c03f09951 --- /dev/null +++ b/tests/thrusection/not_solids_locked/N1 @@ -0,0 +1,7 @@ +restore [locate_data_file C10] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/O1 b/tests/thrusection/not_solids_locked/O1 new file mode 100644 index 0000000000..b20d314288 --- /dev/null +++ b/tests/thrusection/not_solids_locked/O1 @@ -0,0 +1,7 @@ +restore [locate_data_file C11] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/P1 b/tests/thrusection/not_solids_locked/P1 new file mode 100644 index 0000000000..1a48455680 --- /dev/null +++ b/tests/thrusection/not_solids_locked/P1 @@ -0,0 +1,7 @@ +restore [locate_data_file C12] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 1834.5 diff --git a/tests/thrusection/not_solids_locked/Q1 b/tests/thrusection/not_solids_locked/Q1 new file mode 100644 index 0000000000..bc072dfaa3 --- /dev/null +++ b/tests/thrusection/not_solids_locked/Q1 @@ -0,0 +1,6 @@ +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 +checkprops result -s 1295.31 diff --git a/tests/thrusection/not_solids_locked/R1 b/tests/thrusection/not_solids_locked/R1 new file mode 100644 index 0000000000..5a0df7bf1f --- /dev/null +++ b/tests/thrusection/not_solids_locked/R1 @@ -0,0 +1,7 @@ +restore [locate_data_file C1] w1 +restore [locate_data_file C10] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/S1 b/tests/thrusection/not_solids_locked/S1 new file mode 100644 index 0000000000..61f5a46a35 --- /dev/null +++ b/tests/thrusection/not_solids_locked/S1 @@ -0,0 +1,7 @@ +restore [locate_data_file C3] w1 +restore [locate_data_file C11] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 1690.09 diff --git a/tests/thrusection/not_solids_locked/T1 b/tests/thrusection/not_solids_locked/T1 new file mode 100644 index 0000000000..b5359a7ead --- /dev/null +++ b/tests/thrusection/not_solids_locked/T1 @@ -0,0 +1,7 @@ +restore [locate_data_file C5] w1 +restore [locate_data_file C12] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 1834.5 diff --git a/tests/thrusection/not_solids_locked/U1 b/tests/thrusection/not_solids_locked/U1 new file mode 100644 index 0000000000..fd1216b6f7 --- /dev/null +++ b/tests/thrusection/not_solids_locked/U1 @@ -0,0 +1,6 @@ +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 +checkprops result -s 762.417 diff --git a/tests/thrusection/not_solids_locked/V1 b/tests/thrusection/not_solids_locked/V1 new file mode 100644 index 0000000000..111b2ca6e9 --- /dev/null +++ b/tests/thrusection/not_solids_locked/V1 @@ -0,0 +1,7 @@ +restore [locate_data_file C10] w1 +restore [locate_data_file C10] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 1507.96 diff --git a/tests/thrusection/not_solids_locked/W1 b/tests/thrusection/not_solids_locked/W1 new file mode 100644 index 0000000000..06d4859ca8 --- /dev/null +++ b/tests/thrusection/not_solids_locked/W1 @@ -0,0 +1,7 @@ +restore [locate_data_file C12] w1 +restore [locate_data_file C11] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -save +checkprops result -s 1314 diff --git a/tests/thrusection/not_solids_locked/W8 b/tests/thrusection/not_solids_locked/W8 new file mode 100644 index 0000000000..337bb1dc6c --- /dev/null +++ b/tests/thrusection/not_solids_locked/W8 @@ -0,0 +1,6 @@ +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 +checkprops result -s 254109 diff --git a/tests/thrusection/solids_locked/A1 b/tests/thrusection/solids_locked/A1 new file mode 100644 index 0000000000..037ef2b756 --- /dev/null +++ b/tests/thrusection/solids_locked/A1 @@ -0,0 +1,11 @@ +restore [locate_data_file cts21295_1.brep] f1 +restore [locate_data_file cts21295_2.brep] f2 +restore [locate_data_file cts21295_3.brep] f3 +explode f1 w +explode f2 w +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 +checkprops result -s 49757.1 diff --git a/tests/thrusection/solids_locked/A2 b/tests/thrusection/solids_locked/A2 new file mode 100644 index 0000000000..2842046725 --- /dev/null +++ b/tests/thrusection/solids_locked/A2 @@ -0,0 +1,6 @@ +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 +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A3 b/tests/thrusection/solids_locked/A3 new file mode 100644 index 0000000000..9e0b83a24f --- /dev/null +++ b/tests/thrusection/solids_locked/A3 @@ -0,0 +1,6 @@ +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 +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A4 b/tests/thrusection/solids_locked/A4 new file mode 100644 index 0000000000..41e264e575 --- /dev/null +++ b/tests/thrusection/solids_locked/A4 @@ -0,0 +1,7 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w1 w2 -save +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A5 b/tests/thrusection/solids_locked/A5 new file mode 100644 index 0000000000..ba5c430352 --- /dev/null +++ b/tests/thrusection/solids_locked/A5 @@ -0,0 +1,7 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w2 w1 -save +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A6 b/tests/thrusection/solids_locked/A6 new file mode 100644 index 0000000000..8cfffe962b --- /dev/null +++ b/tests/thrusection/solids_locked/A6 @@ -0,0 +1,8 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +orientation w2 R +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w1 w2 -save +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A7 b/tests/thrusection/solids_locked/A7 new file mode 100644 index 0000000000..5347189795 --- /dev/null +++ b/tests/thrusection/solids_locked/A7 @@ -0,0 +1,8 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +orientation w2 R +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w2 w1 -save +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A8 b/tests/thrusection/solids_locked/A8 new file mode 100644 index 0000000000..4b3c95202a --- /dev/null +++ b/tests/thrusection/solids_locked/A8 @@ -0,0 +1,9 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +orientation w2 R +orientation w1 R +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w1 w2 -save +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A9 b/tests/thrusection/solids_locked/A9 new file mode 100644 index 0000000000..553f83545c --- /dev/null +++ b/tests/thrusection/solids_locked/A9 @@ -0,0 +1,9 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +orientation w2 R +orientation w1 R +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w2 w1 -save +checkprops result -s 29817.5 diff --git a/tests/thrusection/specific_locked/A1 b/tests/thrusection/specific_locked/A1 new file mode 100644 index 0000000000..a25d7c7390 --- /dev/null +++ b/tests/thrusection/specific_locked/A1 @@ -0,0 +1,55 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v3 +# | \ +# | \ +# | \ +# | \ +# | /* v2 +# | / +# | / * v4, v5 +# | / +# * +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 0 10 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +set issolid 0 +set isruled 1 +setflags w1 locked +setflags v4 locked +setflags v5 locked + +thrusections result ${issolid} ${isruled} v4 w1 v5 -save + + +checkprops result -s 490.101 + +checknbshapes result -vertex 5 -edge 9 -wire 6 -face 6 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 27 +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" +} + + diff --git a/tests/thrusection/specific_locked/A2 b/tests/thrusection/specific_locked/A2 new file mode 100644 index 0000000000..801df566ee --- /dev/null +++ b/tests/thrusection/specific_locked/A2 @@ -0,0 +1,59 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v3 +# | \ +# | \ +# | \ +# | \ +# | /* v2 +# | / +# | / * v4, v5 +# | / +# * +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 0 10 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +set issolid 1 +set isruled 1 +thrusections result ${issolid} ${isruled} v4 w1 v5 -save + + +checkprops result -s 490.101 + + +checknbshapes result -vertex 5 -edge 9 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 28 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A3 b/tests/thrusection/specific_locked/A3 new file mode 100644 index 0000000000..5f40b36f6b --- /dev/null +++ b/tests/thrusection/specific_locked/A3 @@ -0,0 +1,59 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v3 +# | \ +# | \ +# | \ +# | \ +# | /* v2 +# | / +# | / * v4, v5 +# | / +# * +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 0 10 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +thrusections result ${issolid} ${isruled} v4 w1 v5 -save + + +checkprops result -s 651.466 + +checknbshapes result -vertex 2 -edge 9 -wire 3 -face 3 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 18 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A4 b/tests/thrusection/specific_locked/A4 new file mode 100644 index 0000000000..5cd7c0597b --- /dev/null +++ b/tests/thrusection/specific_locked/A4 @@ -0,0 +1,60 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v3 +# | \ +# | \ +# | \ +# | \ +# | /* v2 +# | / +# | / * v4, v5 +# | / +# * +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 0 10 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + + +set issolid 1 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 v5 -save + + +checkprops result -s 651.466 + + +checknbshapes result -vertex 2 -edge 9 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 19 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A6 b/tests/thrusection/specific_locked/A6 new file mode 100644 index 0000000000..d504aee1a4 --- /dev/null +++ b/tests/thrusection/specific_locked/A6 @@ -0,0 +1,55 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v2 +# / \ +# / \ +# / * \ +# / v4, v5 \ +# *----------------* v3 +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 10 0 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +set issolid 1 +set isruled 1 +thrusections result ${issolid} ${isruled} v4 w1 v5 -save + + +checkprops result -s 485.502 + + +checknbshapes result -vertex 5 -edge 9 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 28 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A7 b/tests/thrusection/specific_locked/A7 new file mode 100644 index 0000000000..3179e5921d --- /dev/null +++ b/tests/thrusection/specific_locked/A7 @@ -0,0 +1,55 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v2 +# / \ +# / \ +# / * \ +# / v4, v5 \ +# *----------------* v3 +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 10 0 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +thrusections result ${issolid} ${isruled} v4 w1 v5 -save + + +checkprops result -s 646.621 + +checknbshapes result -vertex 2 -edge 9 -wire 3 -face 3 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 18 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A8 b/tests/thrusection/specific_locked/A8 new file mode 100644 index 0000000000..af1eaa46aa --- /dev/null +++ b/tests/thrusection/specific_locked/A8 @@ -0,0 +1,55 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v2 +# / \ +# / \ +# / * \ +# / v4, v5 \ +# *----------------* v3 +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 10 0 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +set issolid 1 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 v5 -save + + +checkprops result -s 646.621 + + +checknbshapes result -vertex 2 -edge 9 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 19 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B1 b/tests/thrusection/specific_locked/B1 new file mode 100644 index 0000000000..09bc3fe87b --- /dev/null +++ b/tests/thrusection/specific_locked/B1 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 1 +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 1404.96 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B2 b/tests/thrusection/specific_locked/B2 new file mode 100644 index 0000000000..79cc971193 --- /dev/null +++ b/tests/thrusection/specific_locked/B2 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 1829.23 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B3 b/tests/thrusection/specific_locked/B3 new file mode 100644 index 0000000000..afc25febfd --- /dev/null +++ b/tests/thrusection/specific_locked/B3 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 1829.23 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B5 b/tests/thrusection/specific_locked/B5 new file mode 100644 index 0000000000..5a28837a5f --- /dev/null +++ b/tests/thrusection/specific_locked/B5 @@ -0,0 +1,41 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 2160.94 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B6 b/tests/thrusection/specific_locked/B6 new file mode 100644 index 0000000000..2cd15534f5 --- /dev/null +++ b/tests/thrusection/specific_locked/B6 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 2556.25 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B7 b/tests/thrusection/specific_locked/B7 new file mode 100644 index 0000000000..564494b89b --- /dev/null +++ b/tests/thrusection/specific_locked/B7 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 2556.25 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B9 b/tests/thrusection/specific_locked/B9 new file mode 100644 index 0000000000..6c044c8032 --- /dev/null +++ b/tests/thrusection/specific_locked/B9 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 1021.13 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C1 b/tests/thrusection/specific_locked/C1 new file mode 100644 index 0000000000..480f35765e --- /dev/null +++ b/tests/thrusection/specific_locked/C1 @@ -0,0 +1,36 @@ +puts "============" +puts "OCC7166" +puts "============" +####################################################################### +# Improvement of API of ThruSection +####################################################################### +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 0 +set isruled 0 +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 1346.42 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C2 b/tests/thrusection/specific_locked/C2 new file mode 100644 index 0000000000..c55c29120e --- /dev/null +++ b/tests/thrusection/specific_locked/C2 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save } + + +checkprops result -s 1346.42 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C4 b/tests/thrusection/specific_locked/C4 new file mode 100644 index 0000000000..e5d893a186 --- /dev/null +++ b/tests/thrusection/specific_locked/C4 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 1353.78 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C5 b/tests/thrusection/specific_locked/C5 new file mode 100644 index 0000000000..26a4c500a1 --- /dev/null +++ b/tests/thrusection/specific_locked/C5 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 1683.87 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C6 b/tests/thrusection/specific_locked/C6 new file mode 100644 index 0000000000..6346fa977a --- /dev/null +++ b/tests/thrusection/specific_locked/C6 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 1683.87 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C8 b/tests/thrusection/specific_locked/C8 new file mode 100644 index 0000000000..095a211a41 --- /dev/null +++ b/tests/thrusection/specific_locked/C8 @@ -0,0 +1,41 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 449.295 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C9 b/tests/thrusection/specific_locked/C9 new file mode 100644 index 0000000000..8463b7ec57 --- /dev/null +++ b/tests/thrusection/specific_locked/C9 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 597.473 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D1 b/tests/thrusection/specific_locked/D1 new file mode 100644 index 0000000000..3fe1b5d57a --- /dev/null +++ b/tests/thrusection/specific_locked/D1 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 0 +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save } + + +checkprops result -s 597.473 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D3 b/tests/thrusection/specific_locked/D3 new file mode 100644 index 0000000000..143442064a --- /dev/null +++ b/tests/thrusection/specific_locked/D3 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 740.079 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D4 b/tests/thrusection/specific_locked/D4 new file mode 100644 index 0000000000..bdccabb803 --- /dev/null +++ b/tests/thrusection/specific_locked/D4 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 881.045 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D5 b/tests/thrusection/specific_locked/D5 new file mode 100644 index 0000000000..ecd4aec76d --- /dev/null +++ b/tests/thrusection/specific_locked/D5 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 881.045 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D7 b/tests/thrusection/specific_locked/D7 new file mode 100644 index 0000000000..d6e945a8b8 --- /dev/null +++ b/tests/thrusection/specific_locked/D7 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 245.485 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D8 b/tests/thrusection/specific_locked/D8 new file mode 100644 index 0000000000..48aed94cd3 --- /dev/null +++ b/tests/thrusection/specific_locked/D8 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 327.161 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D9 b/tests/thrusection/specific_locked/D9 new file mode 100644 index 0000000000..202223ebc3 --- /dev/null +++ b/tests/thrusection/specific_locked/D9 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 327.161 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E1 b/tests/thrusection/specific_locked/E1 new file mode 100644 index 0000000000..e767e05261 --- /dev/null +++ b/tests/thrusection/specific_locked/E1 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 1 +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 400.925 + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 13 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E2 b/tests/thrusection/specific_locked/E2 new file mode 100644 index 0000000000..94a2bca2b3 --- /dev/null +++ b/tests/thrusection/specific_locked/E2 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 400.925 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E3 b/tests/thrusection/specific_locked/E3 new file mode 100644 index 0000000000..fc56b058ac --- /dev/null +++ b/tests/thrusection/specific_locked/E3 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 478.063 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E4 b/tests/thrusection/specific_locked/E4 new file mode 100644 index 0000000000..eb32f5835d --- /dev/null +++ b/tests/thrusection/specific_locked/E4 @@ -0,0 +1,42 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -save} + + +checkprops result -s 422.859 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E6 b/tests/thrusection/specific_locked/E6 new file mode 100644 index 0000000000..587caeb937 --- /dev/null +++ b/tests/thrusection/specific_locked/E6 @@ -0,0 +1,156 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 55 2.5 ${z4} +# ending vertex +vertex v5 55 2.5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + + +# +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v4 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save + + +checkprops result -s 12651.5 + + +checknbshapes result -vertex 57 -edge 121 -wire 66 -face 66 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 312 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E7 b/tests/thrusection/specific_locked/E7 new file mode 100644 index 0000000000..46c2b01c54 --- /dev/null +++ b/tests/thrusection/specific_locked/E7 @@ -0,0 +1,155 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 55 2.5 ${z4} +# ending vertex +vertex v5 55 2.5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + +# +set issolid 0 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save + + +checkprops result -s 56691.9 + +checknbshapes result -vertex 2 -edge 33 -wire 11 -face 11 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 58 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E8 b/tests/thrusection/specific_locked/E8 new file mode 100644 index 0000000000..e2fd082fde --- /dev/null +++ b/tests/thrusection/specific_locked/E8 @@ -0,0 +1,156 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 55 2.5 ${z4} +# ending vertex +vertex v5 55 2.5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + +# +set issolid 1 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save + + +checkprops result -s 56691.9 + + +checknbshapes result -vertex 2 -edge 33 -wire 11 -face 11 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 59 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F1 b/tests/thrusection/specific_locked/F1 new file mode 100644 index 0000000000..34f3668e21 --- /dev/null +++ b/tests/thrusection/specific_locked/F1 @@ -0,0 +1,155 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 2.5 5 ${z4} +# ending vertex +vertex v5 2.5 5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + + +# +set issolid 1 +set isruled 1 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save + + +checkprops result -s 12301.8 + + +checknbshapes result -vertex 57 -edge 121 -wire 66 -face 66 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 312 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F2 b/tests/thrusection/specific_locked/F2 new file mode 100644 index 0000000000..d9041b7d1a --- /dev/null +++ b/tests/thrusection/specific_locked/F2 @@ -0,0 +1,156 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 2.5 5 ${z4} +# ending vertex +vertex v5 2.5 5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + + +# +set issolid 0 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save + + +checkprops result -s 37693.9 + +checknbshapes result -vertex 2 -edge 33 -wire 11 -face 11 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 58 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F3 b/tests/thrusection/specific_locked/F3 new file mode 100644 index 0000000000..fa90c0ffb3 --- /dev/null +++ b/tests/thrusection/specific_locked/F3 @@ -0,0 +1,157 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 2.5 5 ${z4} +# ending vertex +vertex v5 2.5 5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + + +# +set issolid 1 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -save + + +checkprops result -s 37693.9 + + +checknbshapes result -vertex 2 -edge 33 -wire 11 -face 11 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 59 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F5 b/tests/thrusection/specific_locked/F5 new file mode 100644 index 0000000000..893604106d --- /dev/null +++ b/tests/thrusection/specific_locked/F5 @@ -0,0 +1,50 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 0 0 20 +#vertex v2 0 0 -20 +circle c1 0 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 0 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 1 +set isruled 1 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2} +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save} + + +checkprops result -s 256.875 + + +checknbshapes result -vertex 6 -edge 10 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 30 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F6 b/tests/thrusection/specific_locked/F6 new file mode 100644 index 0000000000..ddb804d57d --- /dev/null +++ b/tests/thrusection/specific_locked/F6 @@ -0,0 +1,50 @@ +puts "TODO OCC7166 ALL: Faulty OCC7166 : result is not Closed shape" +puts "TODO OCC7166 ALL: Error : is WRONG because number of " + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 0 0 20 +#vertex v2 0 0 -20 +circle c1 0 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 0 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 0 +set isruled 0 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2} +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save} + + +checkprops result -s 332.724 + +checknbshapes result -vertex 4 -edge 6 -wire 2 -face 2 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 15 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F7 b/tests/thrusection/specific_locked/F7 new file mode 100644 index 0000000000..2bac73de60 --- /dev/null +++ b/tests/thrusection/specific_locked/F7 @@ -0,0 +1,51 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +##vertex v1 0 0 20 +#vertex v2 0 0 -20 +circle c1 0 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 0 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 1 +set isruled 0 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2 } +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save} + + +checkprops result -s 314.974 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F9 b/tests/thrusection/specific_locked/F9 new file mode 100644 index 0000000000..1006e771ad --- /dev/null +++ b/tests/thrusection/specific_locked/F9 @@ -0,0 +1,51 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 40 0 20 +#vertex v2 40 0 -20 +circle c1 40 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 40 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 1 +set isruled 1 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2} +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save} + + +checkprops result -s 419.166 + + +checknbshapes result -vertex 6 -edge 10 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 30 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/G1 b/tests/thrusection/specific_locked/G1 new file mode 100644 index 0000000000..8907d120c0 --- /dev/null +++ b/tests/thrusection/specific_locked/G1 @@ -0,0 +1,51 @@ +puts "TODO OCC7166 ALL: Faulty OCC7166 : result is not Closed shape" +puts "TODO OCC7166 ALL: Error : is WRONG because number of " +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 40 0 20 +#vertex v2 40 0 -20 +circle c1 40 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 40 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 0 +set isruled 0 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2} +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save} + + +checkprops result -s 702.858 + +checknbshapes result -vertex 4 -edge 6 -wire 2 -face 2 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 15 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/G2 b/tests/thrusection/specific_locked/G2 new file mode 100644 index 0000000000..9355ae2c31 --- /dev/null +++ b/tests/thrusection/specific_locked/G2 @@ -0,0 +1,51 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 40 0 20 +#vertex v2 40 0 -20 +circle c1 40 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 40 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 1 +set isruled 0 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2 } +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -save} + + +checkprops result -s 702.921 + + +checknbshapes result -vertex 4 -edge 6 -wire 4 -face 4 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 20 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/G4 b/tests/thrusection/specific_locked/G4 new file mode 100644 index 0000000000..c6f22d5ae3 --- /dev/null +++ b/tests/thrusection/specific_locked/G4 @@ -0,0 +1,183 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 +set z5 30 +set z6 10 + +# begining vertex +vertex v4 55 2.5 ${z4} +# ending vertex +vertex v5 55 2.5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top beziercurve +beziercurve bzc1 5 5 5 ${z5} 5 -5 ${z5} -5 -5 ${z5} -5 5 ${z5} 5 5 ${z5} +mkedge ebzc1 bzc1 +wire wbzc1 ebzc1 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top pbsplinecurve +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 ${z6} 1 -2 2 ${z6} 1 0 1 ${z6} 1 2 2 ${z6} 1 1 0 ${z6} 1 2 -2 ${z6} 1 0 -1 ${z6} 1 -2 -2 ${z6} 1 +mkedge epbc1 pbc1 +wire wpbc1 epbc1 + +# octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom pbsplinecurve +pbsplinecurve pbc2 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 -${z6} 1 -2 2 -${z6} 1 0 1 -${z6} 1 2 2 -${z6} 1 1 0 -${z6} 1 2 -2 -${z6} 1 0 -1 -${z6} 1 -2 -2 -${z6} 1 +mkedge epbc2 pbc2 +wire wpbc2 epbc2 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom beziercurve +beziercurve bzc2 5 5 5 -${z5} 5 -5 -${z5} -5 -5 -${z5} -5 5 -${z5} 5 5 -${z5} +mkedge ebzc2 bzc2 +wire wbzc2 ebzc2 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags wbzc1 locked +setflags w11 locked +setflags wpbc1 locked +setflags wpbc2 locked +setflags w111 locked +setflags wbzc2 locked +setflags w101 locked +setflags v5 locked +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 + + +checkprops result -s 12786.5 + + +checknbshapes result -vertex 101 -edge 209 -wire 110 -face 110 -shell 1 -solid 2 -compsolid 0 -compound 0 -shape 532 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/G6 b/tests/thrusection/specific_locked/G6 new file mode 100644 index 0000000000..d1dc6163c7 --- /dev/null +++ b/tests/thrusection/specific_locked/G6 @@ -0,0 +1,181 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 +set z5 30 +set z6 10 + +# begining vertex +vertex v4 2.5 5 ${z4} +# ending vertex +vertex v5 2.5 5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top beziercurve +beziercurve bzc1 5 5 5 ${z5} 5 -5 ${z5} -5 -5 ${z5} -5 5 ${z5} 5 5 ${z5} +mkedge ebzc1 bzc1 +wire wbzc1 ebzc1 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top pbsplinecurve +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 ${z6} 1 -2 2 ${z6} 1 0 1 ${z6} 1 2 2 ${z6} 1 1 0 ${z6} 1 2 -2 ${z6} 1 0 -1 ${z6} 1 -2 -2 ${z6} 1 +mkedge epbc1 pbc1 +wire wpbc1 epbc1 + +# octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom pbsplinecurve +pbsplinecurve pbc2 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 -${z6} 1 -2 2 -${z6} 1 0 1 -${z6} 1 2 2 -${z6} 1 1 0 -${z6} 1 2 -2 -${z6} 1 0 -1 -${z6} 1 -2 -2 -${z6} 1 +mkedge epbc2 pbc2 +wire wpbc2 epbc2 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom beziercurve +beziercurve bzc2 5 5 5 -${z5} 5 -5 -${z5} -5 -5 -${z5} -5 5 -${z5} 5 5 -${z5} +mkedge ebzc2 bzc2 +wire wbzc2 ebzc2 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags wbzc1 locked +setflags w11 locked +setflags wpbc1 locked +setflags w21 locked +setflags wpbc2 locked +setflags w111 locked +setflags wbzc2 locked +setflags w101 locked +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 + + +checkprops result -s 12436.8 + + +checknbshapes result -vertex 101 -edge 209 -wire 110 -face 110 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 532 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + -- 2.39.5