diff --git a/src/ApplicationFramework/TKTObj/GTests/TObj_Model_Test.cxx b/src/ApplicationFramework/TKTObj/GTests/TObj_Model_Test.cxx index 9152791e66..8902656345 100644 --- a/src/ApplicationFramework/TKTObj/GTests/TObj_Model_Test.cxx +++ b/src/ApplicationFramework/TKTObj/GTests/TObj_Model_Test.cxx @@ -507,3 +507,31 @@ TEST_F(TObj_ObjectTest, FindObject_ByName) ASSERT_FALSE(aFound.IsNull()); EXPECT_EQ(anObj.get(), aFound.get()); } + +// OCC31320: TObj - method TObj_Object::GetFatherObject() is not protected against deleted object +// After detaching a parent object, GetFatherObject() on its child must return null. +TEST_F(TObj_ObjectTest, OCC31320_GetFatherObject_ReturnsNull_AfterParentDetach) +{ + // Create the parent object inside the model partition. + myModel->OpenCommand(); + occ::handle aParent = createObject(); + ASSERT_FALSE(aParent.IsNull()); + myModel->CommitCommand(); + + // Create a child object on a sub-label of the parent's child collection. + myModel->OpenCommand(); + TDF_Label aChildLabel = aParent->GetChildLabel().NewChild(); + occ::handle aChild = new TObj_TestObject(aChildLabel); + ASSERT_FALSE(aChild.IsNull()); + myModel->CommitCommand(); + + // Detach the parent - this is what the original bug was about. + myModel->OpenCommand(); + EXPECT_TRUE(aParent->Detach()); + myModel->CommitCommand(); + + // After the parent is detached its TObj attributes are gone, + // so GetFatherObject() traversing up must return null, not crash. + occ::handle aFather = aChild->GetFatherObject(); + EXPECT_TRUE(aFather.IsNull()); +} diff --git a/src/DataExchange/TKDESTEP/GTests/FILES.cmake b/src/DataExchange/TKDESTEP/GTests/FILES.cmake index 5c9e8bce83..4f31aa4e06 100644 --- a/src/DataExchange/TKDESTEP/GTests/FILES.cmake +++ b/src/DataExchange/TKDESTEP/GTests/FILES.cmake @@ -16,4 +16,5 @@ set(OCCT_TKDESTEP_GTests_FILES StepTidy_VectorReducer_Test.cxx StepToTopoDS_TranslateFace_Test.cxx StepTransientReplacements_Test.cxx + STEPCAFControl_Controller_Test.cxx ) diff --git a/src/DataExchange/TKDESTEP/GTests/STEPCAFControl_Controller_Test.cxx b/src/DataExchange/TKDESTEP/GTests/STEPCAFControl_Controller_Test.cxx new file mode 100644 index 0000000000..a9194801e7 --- /dev/null +++ b/src/DataExchange/TKDESTEP/GTests/STEPCAFControl_Controller_Test.cxx @@ -0,0 +1,308 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Test OCC33657 (case 1): STEPCAFControl_Reader and STEPCAFControl_Writer constructors +// can be created and destroyed in parallel without crashing. +TEST(STEPCAFControl_ControllerTest, OCC33657_ParallelConstructors) +{ + STEPCAFControl_Controller::Init(); + EXPECT_NO_FATAL_FAILURE(OSD_Parallel::For(0, 1000, [](int) { + STEPCAFControl_Reader aReader; + aReader.SetColorMode(true); + STEPCAFControl_Writer aWriter; + aWriter.SetDimTolMode(true); + })); +} + +// Test OCC33657 (case 3): STEPControl_Writer can write in parallel to in-memory buffers. +// Each thread creates its own shape and writer to avoid shared-state issues. +TEST(STEPCAFControl_ControllerTest, OCC33657_ParallelWritersToBuffer) +{ + STEPCAFControl_Controller::Init(); + std::atomic allOk{true}; + EXPECT_NO_FATAL_FAILURE(OSD_Parallel::For(0, 100, [&](int) { + const TopoDS_Shape aShape = BRepPrimAPI_MakeBox(10.0, 20.0, 30.0).Shape(); + STEPControl_Writer aWriter; + aWriter.SetShapeFixParameters(DESTEP_Parameters::GetDefaultShapeFixParameters()); + aWriter.Transfer(aShape, STEPControl_StepModelType::STEPControl_AsIs, DESTEP_Parameters{}); + std::ostringstream aStream; + aWriter.WriteStream(aStream); + if (aStream.str().empty()) + allOk = false; + })); + EXPECT_TRUE(allOk); +} + +// Test OCC33657 (case 2): STEPControl_Reader can read a STEP stream in parallel without crashing. +TEST(STEPCAFControl_ControllerTest, OCC33657_ParallelReadersFromStream) +{ + STEPCAFControl_Controller::Init(); + + // Write a box to a STEP stream once, then read it in parallel. + const TopoDS_Shape aShape = BRepPrimAPI_MakeBox(10.0, 20.0, 30.0).Shape(); + STEPControl_Writer aWriter; + aWriter.Transfer(aShape, STEPControl_StepModelType::STEPControl_AsIs, DESTEP_Parameters{}); + std::ostringstream anOutStream; + aWriter.WriteStream(anOutStream); + const std::string aStepContent = anOutStream.str(); + ASSERT_FALSE(aStepContent.empty()) << "STEP content should not be empty"; + + EXPECT_NO_FATAL_FAILURE(OSD_Parallel::For(0, 100, [&](int) { + std::istringstream anInStream(aStepContent); + STEPControl_Reader aReader; + aReader.ReadStream("", DESTEP_Parameters{}, anInStream); + aReader.TransferRoots(); + })); +} + +// Test OCC33657 (case 4): STEPControl_Writer and STEPControl_Reader work in parallel +// and produce a shape with the same topology as the source. +TEST(STEPCAFControl_ControllerTest, OCC33657_ParallelReadersAndWriters) +{ + STEPCAFControl_Controller::Init(); + + // Acquire source shape and analyze its topology. + const TopoDS_Shape aSourceShape = BRepPrimAPI_MakeBox(10.0, 20.0, 30.0).Shape(); + ShapeAnalysis_ShapeContents aSourceAnalyzer; + aSourceAnalyzer.Perform(aSourceShape); + + std::atomic allOk{true}; + EXPECT_NO_FATAL_FAILURE(OSD_Parallel::For(0, 100, [&](int) { + if (!allOk.load(std::memory_order_relaxed)) + return; + + // Write source shape to a per-thread stream. + STEPControl_Writer aWriter; + aWriter.Transfer(aSourceShape, + STEPControl_StepModelType::STEPControl_AsIs, + DESTEP_Parameters{}); + std::ostringstream anOutStream; + aWriter.WriteStream(anOutStream); + + // Read it back and compare topology counts. + std::istringstream anInStream(anOutStream.str()); + STEPControl_Reader aReader; + aReader.ReadStream("", DESTEP_Parameters{}, anInStream); + aReader.TransferRoots(); + const TopoDS_Shape aResultShape = aReader.OneShape(); + + ShapeAnalysis_ShapeContents aResultAnalyzer; + aResultAnalyzer.Perform(aResultShape); + + if (aSourceAnalyzer.NbSolids() != aResultAnalyzer.NbSolids() + || aSourceAnalyzer.NbShells() != aResultAnalyzer.NbShells() + || aSourceAnalyzer.NbFaces() != aResultAnalyzer.NbFaces() + || aSourceAnalyzer.NbWires() != aResultAnalyzer.NbWires() + || aSourceAnalyzer.NbEdges() != aResultAnalyzer.NbEdges() + || aSourceAnalyzer.NbVertices() != aResultAnalyzer.NbVertices()) + { + allOk.store(false, std::memory_order_relaxed); + } + })); + EXPECT_TRUE(allOk); +} + +// Test OCC23951: STEPCAFControl_Writer can write an XCAF document with a box +// whose visibility is set to false. Verifies the write completes successfully. +TEST(STEPCAFControl_ControllerTest, OCC23951_WriteDocumentWithVisibility) +{ + STEPCAFControl_Controller::Init(); + + occ::handle aDoc = new TDocStd_Document("dummy"); + const TopoDS_Shape aBox = BRepPrimAPI_MakeBox(1, 1, 1).Shape(); + + occ::handle aShapeTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + TDF_Label aLab1 = aShapeTool->NewShape(); + aShapeTool->SetShape(aLab1, aBox); + TDataStd_Name::Set(aLab1, "Box1"); + + Quantity_Color aYellow(Quantity_NOC_YELLOW); + XCAFDoc_DocumentTool::ColorTool(aDoc->Main())->SetColor(aLab1, aYellow, XCAFDoc_ColorGen); + XCAFDoc_DocumentTool::ColorTool(aDoc->Main())->SetVisibility(aLab1, false); + + STEPCAFControl_Writer aWriter; + ASSERT_TRUE(aWriter.Transfer(aDoc)) << "Transfer failed"; + + std::ostringstream aStream; + const IFSelect_ReturnStatus aStatus = aWriter.WriteStream(aStream); + EXPECT_EQ(aStatus, IFSelect_RetDone) << "WriteStream did not return RetDone"; + EXPECT_FALSE(aStream.str().empty()) << "Written STEP stream should not be empty"; + + // Verify yellow color and INVISIBILITY entity are encoded in the STEP stream. + // STEP writes predefined colors using DRAUGHTING_PRE_DEFINED_COLOUR, not COLOUR_RGB. + const std::string aContent = aStream.str(); + EXPECT_NE(aContent.find("DRAUGHTING_PRE_DEFINED_COLOUR('yellow')"), std::string::npos) + << "Yellow DRAUGHTING_PRE_DEFINED_COLOUR entity not found in STEP stream"; + EXPECT_NE(aContent.find("INVISIBILITY"), std::string::npos) + << "INVISIBILITY entity not found in STEP stream"; + + // Read back the written stream into an XCAF document and verify shape topology. + std::istringstream anInStream(aContent); + occ::handle aReadDoc = new TDocStd_Document("dummy"); + STEPCAFControl_Reader aCafReader; + aCafReader.SetColorMode(true); + ASSERT_EQ(aCafReader.ReadStream("", anInStream), IFSelect_RetDone) + << "ReadStream failed on written STEP content"; + ASSERT_TRUE(aCafReader.Transfer(aReadDoc)) << "Transfer to XCAF document failed"; + + occ::handle aReadShapeTool = XCAFDoc_DocumentTool::ShapeTool(aReadDoc->Main()); + NCollection_Sequence aRoots; + aReadShapeTool->GetFreeShapes(aRoots); + ASSERT_FALSE(aRoots.IsEmpty()) << "No shapes in read-back document"; + const TopoDS_Shape aResult = aReadShapeTool->GetShape(aRoots.First()); + ASSERT_FALSE(aResult.IsNull()) << "Read-back shape should not be null"; + + ShapeAnalysis_ShapeContents aSourceAnalyzer; + aSourceAnalyzer.Perform(aBox); + ShapeAnalysis_ShapeContents aResultAnalyzer; + aResultAnalyzer.Perform(aResult); + EXPECT_EQ(aResultAnalyzer.NbSolids(), aSourceAnalyzer.NbSolids()) << "Solid count mismatch"; + EXPECT_EQ(aResultAnalyzer.NbFaces(), aSourceAnalyzer.NbFaces()) << "Face count mismatch"; + EXPECT_EQ(aResultAnalyzer.NbEdges(), aSourceAnalyzer.NbEdges()) << "Edge count mismatch"; + EXPECT_EQ(aResultAnalyzer.NbVertices(), aSourceAnalyzer.NbVertices()) << "Vertex count mismatch"; + + // Verify yellow color is present on faces of the read-back shape. + occ::handle aColorTool = XCAFDoc_DocumentTool::ColorTool(aReadDoc->Main()); + bool aFoundColor = false; + Quantity_Color aReadColor; + for (TopExp_Explorer anFaceExp(aResult, TopAbs_FACE); anFaceExp.More(); anFaceExp.Next()) + { + if (aColorTool->GetColor(anFaceExp.Current(), XCAFDoc_ColorSurf, aReadColor) + || aColorTool->GetColor(anFaceExp.Current(), XCAFDoc_ColorGen, aReadColor)) + { + aFoundColor = true; + break; + } + } + if (!aFoundColor) + { + // If not found on faces, try on the solid shape itself + aFoundColor = aColorTool->GetColor(aResult, XCAFDoc_ColorGen, aReadColor) + || aColorTool->GetColor(aResult, XCAFDoc_ColorSurf, aReadColor); + } + EXPECT_TRUE(aFoundColor) << "Yellow color not found on read-back shape"; + if (aFoundColor) + { + EXPECT_NEAR(aReadColor.Red(), aYellow.Red(), 0.05) << "Color red channel mismatch"; + EXPECT_NEAR(aReadColor.Green(), aYellow.Green(), 0.05) << "Color green channel mismatch"; + EXPECT_NEAR(aReadColor.Blue(), aYellow.Blue(), 0.05) << "Color blue channel mismatch"; + } +} + +// Test OCC23950: STEPCAFControl_Writer writes vertex names when vertex mode is SingleVertex. +// Verifies that the STEP stream contains the expected "Point1" name. +TEST(STEPCAFControl_ControllerTest, OCC23950_WriteDocumentWithVertexName) +{ + STEPCAFControl_Controller::Init(); + + occ::handle aDoc = new TDocStd_Document("dummy"); + const TopoDS_Shape aVertex = BRepBuilderAPI_MakeVertex(gp_Pnt(75, 0, 0)); + const gp_Trsf aTrsf; + const TopLoc_Location aLoc(aTrsf); + + occ::handle aShapeTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + + TDF_Label aLab1 = aShapeTool->NewShape(); + aShapeTool->SetShape(aLab1, aVertex); + TDataStd_Name::Set(aLab1, "Point1"); + + TDF_Label aAssemblyLabel = aShapeTool->NewShape(); + TDataStd_Name::Set(aAssemblyLabel, "ASSEMBLY"); + + const TDF_Label aComponentLabel = aShapeTool->AddComponent(aAssemblyLabel, aLab1, aLoc); + aShapeTool->UpdateAssemblies(); + + Quantity_Color aYellow(Quantity_NOC_YELLOW); + XCAFDoc_DocumentTool::ColorTool(aDoc->Main()) + ->SetColor(aComponentLabel, aYellow, XCAFDoc_ColorGen); + XCAFDoc_DocumentTool::ColorTool(aDoc->Main())->SetVisibility(aComponentLabel, false); + + // Enable writing of individual vertex names + DESTEP_Parameters aParams; + aParams.WriteVertexMode = DESTEP_Parameters::WriteMode_VertexMode_SingleVertex; + + STEPCAFControl_Writer aWriter; + ASSERT_TRUE(aWriter.Transfer(aDoc, aParams)) << "Transfer failed"; + + std::ostringstream aStream; + const IFSelect_ReturnStatus aStatus = aWriter.WriteStream(aStream); + ASSERT_EQ(aStatus, IFSelect_RetDone) << "WriteStream did not return RetDone"; + + const std::string aContent = aStream.str(); + EXPECT_FALSE(aContent.empty()) << "Written STEP stream should not be empty"; + EXPECT_NE(aContent.find("Point1"), std::string::npos) + << "Vertex name 'Point1' not found in STEP stream"; + + // Verify yellow color and INVISIBILITY entity are encoded in the STEP stream. + // STEP writes predefined colors using DRAUGHTING_PRE_DEFINED_COLOUR, not COLOUR_RGB. + EXPECT_NE(aContent.find("DRAUGHTING_PRE_DEFINED_COLOUR('yellow')"), std::string::npos) + << "Yellow DRAUGHTING_PRE_DEFINED_COLOUR entity not found in STEP stream"; + EXPECT_NE(aContent.find("INVISIBILITY"), std::string::npos) + << "INVISIBILITY entity not found in STEP stream"; + + // Read back the written stream into an XCAF document and verify vertex position. + std::istringstream anInStream(aContent); + occ::handle aReadDoc = new TDocStd_Document("dummy"); + STEPCAFControl_Reader aCafReader; + aCafReader.SetColorMode(true); + ASSERT_EQ(aCafReader.ReadStream("", anInStream), IFSelect_RetDone) + << "ReadStream failed on written STEP content"; + ASSERT_TRUE(aCafReader.Transfer(aReadDoc)) << "Transfer to XCAF document failed"; + + occ::handle aReadShapeTool = XCAFDoc_DocumentTool::ShapeTool(aReadDoc->Main()); + NCollection_Sequence aRoots; + aReadShapeTool->GetFreeShapes(aRoots); + ASSERT_FALSE(aRoots.IsEmpty()) << "No shapes in read-back document"; + const TopoDS_Shape aRootShape = aReadShapeTool->GetShape(aRoots.First()); + ASSERT_FALSE(aRootShape.IsNull()) << "Read-back shape should not be null"; + + TopExp_Explorer anExp(aRootShape, TopAbs_VERTEX); + ASSERT_TRUE(anExp.More()) << "No vertex found in read-back shape"; + const gp_Pnt aPnt = BRep_Tool::Pnt(TopoDS::Vertex(anExp.Current())); + EXPECT_NEAR(aPnt.X(), 75.0, Precision::Confusion()) << "Vertex X coordinate mismatch"; + EXPECT_NEAR(aPnt.Y(), 0.0, Precision::Confusion()) << "Vertex Y coordinate mismatch"; + EXPECT_NEAR(aPnt.Z(), 0.0, Precision::Confusion()) << "Vertex Z coordinate mismatch"; +} diff --git a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.cxx b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.cxx index 6afffb5410..24e4d1e244 100644 --- a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.cxx +++ b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.cxx @@ -228,6 +228,17 @@ void STEPControl_Writer::SetShapeFixParameters(XSAlgo_ShapeProcessor::ParameterM //============================================================================= +void STEPControl_Writer::SetShapeFixParameters(const DE_ShapeFixParameters& theParameters) +{ + XSAlgo_ShapeProcessor::ParameterMap anAdditionalParameters; + if (occ::handle anActor = GetActor()) + { + anActor->SetShapeFixParameters(theParameters, anAdditionalParameters); + } +} + +//============================================================================= + void STEPControl_Writer::SetShapeFixParameters( const DE_ShapeFixParameters& theParameters, const XSAlgo_ShapeProcessor::ParameterMap& theAdditionalParameters) diff --git a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.hxx b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.hxx index ba1d792887..4d5e9e6ce8 100644 --- a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.hxx +++ b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.hxx @@ -142,6 +142,11 @@ public: //! @param theParameters the parameters for shape processing. Standard_EXPORT void SetShapeFixParameters(XSAlgo_ShapeProcessor::ParameterMap&& theParameters); + //! Sets parameters for shape processing. + //! Parameters from @p theParameters are converted and stored in the internal map. + //! @param theParameters the parameters for shape processing. + Standard_EXPORT void SetShapeFixParameters(const DE_ShapeFixParameters& theParameters); + //! Sets parameters for shape processing. //! Parameters from @p theParameters are copied to the internal map. //! Parameters from @p theAdditionalParameters are copied to the internal map @@ -150,7 +155,7 @@ public: //! @param theAdditionalParameters the additional parameters for shape processing. Standard_EXPORT void SetShapeFixParameters( const DE_ShapeFixParameters& theParameters, - const XSAlgo_ShapeProcessor::ParameterMap& theAdditionalParameters = {}); + const XSAlgo_ShapeProcessor::ParameterMap& theAdditionalParameters); //! Returns parameters for shape processing that was set by SetParameters() method. //! @return the parameters for shape processing. Empty map if no parameters were set. diff --git a/src/Draw/TKQADraw/QABugs/FILES.cmake b/src/Draw/TKQADraw/QABugs/FILES.cmake index 573b747128..4a5a2eec6b 100644 --- a/src/Draw/TKQADraw/QABugs/FILES.cmake +++ b/src/Draw/TKQADraw/QABugs/FILES.cmake @@ -14,7 +14,6 @@ set(OCCT_QABugs_FILES QABugs_9.cxx QABugs_10.cxx QABugs_11.cxx - QABugs_12.cxx QABugs_13.cxx QABugs_14.cxx QABugs_16.cxx diff --git a/src/Draw/TKQADraw/QABugs/QABugs.cxx b/src/Draw/TKQADraw/QABugs/QABugs.cxx index d8d2590914..099fc5930e 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs.cxx @@ -27,7 +27,6 @@ void QABugs::Commands(Draw_Interpretor& theCommands) QABugs::Commands_9(theCommands); QABugs::Commands_10(theCommands); QABugs::Commands_11(theCommands); - QABugs::Commands_12(theCommands); QABugs::Commands_13(theCommands); QABugs::Commands_14(theCommands); QABugs::Commands_16(theCommands); diff --git a/src/Draw/TKQADraw/QABugs/QABugs.hxx b/src/Draw/TKQADraw/QABugs/QABugs.hxx index 547ef52747..34df593cff 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs.hxx +++ b/src/Draw/TKQADraw/QABugs/QABugs.hxx @@ -49,8 +49,6 @@ public: Standard_EXPORT static void Commands_11(Draw_Interpretor& DI); - Standard_EXPORT static void Commands_12(Draw_Interpretor& DI); - Standard_EXPORT static void Commands_13(Draw_Interpretor& DI); Standard_EXPORT static void Commands_14(Draw_Interpretor& DI); diff --git a/src/Draw/TKQADraw/QABugs/QABugs_10.cxx b/src/Draw/TKQADraw/QABugs/QABugs_10.cxx index 05f744a105..48689a52e1 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_10.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_10.cxx @@ -29,8 +29,6 @@ #include #include -#include - #include #include #include @@ -39,10 +37,11 @@ #include #include #include -#include #include #include +#include +#include #include static int OCC426(Draw_Interpretor& di, int argc, const char** argv) @@ -478,247 +477,24 @@ int performTriangulation(const TopoDS_Shape& aShape, Draw_Interpretor& di) return 0; } -#include -#include #include //================================================================================================= -static int OCC822_1(Draw_Interpretor& di, int argc, const char** argv) -{ - - if (argc != 4) - { - di << "Usage : " << argv[0] << " name1 name2 result\n"; - return 1; - } - - int index = 1; - - gp_Pnt P1(0, 0, 0); - gp_Dir D1(gp_Dir::D::Z); - gp_Ax2 A1(P1, D1); - - BRepPrimAPI_MakeCylinder cylMakerIn(A1, 40, 110); - BRepPrimAPI_MakeCylinder cylMakerOut(A1, 50, 100); - TopoDS_Shape cylIn = cylMakerIn.Shape(); - TopoDS_Shape cylOut = cylMakerOut.Shape(); - - gp_Pnt P2(0, 0, 0); - gp_Dir D2(gp_Dir::D::NZ); - gp_Ax2 A2(P2, D2); - - BRepPrimAPI_MakeCone conMakerIn(A2, 40, 60, 110); - BRepPrimAPI_MakeCone conMakerOut(A2, 50, 70, 100); - TopoDS_Shape conIn = conMakerIn.Shape(); - TopoDS_Shape conOut = conMakerOut.Shape(); - - di << "All primitives created..... Creating Boolean\n"; - - try - { - OCC_CATCH_SIGNALS - - di << "theIn = BRepAlgoAPI_Fuse(cylIn, conIn)\n"; - di << "theOut = BRepAlgoAPI_Fuse(cylOut, conOut)\n"; - di << "theRes = BRepAlgoAPI_Cut(theOut, theIn)\n"; - TopoDS_Shape theIn = BRepAlgoAPI_Fuse(cylIn, conIn).Shape(); - TopoDS_Shape theOut = BRepAlgoAPI_Fuse(cylOut, conOut).Shape(); - TopoDS_Shape theRes = BRepAlgoAPI_Cut(theOut, theIn).Shape(); - - if (index < argc) - DBRep::Set(argv[index++], theIn); - if (index < argc) - DBRep::Set(argv[index++], theOut); - if (index < argc) - DBRep::Set(argv[index++], theRes); - di << "Booleans Created ! Triangulating !\n"; - - performTriangulation(theRes, di); - } - catch (Standard_Failure const&) - { - di << "*********************************************************\n"; - di << "***** ******\n"; - di << "***** Standard_Failure : Exception in Shoe Function *****\n"; - di << "***** ******\n"; - di << "*********************************************************\n"; - return 1; - } - return 0; -} - -#include #include //======================================================================= // OCC822_2 //======================================================================= -static int OCC822_2(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 4) - { - di << "Usage : " << argv[0] << " name1 name2 result\n"; - return 1; - } - - int index = 1; - - gp_Dir xDir(gp_Dir::D::X); - gp_Dir zDir(gp_Dir::D::Z); - gp_Pnt cen1(0, 0, 0); - gp_Ax2 cor1(cen1, zDir, xDir); - BRepPrimAPI_MakeBox boxMaker(cor1, 100, 100, 100); - TopoDS_Shape box = boxMaker.Shape(); - if (index < argc) - DBRep::Set(argv[index++], box); - - BRepPrimAPI_MakeSphere sphereMaker(gp_Pnt(100.0, 50.0, 50.0), 25.0); - TopoDS_Shape sph = sphereMaker.Shape(); - if (index < argc) - DBRep::Set(argv[index++], sph); - - di << "All primitives created..... Creating Cut Objects\n"; - - try - { - OCC_CATCH_SIGNALS - - di << "fuse = BRepAlgoAPI_Fuse(box, sph)\n"; - TopoDS_Shape fuse = BRepAlgoAPI_Fuse(box, sph).Shape(); - - if (index < argc) - DBRep::Set(argv[index++], fuse); - di << "Object Created ! Now Triangulating !"; - - performTriangulation(fuse, di); - } - catch (Standard_Failure const&) - { - di << "*********************************************************\n"; - di << "***** ******\n"; - di << "***** Standard_Failure : Exception in HSP Function ******\n"; - di << "***** ******\n"; - di << "*********************************************************\n"; - return 1; - } - - return 0; -} - //======================================================================= // OCC823 //======================================================================= -static int OCC823(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 4) - { - di << "Usage : " << argv[0] << " name1 name2 result\n"; - return 1; - } - - int index = 1; - double size = 0.001; - - gp_Pnt P1(40, 50, 0); - gp_Dir D1(100, 0, 0); - gp_Ax2 A1(P1, D1); - BRepPrimAPI_MakeCylinder mkCyl1(A1, 20, 100); - TopoDS_Shape cyl1 = mkCyl1.Shape(); - if (index < argc) - DBRep::Set(argv[index++], cyl1); - - gp_Pnt P2(100, 50, size); - gp_Dir D2(0, size, 80); - gp_Ax2 A2(P2, D2); - BRepPrimAPI_MakeCylinder mkCyl2(A2, 20, 80); - TopoDS_Shape cyl2 = mkCyl2.Shape(); - if (index < argc) - DBRep::Set(argv[index++], cyl2); - - di << "All primitives created..... Creating Boolean\n"; - - try - { - OCC_CATCH_SIGNALS - - di << "fuse = BRepAlgoAPI_Fuse(cyl2, cyl1)\n"; - TopoDS_Shape fuse = BRepAlgoAPI_Fuse(cyl2, cyl1).Shape(); - - if (index < argc) - DBRep::Set(argv[index++], fuse); - di << "Fuse Created ! Triangulating !\n"; - - performTriangulation(fuse, di); - } - catch (Standard_Failure const&) - { - di << "*********************************************************\n"; - di << "***** ******\n"; - di << "***** Standard_Failure : Exception in TEE Function ******\n"; - di << "***** ******\n"; - di << "*********************************************************\n"; - return 1; - } - return 0; -} - //======================================================================= // OCC824 //======================================================================= -static int OCC824(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 4) - { - di << "Usage : " << argv[0] << " name1 name2 result\n"; - return 1; - } - - int index = 1; - - gp_Pnt P1(100, 0, 0); - gp_Dir D1(gp_Dir::D::NX); - gp_Ax2 A1(P1, D1); - BRepPrimAPI_MakeCylinder mkCyl(A1, 20, 100); - TopoDS_Shape cyl = mkCyl.Shape(); - if (index < argc) - DBRep::Set(argv[index++], cyl); - - BRepPrimAPI_MakeSphere sphere(P1, 20.0); - TopoDS_Shape sph = sphere.Shape(); - if (index < argc) - DBRep::Set(argv[index++], sph); - - di << "All primitives created..... Creating Boolean\n"; - - try - { - OCC_CATCH_SIGNALS - - di << "fuse = BRepAlgoAPI_Fuse(cyl, sph)\n"; - TopoDS_Shape fuse = BRepAlgoAPI_Fuse(cyl, sph).Shape(); - - di << "Fuse Created ! Triangulating !\n"; - if (index < argc) - DBRep::Set(argv[index++], fuse); - - performTriangulation(fuse, di); - } - catch (Standard_Failure const&) - { - di << "*********************************************************\n"; - di << "***** ******\n"; - di << "***** Standard_Failure : Exception in YOU Function ******\n"; - di << "***** ******\n"; - di << "*********************************************************\n"; - return 1; - } - return 0; -} - #include #include #include @@ -822,206 +598,12 @@ static int OCC825(Draw_Interpretor& di, int argc, const char** argv) // OCC826 //======================================================================= -static int OCC826(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 4) - { - di << "Usage : " << argv[0] << " name1 name2 result\n"; - return 1; - } - - int index = 1; - - double x1 = 181.82808; - double x2 = 202.39390; - double y1 = 31.011970; - double y2 = 123.06856; - - BRepBuilderAPI_MakePolygon W1; - W1.Add(gp_Pnt(x1, y1, 0)); - W1.Add(gp_Pnt(x2, y1, 0)); - W1.Add(gp_Pnt(x2, y2, 0)); - W1.Add(gp_Pnt(x1, y2, 0)); - W1.Add(gp_Pnt(x1, y1, 0)); - - bool myFalse = false; - TopoDS_Face F1 = BRepBuilderAPI_MakeFace(W1.Wire(), myFalse); - - gp_Pnt P1(0, 0, 0); - gp_Dir D1(0, 30, 0); - gp_Ax1 A1(P1, D1); - double angle1 = 360 * (M_PI / 180.0); - TopoDS_Shape rev = BRepPrimAPI_MakeRevol(F1, A1, angle1); - if (index < argc) - DBRep::Set(argv[index++], rev); - - BRepPrimAPI_MakeSphere sphere(gp_Pnt(166.373, 77.0402, 96.0555), 23.218586); - TopoDS_Shape sph = sphere.Shape(); - if (index < argc) - DBRep::Set(argv[index++], sph); - - di << "All primitives created..... Creating Boolean\n"; - - try - { - OCC_CATCH_SIGNALS - - di << "fuse = BRepAlgoAPI_Fuse(rev, sph)\n"; - TopoDS_Shape fuse = BRepAlgoAPI_Fuse(rev, sph).Shape(); - - if (index < argc) - DBRep::Set(argv[index++], fuse); - di << "Fuse Created ! Triangulating !\n"; - performTriangulation(fuse, di); - } - catch (Standard_Failure const&) - { - di << "*********************************************************\n"; - di << "***** ******\n"; - di << "***** Standard_Failure : Exception in SPH Function ******\n"; - di << "***** ******\n"; - di << "*********************************************************\n"; - return 1; - } - return 0; -} - -#include - //======================================================================= // OCC827 //======================================================================= -static int OCC827(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 6) - { - di << "Usage : " << argv[0] << " name1 name2 name3 result1 result2\n"; - return 1; - } - - int index = 1; - - BRepBuilderAPI_MakePolygon W1; - W1.Add(gp_Pnt(10, 0, 0)); - W1.Add(gp_Pnt(20, 0, 0)); - W1.Add(gp_Pnt(20, 0, 50)); - W1.Add(gp_Pnt(10, 0, 50)); - W1.Add(gp_Pnt(10, 0, 0)); - - bool myFalse = false; - TopoDS_Face F1 = BRepBuilderAPI_MakeFace(W1.Wire(), myFalse); - - gp_Pnt P1(0, 0, 0); - gp_Dir D1(0, 0, 30); - gp_Ax1 A1(P1, D1); - double angle1 = 360 * (M_PI / 180.0); - TopoDS_Shape rev = BRepPrimAPI_MakeRevol(F1, A1, angle1); - if (index < argc) - DBRep::Set(argv[index++], rev); - - gp_Pnt P2(0, 0, 50); - gp_Dir D2(0, 0, 30); - gp_Ax2 A2(P2, D2); - double majRad = 15; - double minRad = 5; - BRepPrimAPI_MakeTorus Torus1(A2, majRad, minRad); - TopoDS_Shape tor1 = Torus1.Shape(); - if (index < argc) - DBRep::Set(argv[index++], tor1); - - gp_Pnt P3(0, 0, 10); - gp_Dir D3(0, 0, 30); - gp_Ax2 A3(P3, D3); - BRepPrimAPI_MakeTorus Torus2(A3, majRad, minRad); - TopoDS_Shape tor2 = Torus2.Shape(); - if (index < argc) - DBRep::Set(argv[index++], tor2); - - di << "All primitives created..... Creating Boolean\n"; - - try - { - OCC_CATCH_SIGNALS - - di << "Fuse1 = BRepAlgoAPI_Fuse(tor1, rev)\n"; - TopoDS_Shape fuse1 = BRepAlgoAPI_Fuse(tor1, rev).Shape(); - - if (index < argc) - DBRep::Set(argv[index++], fuse1); - di << "Fuse1 Created ! Creating Fuse 2\n"; - - di << "Fuse2 = BRepAlgoAPI_Fuse(tor2, fuse1)\n"; - TopoDS_Shape fuse2 = BRepAlgoAPI_Fuse(tor2, fuse1).Shape(); - - if (index < argc) - DBRep::Set(argv[index++], fuse2); - di << "Fuse2 Created ! Triangulating !\n"; - - performTriangulation(fuse2, di); - } - catch (Standard_Failure const&) - { - di << "*********************************************************\n"; - di << "***** ******\n"; - di << "***** Standard_Failure : Exception in REV Function ******\n"; - di << "***** ******\n"; - di << "*********************************************************\n"; - return 1; - } - return 0; -} - //======================================================================= // performBlend -//======================================================================= - -int performBlend(const TopoDS_Shape& aShape, double rad, TopoDS_Shape& bShape, Draw_Interpretor& di) -{ - int status = 0; - TopoDS_Shape newShape; - NCollection_IndexedDataMap, TopTools_ShapeMapHasher> - edgemap; - TopExp::MapShapesAndAncestors(aShape, TopAbs_EDGE, TopAbs_SOLID, edgemap); - di << "Blending All Edges: No. of Edges: " << edgemap.Extent() << "\n"; - ChFi3d_FilletShape FShape = ChFi3d_Rational; - BRepFilletAPI_MakeFillet blend(aShape, FShape); - for (int i = 1; i <= edgemap.Extent(); i++) - { - TopoDS_Edge edg = TopoDS::Edge(edgemap.FindKey(i)); - if (!edg.IsNull()) - blend.Add(rad, edg); - } - - try - { - OCC_CATCH_SIGNALS - blend.Build(); - if (!blend.HasResult() || blend.Shape().IsNull()) - { - status = 1; - } - } - catch (Standard_Failure const&) - { - status = 1; - } - if (status) - { - di << "*******************************************************\n"; - di << "****** *******\n"; - di << "****** Blending Failed (Radius = " << rad << ") *******\n"; - di << "****** *******\n"; - di << "*******************************************************\n"; - return 1; - } - else - { - di << "Blending successfully performed on all Edges: \n\n"; - } - bShape = blend.Shape(); - return 0; -} #include @@ -1138,13 +720,7 @@ void QABugs::Commands_10(Draw_Interpretor& theCommands) group); theCommands.Add("OCC486", "Use : OCC486 surf x y z du dv ", __FILE__, OCC486, group); theCommands.Add("OCC712", "OCC712 draftAngle slabThick", __FILE__, OCC712, group); - theCommands.Add("OCC822_1", "OCC822_1 name1 name2 result", __FILE__, OCC822_1, group); - theCommands.Add("OCC822_2", "OCC822_2 name1 name2 result", __FILE__, OCC822_2, group); - theCommands.Add("OCC823", "OCC823 name1 name2 result", __FILE__, OCC823, group); - theCommands.Add("OCC824", "OCC824 name1 name2 result", __FILE__, OCC824, group); theCommands.Add("OCC825", "OCC825 name1 name2 name3 name4 name5", __FILE__, OCC825, group); - theCommands.Add("OCC826", "OCC826 name1 name2 result", __FILE__, OCC826, group); - theCommands.Add("OCC827", "OCC827 name1 name2 name3 result1 result2", __FILE__, OCC827, group); theCommands.Add("OCC828", "OCC828 redius shape result ", __FILE__, OCC828, group); return; diff --git a/src/Draw/TKQADraw/QABugs/QABugs_11.cxx b/src/Draw/TKQADraw/QABugs/QABugs_11.cxx index 3a401fc206..d824f23275 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_11.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_11.cxx @@ -1252,63 +1252,6 @@ static int OCC369(Draw_Interpretor& di, int argc, const char** argv) #include #include -static int OCC524(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 9) - { - di << "Usage : " << argv[0] - << " LowerVector UpperVector InitialValueVector LowerRowMatrix UpperRowMatrix " - "LowerColMatrix UpperColMatrix InitialValueMatrix\n"; - return 1; - } - int LowerVector = Draw::Atoi(argv[1]); - int UpperVector = Draw::Atoi(argv[2]); - double InitialValueVector = Draw::Atof(argv[3]); - int LowerRowMatrix = Draw::Atoi(argv[4]); - int UpperRowMatrix = Draw::Atoi(argv[5]); - int LowerColMatrix = Draw::Atoi(argv[6]); - int UpperColMatrix = Draw::Atoi(argv[7]); - double InitialValueMatrix = Draw::Atof(argv[8]); - - math_Vector Vector1(LowerVector, UpperVector); - math_Vector Vector2(LowerVector, UpperVector); - - math_Vector Vector(LowerVector, UpperVector, InitialValueVector); - math_Matrix Matrix(LowerRowMatrix, - UpperRowMatrix, - LowerColMatrix, - UpperColMatrix, - InitialValueMatrix); - - // Vector.Dump(std::cout); - // std::cout< 1) - { - Matrix(Matrix.LowerRow() + 1, Matrix.LowerCol()) += 1.; - } - Vector2.TMultiply(Vector, Matrix); - - // Vector2.Dump(std::cout); - Standard_SStream aSStream2; - Vector2.Dump(aSStream2); - di << aSStream2; - di << "\n"; - - return 0; -} - #include //================================================================================================= @@ -1967,50 +1910,6 @@ static int OCC5739_UniAbs(Draw_Interpretor& di, int argc, const char** argv) return res; } -static int OCC6046(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 3) - { - di << "Usage : " << argv[0] << " nb_of_vectors size\n"; - return 1; - } - - int nb = Draw::Atoi(argv[1]); - int sz = Draw::Atoi(argv[2]); - double val = 10; - math_Vector** pv = new math_Vector*[nb]; - - di << "creating " << nb << " vectors " << sz << " elements each...\n"; - int i; - for (i = 0; i < nb; i++) - { - pv[i] = new math_Vector(1, sz, val); - if ((i % (nb / 10)) == 0) - { - di << " " << i; - // std::cout.flush(); - di << "\n"; - } - } - di << " done\n"; - di << "deleting them ...\n"; - for (i = 0; i < nb; i++) - { - delete pv[i]; - if ((i % (nb / 10)) == 0) - { - di << " " << i; - // std::cout.flush(); - di << "\n"; - } - } - di << " done\n"; - - delete[] pv; - - return 0; -} - static int OCC5698(Draw_Interpretor& di, int argc, const char** argv) { if (argc != 2) @@ -2845,99 +2744,6 @@ static int OCC10138(Draw_Interpretor& di, int argc, const char** argv) return 0; } -static int OCC7639(Draw_Interpretor& di, int argc, const char** argv) -{ - bool IsEvenArgc = true; - IsEvenArgc = argc % 2 == 0; - - if (argc < 3 || IsEvenArgc) - { - di << "Usage : " << argv[0] << " index1 value1 ... [indexN valueN]\n"; - return 1; - } - - int i, aValue, aPosition; - NCollection_DynamicArray vec; - for (i = 0; i < argc - 1; i++) - { - i++; - aValue = Draw::Atoi(argv[i]); - aPosition = Draw::Atoi(argv[i + 1]); - vec.SetValue(aValue, aPosition); - } - NCollection_DynamicArray::Iterator it(vec); - int j; - for (j = 0; it.More(); it.Next(), j++) - { - // di << it.Value() << "\n"; - di << j << " " << it.Value() << "\n"; - } - - return 0; -} - -static int OCC8797(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 1) - { - di << "Usage : " << argv[0] << "\n"; - return 1; - } - - gp_Pnt point(0.0, 0.0, 0.0); - - NCollection_Array1 poles(0, 6); - poles(0) = point; - - point.SetCoord(1.0, 1.0, 0.0); - poles(1) = point; - - point.SetCoord(2.0, 1.0, 0.0); - poles(2) = point; - - point.SetCoord(3.0, 0.0, 0.0); - poles(3) = point; - - point.SetCoord(4.0, 1.0, 0.0); - poles(4) = point; - - point.SetCoord(5.0, 1.0, 0.0); - poles(5) = point; - - point.SetCoord(6.0, 0.0, 0.0); - poles(6) = point; - - NCollection_Array1 knots(0, 2); - knots(0) = 0.0; - knots(1) = 0.5; - knots(2) = 1.0; - - NCollection_Array1 multi(0, 2); - multi(0) = 4; - multi(1) = 3; - multi(2) = 4; - - occ::handle spline = new Geom_BSplineCurve(poles, knots, multi, 3); - - // length!! 1. - double l_abcissa, l_gprop; - GeomAdaptor_Curve adaptor_spline(spline); - GCPnts_AbscissaPoint temp; - l_abcissa = GCPnts_AbscissaPoint::Length(adaptor_spline); - std::cout << "Length Spline(abcissa_Pnt): " << l_abcissa << std::endl; - - // length!! 2. - TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(spline); - GProp_GProps prop; - BRepGProp::LinearProperties(edge, prop); - l_gprop = prop.Mass(); - std::cout << "Length Spline(GProp_GProps): " << l_gprop << std::endl; - - std::cout << "Difference (abcissa_Pnt<->GProp_GProps): " << l_gprop - l_abcissa << std::endl; - - return 0; -} - static int OCC7068(Draw_Interpretor& di, int argc, const char** argv) { if (argc != 1) @@ -3075,26 +2881,6 @@ int OCC14376(Draw_Interpretor& di, int argc, const char** argv) return 0; } -static int OCC15489(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 4) - { - di << "Usage : " << argv[0] << " A B C\n"; - return 1; - } - try - { - gp_Lin2d aLin2d(Draw::Atof(argv[1]), Draw::Atof(argv[2]), Draw::Atof(argv[3])); - gp_Pnt2d anOrigin = aLin2d.Location(); - di << "X_0 = " << anOrigin.X() << " Y_0 = " << anOrigin.Y() << "\n"; - } - catch (Standard_ConstructionError const&) - { - di << argv[0] << " Exception: Sqrt(A*A + B*B) <= Resolution from gp\n"; - } - return 0; -} - static int OCC15755(Draw_Interpretor& di, int argc, const char** argv) { if (argc != 3) @@ -4925,12 +4711,6 @@ void QABugs::Commands_11(Draw_Interpretor& theCommands) OCC24, group); theCommands.Add("OCC369", "OCC369 Shape", __FILE__, OCC369, group); - theCommands.Add("OCC524", - "OCC524 LowerVector UpperVector InitialValueVector LowerRowMatrix UpperRowMatrix " - "LowerColMatrix UpperColMatrix InitialValueMatrix", - __FILE__, - OCC524, - group); // theCommands.Add("OCC578", "OCC578 shape1 shape2 shape3", __FILE__, OCC578, group); theCommands.Add("OCC578", "OCC578 shape1 shape2 shape3", __FILE__, OCC578, group); theCommands.Add("OCC708", @@ -4978,7 +4758,6 @@ void QABugs::Commands_11(Draw_Interpretor& theCommands) theCommands.Add("OCC1077", "OCC1077 result", __FILE__, OCC1077, group); theCommands.Add("OCC5739", "OCC5739 name shape step", __FILE__, OCC5739_UniAbs, group); - theCommands.Add("OCC6046", "OCC6046 nb_of_vectors size", __FILE__, OCC6046, group); theCommands.Add("OCC5698", "OCC5698 wire", __FILE__, OCC5698, group); theCommands.Add("OCC6143", "OCC6143 catching signals", __FILE__, OCC6143, group); theCommands.Add("OCC30762", "OCC30762 printing backtrace", __FILE__, OCC30762, group); @@ -4986,8 +4765,6 @@ void QABugs::Commands_11(Draw_Interpretor& theCommands) theCommands.Add("OCC7372", "OCC7372", __FILE__, OCC7372, group); theCommands.Add("OCC8169", "OCC8169 edge1 edge2 plane", __FILE__, OCC8169, group); theCommands.Add("OCC10138", "OCC10138 lower upper", __FILE__, OCC10138, group); - theCommands.Add("OCC7639", "OCC7639 index1 value1 ... [indexN valueN]", __FILE__, OCC7639, group); - theCommands.Add("OCC8797", "OCC8797", __FILE__, OCC8797, group); theCommands.Add("OCC7068", "OCC7068", __FILE__, OCC7068, group); theCommands.Add("OCC11457", "OCC11457 polygon lastedge x1 y1 z1 x2 y2 z2 ...", @@ -5000,7 +4777,6 @@ void QABugs::Commands_11(Draw_Interpretor& theCommands) OCC13963, group); theCommands.Add("OCC14376", "OCC14376 shape [deflection]", __FILE__, OCC14376, group); - theCommands.Add("OCC15489", "OCC15489 A B C", __FILE__, OCC15489, group); theCommands.Add("OCC15755", "OCC15755 file shape", __FILE__, OCC15755, group); theCommands.Add("OCC16782", "OCC16782 file.std file.xml file.cbf", __FILE__, OCC16782, group); theCommands.Add("OCC12584", "OCC12584 [mode = 0/1/2]", __FILE__, OCC12584, group); diff --git a/src/Draw/TKQADraw/QABugs/QABugs_12.cxx b/src/Draw/TKQADraw/QABugs/QABugs_12.cxx deleted file mode 100644 index f89558ec53..0000000000 --- a/src/Draw/TKQADraw/QABugs/QABugs_12.cxx +++ /dev/null @@ -1,136 +0,0 @@ -// Created on: 2002-10-24 -// Created by: Michael KUZMITCHEV -// Copyright (c) 2002-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -// OCC895 -//======================================================================= -static int OCC895(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc < 2 || argc > 5) - { - di << "Usage : " << argv[0] << " result [angle [reverse [order]]]\n"; - return 1; - } - - const double rad = 1.0; - const double angle = (argc > 2) ? Draw::Atof(argv[2]) : 0.0; - const int reverse = (argc > 3) ? Draw::Atoi(argv[3]) : 0; - const int order = (argc > 4) ? Draw::Atoi(argv[4]) : 0; - - // Make a wire from the first arc for ThruSections. - // - // This arc is rotated 5 degrees about the Z axis. - // I don't know why, but if we don't rotate it, - // the final shell is not twisted. - gp_Pnt center1(0, 10, 0); - gp_Ax2 axis1 = - reverse ? gp_Ax2(center1, gp::DY(), gp::DZ()) : gp_Ax2(center1, -gp::DY(), gp::DX()); - if (std::abs(angle) > gp::Resolution()) - axis1.Rotate(gp_Ax1(center1, gp::DZ()), angle * M_PI / 180.0); - - gce_MakeCirc makeCirc1(axis1, rad); - if (!makeCirc1.IsDone()) - return 1; - gp_Circ circ1 = makeCirc1.Value(); - GC_MakeArcOfCircle makeArc1(circ1, 0, M_PI / 2, true); - if (!makeArc1.IsDone()) - return 1; - occ::handle arc1 = makeArc1.Value(); - - // Create wire 1 - BRepBuilderAPI_MakeEdge makeEdge1(arc1, arc1->StartPoint(), arc1->EndPoint()); - if (!makeEdge1.IsDone()) - return 1; - TopoDS_Edge edge1 = makeEdge1.Edge(); - BRepBuilderAPI_MakeWire makeWire1; - makeWire1.Add(edge1); - if (!makeWire1.IsDone()) - return 1; - TopoDS_Wire wire1 = makeWire1.Wire(); - - // Make a wire from the second arc for ThruSections. - gp_Pnt center2(10, 0, 0); - gp_Ax2 axis2(center2, -gp::DX(), gp::DZ()); - - gce_MakeCirc makeCirc2(axis2, rad); - if (!makeCirc2.IsDone()) - return 1; - gp_Circ circ2 = makeCirc2.Value(); - GC_MakeArcOfCircle makeArc2(circ2, 0, M_PI / 2, true); - if (!makeArc2.IsDone()) - return 1; - occ::handle arc2 = makeArc2.Value(); - - // Create wire 2 - BRepBuilderAPI_MakeEdge makeEdge2(arc2, arc2->StartPoint(), arc2->EndPoint()); - if (!makeEdge2.IsDone()) - return 1; - TopoDS_Edge edge2 = makeEdge2.Edge(); - BRepBuilderAPI_MakeWire makeWire2; - makeWire2.Add(edge2); - if (!makeWire2.IsDone()) - return 1; - TopoDS_Wire wire2 = makeWire2.Wire(); - - BRepOffsetAPI_ThruSections thruSect(false, true); - if (order) - { - thruSect.AddWire(wire1); - thruSect.AddWire(wire2); - } - else - { - thruSect.AddWire(wire2); - thruSect.AddWire(wire1); - } - thruSect.Build(); - if (!thruSect.IsDone()) - return 1; - TopoDS_Shape myShape = thruSect.Shape(); - - DBRep::Set(argv[1], myShape); - - return 0; -} - -void QABugs::Commands_12(Draw_Interpretor& theCommands) -{ - const char* group = "QABugs"; - - theCommands.Add("OCC895", "OCC895 result [angle [reverse [order]]]", __FILE__, OCC895, group); - - return; -} diff --git a/src/Draw/TKQADraw/QABugs/QABugs_13.cxx b/src/Draw/TKQADraw/QABugs/QABugs_13.cxx index 32c2665d5a..0c4d5cb54a 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_13.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_13.cxx @@ -783,215 +783,6 @@ static int OCC544(Draw_Interpretor& di, int argc, const char** argv) return 0; } -#include -#include -#include -#include -#include -#include -#include - -static int OCC817(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 3) - { - di << "Usage : " << argv[0] << " result mesh_delta\n"; - return 1; - } - - constexpr double delt = 5.0 * Precision::Confusion(); - double mesh_delt = Draw::Atof(argv[2]); - if (mesh_delt <= 0.0) - { - di << "Error: mesh_delta must be positive value\n"; - return -1; - } - - // Create outer box solid - gp_Pnt P(0, 0, 0); - TopoDS_Solid fullSolid = BRepPrimAPI_MakeBox(P, 30.0, 30.0, 30.0).Solid(); - - // Create inner box solid - P.SetX(10); - P.SetY(10); - P.SetZ(10); - TopoDS_Solid internalSolid = BRepPrimAPI_MakeBox(P, 10.0, 10.0, 10.0).Solid(); - - // Cut inner from outer - di << "BRepAlgoAPI_Cut cut( fullSolid, internalSolid )\n"; - BRepAlgoAPI_Cut cut(fullSolid, internalSolid); - if (!cut.IsDone()) - { - di << "Error: Could not cut volumes\n"; - return -1; - } - const TopoDS_Shape& cut_shape = cut.Shape(); - - // see if we have a solid - int found_solid = 0; - TopoDS_Solid cutSolid; - TopExp_Explorer Ex; - for (Ex.Init(cut_shape, TopAbs_SOLID); Ex.More(); Ex.Next()) - { - TopoDS_Solid sol = TopoDS::Solid(Ex.Current()); - if (!sol.IsNull()) - { - cutSolid = sol; - found_solid++; - } - } - if (found_solid != 1) - { - di << "Error: Cut operation produced " << found_solid << " solids\n"; - return -1; - } - DBRep::Set(argv[1], cutSolid); - - // Calculate initial volume - GProp_GProps volumeVProps; - BRepGProp::VolumeProperties(cutSolid, volumeVProps); - di << "Info: Original volume = " << volumeVProps.Mass() << "\n"; - - // - // build bounding box and calculate bounds for initial mesh - // - Bnd_Box bndBox; - BRepBndLib::Add(cutSolid, bndBox); - double Xmin, Ymin, Zmin, Xmax, Ymax, Zmax; - bndBox.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax); - Xmin -= delt; - Ymin -= delt; - Zmin -= delt; - Xmax += delt; - Ymax += delt; - Zmax += delt; - di << "Info: Bounds\n (" << Xmin << "," << Ymin << "," << Zmin << ")\n (" << Xmax << "," << Ymax - << "," << Zmax << ")\n"; - - // grid the bounding box - int NumXsubvolumes = (int)((Xmax - Xmin) / mesh_delt); - if (NumXsubvolumes <= 0) - NumXsubvolumes = 1; - int NumYsubvolumes = (int)((Ymax - Ymin) / mesh_delt); - if (NumYsubvolumes <= 0) - NumYsubvolumes = 1; - int NumZsubvolumes = (int)((Zmax - Zmin) / mesh_delt); - if (NumZsubvolumes <= 0) - NumZsubvolumes = 1; - const double StepX = (Xmax - Xmin) / NumXsubvolumes; - const double StepY = (Ymax - Ymin) / NumYsubvolumes; - const double StepZ = (Zmax - Zmin) / NumZsubvolumes; - const int NumSubvolumes = NumXsubvolumes * NumYsubvolumes * NumZsubvolumes; - di << "Info: NumSubvolumesX = " << NumXsubvolumes << "\n"; - di << "Info: NumSubvolumesY = " << NumYsubvolumes << "\n"; - di << "Info: NumSubvolumesZ = " << NumZsubvolumes << "\n"; - di << "Info: NumSubvolumes = " << NumSubvolumes << "\n"; - - // - // construct initial mesh of cutSolid - // - NCollection_Array1 SubvolumeSolid(0, NumSubvolumes - 1); - NCollection_Array1 SubvolumeVol(0, NumSubvolumes - 1); - double accumulatedVolume = 0.0; - int i, j, k, l = 0; - double x = Xmin; - for (i = 0; i < NumXsubvolumes; i++) - { - double y = Ymin; - for (j = 0; j < NumYsubvolumes; j++) - { - double z = Zmin; - for (k = 0; k < NumZsubvolumes; k++) - { - P.SetX(x); - P.SetY(y); - P.SetZ(z); - TopoDS_Shape aSubvolume = BRepPrimAPI_MakeBox(P, StepX, StepY, StepZ).Solid(); - di << "Info: box b_" << l << " " << P.X() << " " << P.Y() << " " << P.Z() << " " << StepX - << " " << StepY << " " << StepZ << "\n"; - if (aSubvolume.IsNull()) - { - di << "Error: could not construct subvolume " << l << "\n"; - return 1; - } - SubvolumeSolid.SetValue(l, aSubvolume); - GProp_GProps subvolumeVProps; - BRepGProp::VolumeProperties(SubvolumeSolid(l), subvolumeVProps); - const double vol = subvolumeVProps.Mass(); - di << "Info: original subvolume " << l << " volume = " << vol << "\n"; - SubvolumeVol.SetValue(l, vol); - accumulatedVolume += vol; - l++; - z += StepZ; - } - y += StepY; - } - x += StepX; - } - di << "Info: Accumulated mesh volume = " << accumulatedVolume << "\n"; - - // - // trim mesh to cutSolid - // - accumulatedVolume = 0.0; - for (l = 0; l < NumSubvolumes; l++) - { - TopoDS_Shape copySolid = BRepBuilderAPI_Copy(cutSolid).Shape(); - - // perform common - di << "BRepAlgoAPI_Common common(copySolid/*cutSolid*/, SubvolumeSolid(l))\n"; - BRepAlgoAPI_Common common(copySolid /*cutSolid*/, SubvolumeSolid(l)); - if (!common.IsDone()) - { - di << "Error: could not construct a common solid " << l << "\n"; - return 1; - } - const TopoDS_Shape& aCommonShape = common.Shape(); - - // see if we have a solid - found_solid = 0; - TopoDS_Shape commonShape; - //////////for (Ex.Init(common.Shape(), TopAbs_SOLID); Ex.More(); Ex.Next()) - for (Ex.Init(aCommonShape, TopAbs_SOLID); Ex.More(); Ex.Next()) - { - TopoDS_Solid sol = TopoDS::Solid(Ex.Current()); - if (!sol.IsNull()) - { - commonShape = sol; - found_solid++; - } - } - if (found_solid != 1) - { - di << "Info: Common operation " << l << " produced " << found_solid << " solids\n"; - } - else - { - SubvolumeSolid.SetValue(l, commonShape); - GProp_GProps subvolumeVProps; - BRepGProp::VolumeProperties(SubvolumeSolid(l), subvolumeVProps); - const double vol = subvolumeVProps.Mass(); - const bool err = (vol > SubvolumeVol(l)) || (vol <= 0.0); - // std::cout << (err? "ERROR" : "Info") << ": final subvolume " << l << " volume = " << vol << - // std::endl; - if (err) - di << "ERROR: final subvolume " << l << " volume = " << vol << "\n"; - else - di << "Info: final subvolume " << l << " volume = " << vol << "\n"; - accumulatedVolume += vol; - if (err) - { - char astr[80]; - Sprintf(astr, "e_%d", l); - DBRep::Set(astr, commonShape); - } - } - } - di << "Info: Accumulated meshed volume = " << accumulatedVolume << "\n"; - - return 0; -} - void QABugs::Commands_13(Draw_Interpretor& theCommands) { const char* group = "QABugs"; @@ -1001,15 +792,11 @@ void QABugs::Commands_13(Draw_Interpretor& theCommands) __FILE__, OCC332bug, group); - //////theCommands.Add("OCC544", "OCC544 [[[[[wT [[[[d1 [[[d2 [[R [length]]]]]", __FILE__, OCC544, - /// group); theCommands.Add("OCC544", "OCC544 [[[[[wT [[[[d1 [[[d2 [[R [length ]]]]]", __FILE__, OCC544, group); - //////theCommands.Add("OCC817", "OCC817 result mesh_delta", __FILE__, OCC817, group); - theCommands.Add("OCC817", "OCC817 result mesh_delta ", __FILE__, OCC817, group); return; } diff --git a/src/Draw/TKQADraw/QABugs/QABugs_14.cxx b/src/Draw/TKQADraw/QABugs/QABugs_14.cxx index fb9705b5f9..eec6147bf5 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_14.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_14.cxx @@ -25,13 +25,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include #include #include #include @@ -64,54 +57,6 @@ #include #include -static int BUC60897(Draw_Interpretor& di, int /*argc*/, const char** /*argv*/) -{ - char abuf[16]; - - occ::handle aLine = new Geom2d_Line(gp_Pnt2d(100, 0), gp_Dir2d(gp_Dir2d::D::NX)); - Sprintf(abuf, "line"); - const char* st = abuf; - DrawTrSurf::Set(st, aLine); - - NCollection_Array1 aPoints(1, 3); - aPoints.SetValue(1, gp_Pnt2d(0, 0)); - aPoints.SetValue(2, gp_Pnt2d(50, 50)); - aPoints.SetValue(3, gp_Pnt2d(0, 100)); - occ::handle aCurve = new Geom2d_BezierCurve(aPoints); - Sprintf(abuf, "curve"); - DrawTrSurf::Set(st, aCurve); - - Geom2dAdaptor_Curve aCLine(aLine); - Geom2dAdaptor_Curve aCCurve(aCurve); - Geom2dGcc_QualifiedCurve aQualifCurve1(aCLine, GccEnt_outside); - Geom2dGcc_QualifiedCurve aQualifCurve2(aCCurve, GccEnt_outside); - Geom2dGcc_Circ2d2TanRad aGccCirc2d(aQualifCurve1, aQualifCurve2, 10, 1e-7); - if (!aGccCirc2d.IsDone()) - { - di << "Faulty: can not create a circle.\n"; - return 1; - } - for (int i = 1; i <= aGccCirc2d.NbSolutions(); i++) - { - gp_Circ2d aCirc2d = aGccCirc2d.ThisSolution(i); - di << "circle : X " << aCirc2d.Location().X() << " Y " << aCirc2d.Location().Y() << " R " - << aCirc2d.Radius(); - double aTmpR1, aTmpR2; - gp_Pnt2d aPnt2d1, aPnt2d2; - aGccCirc2d.Tangency1(i, aTmpR1, aTmpR2, aPnt2d1); - aGccCirc2d.Tangency2(i, aTmpR1, aTmpR2, aPnt2d2); - di << "\ntangency1 : X " << aPnt2d1.X() << " Y " << aPnt2d1.Y(); - di << "\ntangency2 : X " << aPnt2d2.X() << " Y " << aPnt2d2.Y() << "\n"; - - Sprintf(abuf, "circle_%d", i); - occ::handle circ_res = new Geom2d_Circle(aCirc2d); - DrawTrSurf::Set(st, circ_res); - } - - di << "done\n"; - return 0; -} - static int BUC60889(Draw_Interpretor& di, int argc, const char** argv) { if (argc != 10) @@ -1045,7 +990,6 @@ void QABugs::Commands_14(Draw_Interpretor& theCommands) { const char* group = "QABugs"; - theCommands.Add("BUC60897", "BUC60897", __FILE__, BUC60897, group); theCommands.Add("BUC60889", "BUC60889 point_1 point_2 name_of_edge bndbox_X1 bndbox_Y1 bndbox_Z1 bndbox_X2 " "bndbox_Y2 bndbox_Z2", diff --git a/src/Draw/TKQADraw/QABugs/QABugs_16.cxx b/src/Draw/TKQADraw/QABugs/QABugs_16.cxx index b155df18d8..f235d8d73d 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_16.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_16.cxx @@ -50,7 +50,7 @@ #include #include -#include +#include #include #include @@ -374,34 +374,6 @@ static int OCC295(Draw_Interpretor& di, int argc, const char** argv) return 1; } -static int OCC49(Draw_Interpretor& di, int argc, const char** argv) -{ - - if (argc != 2) - { - di << "Usage : " << argv[0] << " name\n"; - return 1; - } - - TopoDS_Shape S = DBRep::Get(argv[1]); - if (S.IsNull()) - return 0; - - GProp_GProps G; - BRepGProp::VolumeProperties(S, G); - GProp_PrincipalProps Pr = G.PrincipalProperties(); - bool Result = Pr.HasSymmetryAxis(); - if (Result) - { - di << "1\n"; - } - else - { - di << "0\n"; - } - return 0; -} - static int OCC405(Draw_Interpretor& di, int argc, const char** argv) { if (argc != 4) @@ -690,7 +662,6 @@ void QABugs::Commands_16(Draw_Interpretor& theCommands) theCommands.Add("BUC60972", "BUC60972 edge edge plane val text ", __FILE__, BUC60972, group); theCommands.Add("OCC218", "OCC218 name plane Xlabel Ylabel", __FILE__, OCC218bug, group); theCommands.Add("OCC295", "OCC295 edge_result edge1 edge2", __FILE__, OCC295, group); - theCommands.Add("OCC49", "OCC49 name", __FILE__, OCC49, group); theCommands.Add("OCC405", "OCC405 edge_result edge1 edge2; merge two edges", __FILE__, diff --git a/src/Draw/TKQADraw/QABugs/QABugs_17.cxx b/src/Draw/TKQADraw/QABugs/QABugs_17.cxx index 2fc27c6bb4..cdfcbef8fa 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_17.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_17.cxx @@ -37,6 +37,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -466,72 +469,6 @@ static int OCC566(Draw_Interpretor& di, int n, const char** a) return 0; } -#include - -//================================================================================================= - -static int OCC570(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc < 2) - { - di << "Usage: " << argv[0] << " result\n"; - return 1; - } - - BRepPrimAPI_MakeBox mkBox(100., 100., 100.); - TopoDS_Shape aBox = mkBox.Shape(); - - TopExp_Explorer aExp; - aExp.Init(aBox, TopAbs_WIRE); - if (aExp.More()) - { - TopoDS_Shape aWire = aExp.Current(); - - aExp.Init(aWire, TopAbs_EDGE); - TopoDS_Edge e1 = TopoDS::Edge(aExp.Current()); - aExp.Next(); - TopoDS_Edge e2 = TopoDS::Edge(aExp.Current()); - aExp.Next(); - TopoDS_Edge e3 = TopoDS::Edge(aExp.Current()); - aExp.Next(); - TopoDS_Edge e4 = TopoDS::Edge(aExp.Current()); - - try - { - OCC_CATCH_SIGNALS - BRepFilletAPI_MakeFillet mkFillet(aBox); - mkFillet.SetContinuity(GeomAbs_C1, .001); - - // Setup variable fillet data - NCollection_Array1 t_pnt(1, 4); - t_pnt.SetValue(1, gp_Pnt2d(0.0, 5.0)); - t_pnt.SetValue(2, gp_Pnt2d(0.3, 15.0)); - t_pnt.SetValue(3, gp_Pnt2d(0.7, 15.0)); - t_pnt.SetValue(4, gp_Pnt2d(1.0, 5.0)); - - // HERE: - // It is impossible to build fillet if at least one edge - // with variable radius is added!!! If all are constant, everything is ok. - mkFillet.Add(t_pnt, e1); - mkFillet.Add(5.0, e2); - mkFillet.Add(t_pnt, e3); - mkFillet.Add(5.0, e4); - - mkFillet.Build(); - TopoDS_Shape aFinalShape = mkFillet.Shape(); - - DBRep::Set(argv[1], aFinalShape); - } - catch (Standard_Failure const&) - { - di << argv[0] << ": Exception in fillet\n"; - return 2; - } - } - - return 0; -} - #include static double tesp = 1.e-4; @@ -703,169 +640,6 @@ static int OCC606(Draw_Interpretor& di, int n, const char** a) return 0; } -//================================================================================================= - -static int OCC813(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc < 3) - { - di << "Usage : " << argv[0] << " U V\n"; - return 1; - } - - const char* str; - double U = Draw::Atof(argv[1]); - double V = Draw::Atof(argv[2]); - - // Between ellipse and point: - - occ::handle ell = - new Geom_Ellipse(gp_Ax2(gp_Pnt(1262.224429, 425.040878, 363.609716), - gp_Dir(0.173648, 0.984808, 0.000000), - gp_Dir(-0.932169, 0.164367, -0.322560)), - 150, - 100); - occ::handle plne = - new Geom_Plane(gp_Ax3(gp_Ax2(gp_Pnt(1262.224429, 425.040878, 363.609716), - gp_Dir(0.173648, 0.984808, 0.000000), - gp_Dir(-0.932169, 0.164367, -0.322560)))); - - occ::handle aContext = ViewerTest::GetAISContext(); - - gp_Pnt2d pt2d(U, V); - gp_Pln pln = plne->Pln(); - - str = "OCC813_pnt"; - DrawTrSurf::Set(str, pt2d); - - occ::handle curve2d = GeomAPI::To2d(ell, pln); - Geom2dAdaptor_Curve acur(curve2d); - Geom2dGcc_QualifiedCurve qcur(acur, GccEnt_outside); - - str = "OCC813_ell"; - DrawTrSurf::Set(str, curve2d); - if (!aContext.IsNull()) - { - occ::handle aisp = - new AIS_Shape(BRepBuilderAPI_MakeEdge(GeomAPI::To3d(curve2d, pln)).Edge()); - aContext->Display(aisp, false); - } - - // This does not give any solutions. - Geom2dGcc_Lin2d2Tan lintan(qcur, pt2d, 0.1); - di << "OCC813 nb of solutions = " << lintan.NbSolutions() << "\n"; - - char abuf[16]; - const char* st = abuf; - - int i; - for (i = 1; i <= lintan.NbSolutions(); i++) - { - Sprintf(abuf, "lintan_%d", i); - occ::handle glin = new Geom2d_Line(lintan.ThisSolution(i)); - DrawTrSurf::Set(st, glin); - if (!aContext.IsNull()) - { - occ::handle aisp = - new AIS_Shape(BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge()); - aContext->Display(aisp, false); - } - } - - if (!aContext.IsNull()) - { - aContext->UpdateCurrentViewer(); - } - - return 0; -} - -//================================================================================================= - -static int OCC814(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc > 1) - { - di << "Usage : " << argv[0] << "\n"; - return 1; - } - - const char* str; - - // Between Ellipse and Circle: - - occ::handle cir = new Geom_Circle(gp_Ax2(gp_Pnt(823.687192, 502.366825, 478.960440), - gp_Dir(0.173648, 0.984808, 0.000000), - gp_Dir(-0.932169, 0.164367, -0.322560)), - 50); - occ::handle ell = - new Geom_Ellipse(gp_Ax2(gp_Pnt(1262.224429, 425.040878, 363.609716), - gp_Dir(0.173648, 0.984808, 0.000000), - gp_Dir(-0.932169, 0.164367, -0.322560)), - 150, - 100); - occ::handle plne = - new Geom_Plane(gp_Ax3(gp_Ax2(gp_Pnt(1262.224429, 425.040878, 363.609716), - gp_Dir(0.173648, 0.984808, 0.000000), - gp_Dir(-0.932169, 0.164367, -0.322560)))); - - occ::handle aContext = ViewerTest::GetAISContext(); - - gp_Pln pln = plne->Pln(); - occ::handle curve2d = GeomAPI::To2d(ell, pln); - occ::handle fromcurve2d = GeomAPI::To2d(cir, pln); - - str = "OCC814_cir"; - DrawTrSurf::Set(str, curve2d); - str = "OCC814_ell"; - DrawTrSurf::Set(str, fromcurve2d); - if (!aContext.IsNull()) - { - occ::handle aisp = - new AIS_Shape(BRepBuilderAPI_MakeEdge(GeomAPI::To3d(curve2d, pln)).Edge()); - aContext->Display(aisp, false); - } - if (!aContext.IsNull()) - { - occ::handle aisp = - new AIS_Shape(BRepBuilderAPI_MakeEdge(GeomAPI::To3d(fromcurve2d, pln)).Edge()); - aContext->Display(aisp, false); - } - - Geom2dAdaptor_Curve acur(curve2d), afromcur(fromcurve2d); - - Geom2dGcc_QualifiedCurve qcur(acur, GccEnt_outside); - Geom2dGcc_QualifiedCurve qfromcur(afromcur, GccEnt_outside); - - // This does not give any solutions. - Geom2dGcc_Lin2d2Tan lintan(qcur, qfromcur, 0.1); - di << "OCC814 nb of solutions = " << lintan.NbSolutions() << "\n"; - - char abuf[16]; - const char* st = abuf; - - int i; - for (i = 1; i <= lintan.NbSolutions(); i++) - { - Sprintf(abuf, "lintan_%d", i); - occ::handle glin = new Geom2d_Line(lintan.ThisSolution(i)); - DrawTrSurf::Set(st, glin); - if (!aContext.IsNull()) - { - occ::handle aisp = - new AIS_Shape(BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge()); - aContext->Display(aisp, false); - } - } - - if (!aContext.IsNull()) - { - aContext->UpdateCurrentViewer(); - } - - return 0; -} - #include //================================================================================================= @@ -1061,88 +835,6 @@ static int OCCN1(Draw_Interpretor& di, int argc, const char** argv) return 0; } -#include -#include -#include - -//================================================================================================= - -static int OCCN2(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc > 2) - { - di << "Usage : " << argv[0] << "\n"; - return 1; - } - - occ::handle aContext = ViewerTest::GetAISContext(); - if (aContext.IsNull()) - { - di << "use 'vinit' command before " << argv[0] << "\n"; - return 1; - } - - BRepPrimAPI_MakeCylinder cylinder(50, 200); - TopoDS_Shape cylinder_sh = cylinder.Shape(); - - BRepPrimAPI_MakeSphere sphere(gp_Pnt(60, 0, 100), 50); - TopoDS_Shape sphere_sh = sphere.Shape(); - - di << "BRepAlgoAPI_Section section(cylinder_sh, sphere_sh)\n"; - BRepAlgoAPI_Section section(cylinder_sh, sphere_sh); - if (!section.IsDone()) - { - di << "Error performing intersection: not done.\n"; - } - const TopoDS_Shape& shape = section.Shape(); - - DBRep::Set("OCCN2_cylinder", cylinder_sh); - DBRep::Set("OCCN2_sphere", sphere_sh); - DBRep::Set("OCCN2_section", shape); - - return 0; -} - -#include -#include -#include - -static int OCC2569(Draw_Interpretor& di, int argc, const char** argv) -{ - occ::handle aContext = ViewerTest::GetAISContext(); - if (aContext.IsNull()) - { - di << "use 'vinit' command before " << argv[0] << "\n"; - return 1; - } - if (argc != 3) - { - di << "Usage : " << argv[0] << " nbpoles result\n"; - return 1; - } - - int poles = Draw::Atoi(argv[1]); - - NCollection_Array1 arr(1, poles); - for (int i = 1; i <= poles; i++) - arr.SetValue(i, gp_Pnt(i + 10, i * 2 + 20, i * 3 + 45)); - - occ::handle bez = new Geom_BezierCurve(arr); - if (bez.IsNull()) - { - di << "\n The curve is not created.\n"; - } - else - { - di << "\n Degree = " << bez->Degree() << "\n"; - } - TopoDS_Edge sh = BRepBuilderAPI_MakeEdge(bez).Edge(); - occ::handle ais = new AIS_Shape(sh); - aContext->Display(ais, true); - DrawTrSurf::Set(argv[2], bez); - return 0; -} - #include #include #include @@ -1357,7 +1049,6 @@ void QABugs::Commands_17(Draw_Interpretor& theCommands) __FILE__, OCC566, group); - theCommands.Add("OCC570", "OCC570 result", __FILE__, OCC570, group); theCommands.Add("OCC570mkevol", "OCC570mkevol result object (then use updatevol) [R/Q/P]; mkevol", @@ -1382,8 +1073,6 @@ void QABugs::Commands_17(Draw_Interpretor& theCommands) theCommands.Add("OCC606", "OCC606 result shape [-t]", __FILE__, OCC606, group); - theCommands.Add("OCC813", "OCC813 U V", __FILE__, OCC813, group); - theCommands.Add("OCC814", "OCC814", __FILE__, OCC814, group); theCommands.Add("OCC884", "OCC884 result shape [toler [maxtoler]]", __FILE__, OCC884, group); theCommands.Add("OCCN1", @@ -1391,10 +1080,6 @@ void QABugs::Commands_17(Draw_Interpretor& theCommands) __FILE__, OCCN1, group); - theCommands.Add("OCCN2", "OCCN2", __FILE__, OCCN2, group); - - theCommands.Add("OCC2569", "OCC2569 nbpoles result", __FILE__, OCC2569, group); - theCommands.Add("OCC1642", "OCC1642 FinalWare FinalFace InitWare InitFace shape FixReorder FixDegenerated " "FixConnected FixSelfIntersection", diff --git a/src/Draw/TKQADraw/QABugs/QABugs_18.cxx b/src/Draw/TKQADraw/QABugs/QABugs_18.cxx index fd2687eb1d..955356d4ca 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_18.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_18.cxx @@ -18,16 +18,11 @@ #include #include #include -#include -#include - -#include #include #include #include -#include #include #include #include @@ -37,9 +32,6 @@ #include #include #include -#include - -#define DEFAULT_COLOR Quantity_NOC_GOLDENROD static int OCC267(Draw_Interpretor& di, int argc, const char** argv) { @@ -68,71 +60,6 @@ static int OCC267(Draw_Interpretor& di, int argc, const char** argv) return 0; } -static int OCC181(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 5) - { - di << "ERROR OCC181: Usage : " << argv[0] << " FileName path1 path2 verbose=0/1\n"; - return 1; - } - const char* aFileName = argv[1]; - const char* aDir1 = argv[2]; - const char* aDir2 = argv[3]; - int verboseInt = Draw::Atoi(argv[4]); - - bool verboseBool = false; - if (verboseInt != 0) - { - verboseBool = true; - } - - TCollection_AsciiString Env1, Env2, CSF_ = "set env(CSF_"; - Env1 = CSF_ + aFileName + "UserDefaults) " + aDir1; - Env2 = CSF_ + aFileName + "UserDefaults) " + aDir2; - - di.Eval(Env1.ToCString()); - - Resource_Manager aManager(aFileName, verboseBool); - - di.Eval(Env2.ToCString()); - - bool aStatus = aManager.Save(); - - if (aStatus) - { - di << "\nOCC181 : Status = TRUE\n"; - } - else - { - di << "\nOCC181 : Status = FALSE\n"; - } - - return 0; -} - -static int OCC27849(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 3) - { - di << "Usage : " << argv[0] << " \n"; - return 1; - } - const char* aEnvName = argv[1]; - const char* aResName = argv[2]; - - Resource_Manager aManager(aEnvName); - if (aManager.Find(aResName)) - { - di << aManager.Value(aResName); - } - else - { - di << "Error: could not find resource " << aResName; - } - - return 0; -} - static double delta_percent(double a, double b) { double result; @@ -262,12 +189,6 @@ void QABugs::Commands_18(Draw_Interpretor& theCommands) const char* group = "QABugs"; theCommands.Add("OCC267", "OCC267 DOC path", __FILE__, OCC267, group); - theCommands.Add("OCC181", "OCC181 FileName path1 path2 verbose=0/1", __FILE__, OCC181, group); - theCommands.Add("OCC27849", - "OCC27849 ", - __FILE__, - OCC27849, - group); theCommands.Add("OCC367", "OCC367 shape step goodX goodY goodZ percent_tolerance", __FILE__, diff --git a/src/Draw/TKQADraw/QABugs/QABugs_19.cxx b/src/Draw/TKQADraw/QABugs/QABugs_19.cxx index a33b04bca5..b842004d09 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_19.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_19.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -61,17 +60,14 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include #include #include #include #include +#include +#include +#include #ifdef HAVE_TBB Standard_DISABLE_DEPRECATION_WARNINGS @@ -110,56 +106,6 @@ Standard_DISABLE_DEPRECATION_WARNINGS return new Geom_ConicalSurface(anAxis, theSemiAngle, theR); } -static int OCC230(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 4) - { - di << "ERROR OCC230: Usage : " << argv[0] << " TrimmedCurve Pnt2d Pnt2d\n"; - return 1; - } - - gp_Pnt2d P1, P2; - if (!DrawTrSurf::GetPoint2d(argv[2], P1)) - { - di << "ERROR OCC230: " << argv[2] << " is not Pnt2d\n"; - return 1; - } - if (!DrawTrSurf::GetPoint2d(argv[3], P2)) - { - di << "ERROR OCC230: " << argv[3] << " is not Pnt2d\n"; - return 1; - } - - GC_MakeSegment2d MakeSegment(P1, P2); - const occ::handle& TrimmedCurve = MakeSegment.Value(); - DrawTrSurf::Set(argv[1], TrimmedCurve); - return 0; -} - -#include - -int OCC22611(Draw_Interpretor& di, int argc, const char** argv) -{ - - if (argc != 3) - { - di << "Usage : " << argv[0] << " string nb\n"; - return 1; - } - - TCollection_AsciiString aToken = argv[1]; - int aNb = atoi(argv[2]); - - occ::handle aGen = ExprIntrp_GenExp::Create(); - for (int i = 0; i < aNb; i++) - { - aGen->Process(aToken); - occ::handle aExpr = aGen->Expression(); - } - - return 0; -} - #include #include #include @@ -623,92 +569,6 @@ static int OCC23945(Draw_Interpretor& /*di*/, int n, const char** a) return 0; } -//================================================================================================= - -static int OCC24005(Draw_Interpretor& theDI, int theNArg, const char** theArgv) -{ - if (theNArg < 2) - { - theDI << "Wrong a number of arguments!\n"; - return 1; - } - - occ::handle plane(new Geom_Plane( - gp_Ax3(gp_Pnt(-72.948737453424499, 754.30437716359393, 259.52151854671678), - gp_Dir(6.2471473085930200e-007, -0.99999999999980493, 0.00000000000000000), - gp_Dir(0.99999999999980493, 6.2471473085930200e-007, 0.00000000000000000)))); - occ::handle cylinder(new Geom_CylindricalSurface( - gp_Ax3(gp_Pnt(-6.4812490053250649, 753.39408794522092, 279.16400974257465), - gp_Dir(1.0000000000000000, 0.0, 0.00000000000000000), - gp_Dir(0.0, 1.0000000000000000, 0.00000000000000000)), - 19.712534607908712)); - - DrawTrSurf::Set("pln", plane); - theDI << "pln\n"; - DrawTrSurf::Set("cyl", cylinder); - theDI << "cyl\n"; - - BRep_Builder builder; - TopoDS_Face face1, face2; - builder.MakeFace(face1, plane, Precision::Confusion()); - builder.MakeFace(face2, cylinder, Precision::Confusion()); - IntTools_FaceFace anInters; - anInters.SetParameters(false, true, true, Precision::Confusion()); - anInters.Perform(face1, face2); - - if (!anInters.IsDone()) - { - theDI << "No intersections found!\n"; - - return 1; - } - - // occ::handle aResult; - // gp_Pnt aPoint; - - const NCollection_Sequence& aCvsX = anInters.Lines(); - const NCollection_Sequence& aPntsX = anInters.Points(); - - char buf[1024]; - int aNbCurves, aNbPoints; - - aNbCurves = aCvsX.Length(); - aNbPoints = aPntsX.Length(); - - if (aNbCurves >= 2) - { - for (int i = 1; i <= aNbCurves; ++i) - { - Sprintf(buf, "%s_%d", theArgv[1], i); - theDI << buf << " "; - - const IntTools_Curve& aIC = aCvsX(i); - const occ::handle& aC3D = aIC.Curve(); - DrawTrSurf::Set(buf, aC3D); - } - } - else if (aNbCurves == 1) - { - const IntTools_Curve& aIC = aCvsX(1); - const occ::handle& aC3D = aIC.Curve(); - Sprintf(buf, "%s", theArgv[1]); - theDI << buf << " "; - DrawTrSurf::Set(buf, aC3D); - } - - for (int i = 1; i <= aNbPoints; ++i) - { - const IntTools_PntOn2Faces& aPi = aPntsX(i); - const gp_Pnt& aP = aPi.P1().Pnt(); - - Sprintf(buf, "%s_p_%d", theArgv[1], i); - theDI << buf << " "; - DrawTrSurf::Set(buf, aP); - } - - return 0; -} - #include #include #include @@ -943,100 +803,6 @@ struct QABugs_NHandleClass } }; -#include -#include - -static int OCC23951(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 2) - { - di << "Usage: " << argv[0] << " invalid number of arguments\n"; - return 1; - } - occ::handle aDoc = new TDocStd_Document("dummy"); - TopoDS_Shape s1 = BRepPrimAPI_MakeBox(1, 1, 1).Shape(); - TDF_Label lab1 = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main())->NewShape(); - XCAFDoc_DocumentTool::ShapeTool(aDoc->Main())->SetShape(lab1, s1); - TDataStd_Name::Set(lab1, "Box1"); - - Quantity_Color yellow(Quantity_NOC_YELLOW); - XCAFDoc_DocumentTool::ColorTool(aDoc->Main())->SetColor(lab1, yellow, XCAFDoc_ColorGen); - XCAFDoc_DocumentTool::ColorTool(aDoc->Main())->SetVisibility(lab1, false); - - STEPControl_StepModelType mode = STEPControl_AsIs; - STEPCAFControl_Writer writer; - if (!writer.Transfer(aDoc, mode)) - { - di << "The document cannot be translated or gives no result" << "\n"; - return 1; - } - - const occ::handle& aMsgMgr = Message::DefaultMessenger(); - NCollection_Sequence> aPrinters; - aPrinters.Append(aMsgMgr->ChangePrinters()); - aMsgMgr->AddPrinter(new Draw_Printer(di)); - - writer.Write(argv[1]); - - aMsgMgr->RemovePrinters(STANDARD_TYPE(Draw_Printer)); - aMsgMgr->ChangePrinters().Append(aPrinters); - - return 0; -} - -//================================================================================================= - -static int OCC23950(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 2) - { - di << "Usage : " << argv[0] << " step_file\n"; - return 1; - } - - occ::handle aDoc = new TDocStd_Document("dummy"); - TopoDS_Shape s6 = BRepBuilderAPI_MakeVertex(gp_Pnt(75, 0, 0)); - gp_Trsf t0; - TopLoc_Location location0(t0); - - TDF_Label lab1 = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main())->NewShape(); - XCAFDoc_DocumentTool::ShapeTool(aDoc->Main())->SetShape(lab1, s6); - TDataStd_Name::Set(lab1, "Point1"); - - TDF_Label labelA0 = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main())->NewShape(); - TDataStd_Name::Set(labelA0, "ASSEMBLY"); - - TDF_Label component01 = - XCAFDoc_DocumentTool::ShapeTool(aDoc->Main())->AddComponent(labelA0, lab1, location0); - XCAFDoc_DocumentTool::ShapeTool(aDoc->Main())->UpdateAssemblies(); - - Quantity_Color yellow(Quantity_NOC_YELLOW); - XCAFDoc_DocumentTool::ColorTool(labelA0)->SetColor(component01, yellow, XCAFDoc_ColorGen); - XCAFDoc_DocumentTool::ColorTool(labelA0)->SetVisibility(component01, false); - - STEPControl_StepModelType mode = STEPControl_AsIs; - STEPCAFControl_Writer writer; - if (!writer.Transfer(aDoc, mode)) - { - di << "The document cannot be translated or gives no result\n"; - return 1; - } - - const occ::handle& aMsgMgr = Message::DefaultMessenger(); - NCollection_Sequence> aPrinters; - aPrinters.Append(aMsgMgr->ChangePrinters()); - aMsgMgr->AddPrinter(new Draw_Printer(di)); - - writer.Write(argv[1]); - - aMsgMgr->RemovePrinters(STANDARD_TYPE(Draw_Printer)); - aMsgMgr->ChangePrinters().Append(aPrinters); - - return 0; -} - -//================================================================================================= - static int OCC24667(Draw_Interpretor& di, int n, const char** a) { if (n == 1) @@ -1236,156 +1002,6 @@ static int OCC24834(Draw_Interpretor& di, int n, const char** a) return 0; } -#include -#include - -//======================================================================= -// function : OCC25004 -// purpose : Check extremaCC on Branin function. -//======================================================================= -// Function is: -// f(u,v) = a*(v - b*u^2 + c*u-r)^2+s(1-t)*cos(u)+s -// Standard borders are: -// -5 <= u <= 10 -// 0 <= v <= 15 -class BraninFunction : public math_MultipleVarFunctionWithHessian -{ -public: - BraninFunction() - { - a = 1.0; - b = 5.1 / (4.0 * M_PI * M_PI); - c = 5.0 / M_PI; - r = 6.0; - s = 10.0; - t = 1.0 / (8.0 * M_PI); - } - - int NbVariables() const override { return 2; } - - bool Value(const math_Vector& X, double& F) override - { - double u = X(1); - double v = X(2); - - double aSqPt = (v - b * u * u + c * u - r); // Square Part of function. - double aLnPt = s * (1 - t) * cos(u); // Linear part of funcrtion. - F = a * aSqPt * aSqPt + aLnPt + s; - return true; - } - - bool Gradient(const math_Vector& X, math_Vector& G) override - { - double u = X(1); - double v = X(2); - - double aSqPt = (v - b * u * u + c * u - r); // Square Part of function. - G(1) = 2 * a * aSqPt * (c - 2 * b * u) - s * (1 - t) * sin(u); - G(2) = 2 * a * aSqPt; - - return true; - } - - bool Values(const math_Vector& X, double& F, math_Vector& G) override - { - Value(X, F); - Gradient(X, G); - - return true; - } - - bool Values(const math_Vector& X, double& F, math_Vector& G, math_Matrix& H) override - { - Value(X, F); - Gradient(X, G); - - double u = X(1); - double v = X(2); - - double aSqPt = (v - b * u * u + c * u - r); // Square Part of function. - double aTmpPt = c - 2 * b * u; // Tmp part. - H(1, 1) = 2 * a * aTmpPt * aTmpPt - 4 * a * b * aSqPt - s * (1 - t) * cos(u); - H(1, 2) = 2 * a * aTmpPt; - H(2, 1) = H(1, 2); - H(2, 2) = 2 * a; - - return true; - } - -private: - // Standard parameters. - double a, b, c, r, s, t; -}; - -static int OCC25004(Draw_Interpretor& theDI, int /*theNArg*/, const char** /*theArgs*/) -{ - BraninFunction aFunc; - - math_Vector aLower(1, 2), aUpper(1, 2); - aLower(1) = -5; - aLower(2) = 0; - aUpper(1) = 10; - aUpper(2) = 15; - - int aGridOrder = 16; - math_Vector aFuncValues(1, aGridOrder * aGridOrder); - - double aLipConst = 0; - math_Vector aCurrPnt1(1, 2), aCurrPnt2(1, 2); - - // Get Lipshitz constant estimation on regular grid. - int i, j, idx = 1; - for (i = 1; i <= aGridOrder; i++) - { - for (j = 1; j <= aGridOrder; j++) - { - aCurrPnt1(1) = aLower(1) + (aUpper(1) - aLower(1)) * (i - 1) / (aGridOrder - 1.0); - aCurrPnt1(2) = aLower(2) + (aUpper(2) - aLower(2)) * (j - 1) / (aGridOrder - 1.0); - - aFunc.Value(aCurrPnt1, aFuncValues(idx)); - idx++; - } - } - - int k, l; - int idx1, idx2; - for (i = 1; i <= aGridOrder; i++) - for (j = 1; j <= aGridOrder; j++) - for (k = 1; k <= aGridOrder; k++) - for (l = 1; l <= aGridOrder; l++) - { - if (i == k && j == l) - continue; - - aCurrPnt1(1) = aLower(1) + (aUpper(1) - aLower(1)) * (i - 1) / (aGridOrder - 1.0); - aCurrPnt1(2) = aLower(2) + (aUpper(2) - aLower(2)) * (j - 1) / (aGridOrder - 1.0); - idx1 = (i - 1) * aGridOrder + j; - - aCurrPnt2(1) = aLower(1) + (aUpper(1) - aLower(1)) * (k - 1) / (aGridOrder - 1.0); - aCurrPnt2(2) = aLower(2) + (aUpper(2) - aLower(2)) * (l - 1) / (aGridOrder - 1.0); - idx2 = (k - 1) * aGridOrder + l; - - aCurrPnt1.Add(-aCurrPnt2); - double dist = aCurrPnt1.Norm(); - - double C = std::abs(aFuncValues(idx1) - aFuncValues(idx2)) / dist; - if (C > aLipConst) - aLipConst = C; - } - - math_GlobOptMin aFinder(&aFunc, aLower, aUpper, aLipConst); - aFinder.Perform(); - //(-pi , 12.275), (pi , 2.275), (9.42478, 2.475) - - double anExtValue = aFinder.GetF(); - theDI << "F = " << anExtValue << "\n"; - - int aNbExt = aFinder.NbExtrema(); - theDI << "NbExtrema = " << aNbExt << "\n"; - - return 0; -} - #include #include @@ -1681,334 +1297,6 @@ static int OCC25340(Draw_Interpretor& /*theDI*/, int /*theArgNb*/, const char** return 0; } -//================================================================================================= - -class ParallelTest_Saxpy -{ -public: - //! Constructor - ParallelTest_Saxpy(const NCollection_Array1& theX, - NCollection_Array1& theY, - double theScalar) - : myX(theX), - myY(theY), - myScalar(theScalar) - { - } - - int Begin() const { return 0; } - - int End() const { return myX.Length(); } - - //! Dummy calculation - void operator()(int theIndex) const { myY(theIndex) = myScalar * myX(theIndex) + myY(theIndex); } - - //! Dummy calculation - void operator()(int theThreadIndex, int theIndex) const - { - (void)theThreadIndex; - myY(theIndex) = myScalar * myX(theIndex) + myY(theIndex); - } - -private: - ParallelTest_Saxpy(const ParallelTest_Saxpy&) = delete; - ParallelTest_Saxpy& operator=(ParallelTest_Saxpy&) = delete; - -protected: - const NCollection_Array1& myX; - NCollection_Array1& myY; - const double myScalar; -}; - -class ParallelTest_SaxpyBatch : private ParallelTest_Saxpy -{ -public: - static const int THE_BATCH_SIZE = 10000000; - - ParallelTest_SaxpyBatch(const NCollection_Array1& theX, - NCollection_Array1& theY, - double theScalar) - : ParallelTest_Saxpy(theX, theY, theScalar), - myNbBatches((int)std::ceil((double)theX.Size() / THE_BATCH_SIZE)) - { - } - - int Begin() const { return 0; } - - int End() const { return myNbBatches; } - - void operator()(int theBatchIndex) const - { - const int aLower = theBatchIndex * THE_BATCH_SIZE; - const int anUpper = std::min(aLower + THE_BATCH_SIZE - 1, myX.Upper()); - for (int i = aLower; i <= anUpper; ++i) - { - myY(i) = myScalar * myX(i) + myY(i); - } - } - - void operator()(int theThreadIndex, int theBatchIndex) const - { - (void)theThreadIndex; - (*this)(theBatchIndex); - } - -private: - int myNbBatches; -}; - -//--------------------------------------------------------------------- -static int OCC24826(Draw_Interpretor& theDI, int theArgc, const char** theArgv) -{ - if (theArgc != 2) - { - theDI << "Usage: " << theArgv[0] << " vec_length\n"; - return 1; - } - - // Generate data; - int aLength = Draw::Atoi(theArgv[1]); - - NCollection_Array1 aX(0, aLength - 1); - NCollection_Array1 anY(0, aLength - 1); - for (int i = 0; i < aLength; ++i) - { - aX(i) = anY(i) = (double)i; - } - - //! Serial processing - NCollection_Array1 anY1 = anY; - double aTimeSeq = 0.0; - { - OSD_Timer aTimer; - aTimer.Start(); - const ParallelTest_Saxpy aFunctor(aX, anY1, 1e-6); - for (int i = 0; i < aLength; ++i) - { - aFunctor(i); - } - - aTimer.Stop(); - std::cout << " Processing time (sequential mode): 1x [reference]\n"; - aTimeSeq = aTimer.ElapsedTime(); - aTimer.Show(std::cout); - } - - // Parallel processing - for (int aMode = 0; aMode <= 4; ++aMode) - { - NCollection_Array1 anY2 = anY; - OSD_Timer aTimer; - aTimer.Start(); - const char* aModeDesc = nullptr; - const ParallelTest_Saxpy aFunctor1(aX, anY2, 1e-6); - const ParallelTest_SaxpyBatch aFunctor2(aX, anY2, 1e-6); - switch (aMode) - { - case 0: { - aModeDesc = "OSD_Parallel::For()"; - OSD_Parallel::For(aFunctor1.Begin(), aFunctor1.End(), aFunctor1); - break; - } - case 1: { - aModeDesc = "OSD_ThreadPool::Launcher"; - OSD_ThreadPool::Launcher aLauncher(*OSD_ThreadPool::DefaultPool()); - aLauncher.Perform(aFunctor1.Begin(), aFunctor1.End(), aFunctor1); - break; - } - case 2: { - aModeDesc = "OSD_Parallel::Batched()"; - OSD_Parallel::For(aFunctor2.Begin(), aFunctor2.End(), aFunctor2); - break; - } - case 3: { - aModeDesc = "OSD_ThreadPool::Launcher, Batched"; - OSD_ThreadPool::Launcher aLauncher(*OSD_ThreadPool::DefaultPool()); - aLauncher.Perform(aFunctor2.Begin(), aFunctor2.End(), aFunctor2); - break; - } - case 4: { -#ifdef HAVE_TBB - aModeDesc = "tbb::parallel_for"; - tbb::parallel_for(aFunctor1.Begin(), aFunctor1.End(), aFunctor1); - break; -#else - continue; -#endif - } - } - aTimer.Stop(); - std::cout << " " << aModeDesc << ": " << aTimeSeq / aTimer.ElapsedTime() << "x " - << (aTimer.ElapsedTime() < aTimeSeq ? "[boost]" : "[slow-down]") << "\n"; - aTimer.Show(std::cout); - - for (int i = 0; i < aLength; ++i) - { - if (anY2(i) != anY1(i)) - { - std::cerr << "Error: Parallel algorithm produced invalid result!\n"; - break; - } - } - } - return 0; -} - -//! Initializes the given square matrix with values that are generated by the given generator -//! function. -template -void initRandMatrix(NCollection_Array2& theMat, GeneratorT& theGen) -{ - for (int i = theMat.LowerRow(); i <= theMat.UpperRow(); ++i) - { - for (int j = theMat.LowerCol(); j <= theMat.UpperCol(); ++j) - { - theMat(i, j) = static_cast(theGen()); - } - } -} - -//! Compute the product of two square matrices in parallel. -class ParallelTest_MatMult -{ -public: - ParallelTest_MatMult(const NCollection_Array2& theMat1, - const NCollection_Array2& theMat2, - NCollection_Array2& theResult, - int theSize) - : myMat1(theMat1), - myMat2(theMat2), - myResult(theResult), - mySize(theSize) - { - } - - int Begin() const { return 0; } - - int End() const { return mySize; } - - void operator()(int theIndex) const - { - for (int j = 0; j < mySize; ++j) - { - double aTmp = 0; - for (int k = 0; k < mySize; ++k) - { - aTmp += myMat1(theIndex, k) * myMat2(k, j); - } - myResult(theIndex, j) = aTmp; - } - } - - void operator()(int theThreadIndex, int theIndex) const - { - (void)theThreadIndex; - (*this)(theIndex); - } - -private: - ParallelTest_MatMult(const ParallelTest_MatMult&) = delete; - ParallelTest_MatMult& operator=(ParallelTest_MatMult&) = delete; - -protected: - const NCollection_Array2& myMat1; - const NCollection_Array2& myMat2; - NCollection_Array2& myResult; - int mySize; -}; - -//--------------------------------------------------------------------- -static int OCC29935(Draw_Interpretor&, int theArgc, const char** theArgv) -{ - if (theArgc != 2) - { - std::cout << "Syntax error: wrong number of arguments\n"; - return 1; - } - - // Generate data; - int aSize = Draw::Atoi(theArgv[1]); - - std::mt19937 aGen(42); - NCollection_Array2 aMat1(0, aSize - 1, 0, aSize - 1); - NCollection_Array2 aMat2(0, aSize - 1, 0, aSize - 1); - NCollection_Array2 aMatResRef(0, aSize - 1, 0, aSize - 1); - NCollection_Array2 aMatRes(0, aSize - 1, 0, aSize - 1); - initRandMatrix(aMat1, aGen); - initRandMatrix(aMat2, aGen); - - //! Serial processing - double aTimeSeq = 0.0; - { - OSD_Timer aTimer; - aTimer.Start(); - ParallelTest_MatMult aFunctor(aMat1, aMat2, aMatResRef, aSize); - for (int i = aFunctor.Begin(); i < aFunctor.End(); ++i) - { - aFunctor(i); - } - - aTimer.Stop(); - std::cout << " Processing time (sequential mode): 1x [reference]\n"; - aTimeSeq = aTimer.ElapsedTime(); - aTimer.Show(std::cout); - } - - // Parallel processing - for (int aMode = 0; aMode <= 2; ++aMode) - { - aMatRes.Init(0.0); - - OSD_Timer aTimer; - aTimer.Start(); - const char* aModeDesc = nullptr; - ParallelTest_MatMult aFunctor1(aMat1, aMat2, aMatRes, aSize); - switch (aMode) - { - case 0: { - aModeDesc = "OSD_Parallel::For()"; - OSD_Parallel::For(aFunctor1.Begin(), aFunctor1.End(), aFunctor1); - break; - } - case 1: { - aModeDesc = "OSD_ThreadPool::Launcher"; - OSD_ThreadPool::Launcher aLauncher(*OSD_ThreadPool::DefaultPool()); - aLauncher.Perform(aFunctor1.Begin(), aFunctor1.End(), aFunctor1); - break; - } - case 2: { -#ifdef HAVE_TBB - aModeDesc = "tbb::parallel_for"; - tbb::parallel_for(aFunctor1.Begin(), aFunctor1.End(), aFunctor1); - break; -#else - continue; -#endif - } - } - aTimer.Stop(); - std::cout << " " << aModeDesc << ": " << aTimeSeq / aTimer.ElapsedTime() << "x " - << (aTimer.ElapsedTime() < aTimeSeq ? "[boost]" : "[slow-down]") << "\n"; - aTimer.Show(std::cout); - - for (int i = 0; i < aSize; ++i) - { - for (int j = 0; j < aSize; ++j) - { - if (aMatRes(i, j) != aMatResRef(i, j)) - { - std::cerr << "Error: Parallel algorithm produced invalid result!\n"; - i = aSize; - break; - } - } - } - } - return 0; -} - -/*****************************************************************************/ - #include //================================================================================================= @@ -2545,331 +1833,6 @@ int xprojponf(Draw_Interpretor& di, int n, const char** a) return 0; } -//================================================================================================= - -#include -#include - -static bool inspect_point(const gp_XY& thePoint, const gp_XY& theCenter, const double theRadius) -{ - static double aPrecision = Precision::PConfusion(); - static double aSqPrecision = aPrecision * aPrecision; - const gp_XY aDistVec = thePoint - theCenter; - return aDistVec.SquareModulus() - (theRadius * theRadius) < aSqPrecision; -} - -static int OCC24923(Draw_Interpretor& theDI, int argc, const char** argv) -{ - srand(static_cast(time(nullptr))); - - const double aMaxDeviation = (argc > 1) ? Draw::Atof(argv[1]) : 0.01; - const int aPointsNb = 10000000; - const double aMinAngle = 5 * M_PI / 180.; - static double aSqPrecision = Precision::PConfusion() * Precision::PConfusion(); - - int aFailedNb = 0; - for (int i = 0; i < aPointsNb; ++i) - { - gp_XY p[3]; - for (int j = 0; j < 3; ++j) - p[j].SetCoord(((double)rand()) / RAND_MAX, ((double)rand()) / RAND_MAX); - - // Check that points do not compose degenerated triangle. - gp_XY aVec1 = p[1] - p[0]; - gp_XY aVec2 = p[2] - p[0]; - if (aVec1.SquareModulus() > aSqPrecision && aVec2.SquareModulus() > aSqPrecision - && (aVec1 ^ aVec2) > aMinAngle) - { - gp_XY aCenter; - double aRadius; - if (BRepMesh_CircleTool::MakeCircle(p[0], p[1], p[2], aCenter, aRadius)) - { - if (!inspect_point(p[0], aCenter, aRadius) || !inspect_point(p[1], aCenter, aRadius) - || !inspect_point(p[2], aCenter, aRadius)) - { - /* theDI << "Missed: " << - "p1=(" << p1.X() << ", " << p1.Y() << "), " << - "p2=(" << p2.X() << ", " << p2.Y() << "), " << - "p3=(" << p3.X() << ", " << p3.Y() << "), " << - "c=(" << aCenter.X() << ", " << aCenter.Y() << "), " << - "r=" << aRadius << "\n";*/ - - ++aFailedNb; - } - - continue; - } - } - - // Ensure that aPointsNb suitable for tests are generated - --i; - } - - const double aDeviation = 1. - (double)(aPointsNb - aFailedNb) / (double)aPointsNb; - - theDI << "Number of incorrect cases: " << aFailedNb << " (Total " << aPointsNb << ")\n"; - if (aDeviation > aMaxDeviation) - { - theDI << "Failed. Number of incorrect results is too huge: " << aDeviation * 100 << "% (Max " - << aMaxDeviation * 100 << "%)\n"; - return 1; - } - - theDI << "Deviation of incorrect results is: " << aDeviation * 100 << "% (Max " - << aMaxDeviation * 100 << "%)\n"; - theDI << "Test completed\n"; - return 0; -} - -//======================================================================= -// function : OCC25574 -// purpose : check implementation of Euler angles in gp_Quaternion -//======================================================================= - -static int OCC25574(Draw_Interpretor& theDI, int /*argc*/, const char** /*argv*/) -{ - bool isTestOk = true; - - // Check consistency of Get and Set operations for Euler angles - gp_Quaternion aQuat; - aQuat.Set(0.06766916507860499, 0.21848101129786085, 0.11994599260380681, 0.9660744746954637); - double alpha, beta, gamma; - gp_Mat aRinv = aQuat.GetMatrix().Inverted(); - gp_Mat aI; - aI.SetIdentity(); - const char* names[] = {"Extrinsic_XYZ", "Extrinsic_XZY", "Extrinsic_YZX", "Extrinsic_YXZ", - "Extrinsic_ZXY", "Extrinsic_ZYX", "Intrinsic_XYZ", "Intrinsic_XZY", - "Intrinsic_YZX", "Intrinsic_YXZ", "Intrinsic_ZXY", "Intrinsic_ZYX", - "Extrinsic_XYX", "Extrinsic_XZX", "Extrinsic_YZY", "Extrinsic_YXY", - "Extrinsic_ZYZ", "Extrinsic_ZXZ", "Intrinsic_XYX", "Intrinsic_XZX", - "Intrinsic_YZY", "Intrinsic_YXY", "Intrinsic_ZXZ", "Intrinsic_ZYZ"}; - for (int i = gp_Extrinsic_XYZ; i <= gp_Intrinsic_ZYZ; i++) - { - aQuat.GetEulerAngles(gp_EulerSequence(i), alpha, beta, gamma); - - gp_Quaternion aQuat2; - aQuat2.SetEulerAngles(gp_EulerSequence(i), alpha, beta, gamma); - - gp_Mat aR = aQuat2.GetMatrix(); - gp_Mat aDiff = aR * aRinv - aI; - if (aDiff.Determinant() > 1e-5) - { - theDI << "Error: Euler angles conversion incorrect for sequence " - << names[i - gp_Extrinsic_XYZ] << "\n"; - isTestOk = false; - } - } - - // Check conversion between intrinsic and extrinsic rotations - // Any extrinsic rotation is equivalent to an intrinsic rotation - // by the same angles but with inverted order of elemental rotations, and vice versa - // For instance: - // Extrinsic_XZY = Incrinsic_XZY - // R = X(A)Z(B)Y(G) --> R = Y(G)Z(B)X(A) - alpha = 0.1517461713131; - beta = 1.5162198410141; - gamma = 1.9313156236541; - double alpha2, beta2, gamma2; - gp_EulerSequence pairs[][2] = {{gp_Extrinsic_XYZ, gp_Intrinsic_ZYX}, - {gp_Extrinsic_XZY, gp_Intrinsic_YZX}, - {gp_Extrinsic_YZX, gp_Intrinsic_XZY}, - {gp_Extrinsic_YXZ, gp_Intrinsic_ZXY}, - {gp_Extrinsic_ZXY, gp_Intrinsic_YXZ}, - {gp_Extrinsic_ZYX, gp_Intrinsic_XYZ}}; - for (int i = 0; i < 6; i++) - { - aQuat.SetEulerAngles(pairs[i][0], alpha, beta, gamma); - aQuat.GetEulerAngles(pairs[i][1], gamma2, beta2, alpha2); - - if (std::abs(alpha - alpha2) > 1e-5 || std::abs(beta - beta2) > 1e-5 - || std::abs(gamma - gamma2) > 1e-5) - { - theDI << "Error: intrinsic and extrinsic conversion incorrect for sequence " << names[i] - << "\n"; - isTestOk = false; - } - } - - // Check correspondence of enumeration and actual rotation it defines, - // by rotation by one axis and checking that it does not change a point on that axis - for (int i = gp_Extrinsic_XYZ; i <= gp_Intrinsic_ZYZ; i++) - { - // Iterate over rotations R(A)R(B)R(G) for each Euler angle Alpha, Beta, Gamma - // There are three ordered axes corresponding to three rotations. - // Each rotation applied with current angle around current axis. - for (int j = 0; j < 3; j++) - { - // note that current axis index is obtained by parsing of enumeration name! - int anAxis = names[i - gp_Extrinsic_XYZ][10 + j] - 'X'; - Standard_ASSERT_RETURN(anAxis >= 0 && anAxis <= 2, - "Incorrect parsing of enumeration name", - 1); - - // Set 90 degrees to current Euler angle - double anAngles[3] = {0., 0., 0.}; - anAngles[j] = 0.5 * M_PI; - - gp_Quaternion q2; - q2.SetEulerAngles(gp_EulerSequence(i), anAngles[0], anAngles[1], anAngles[2]); - - // Set point on axis corresponding to current rotation - // We will apply rotation around this axis - gp_XYZ v(0., 0., 0.); - v.SetCoord(anAxis + 1, 1.); - - // Apply rotation to point - gp_Trsf aT; - aT.SetRotation(q2); - gp_XYZ v2 = v; - aT.Transforms(v2); - - // Check that point is still on origin position - if ((v - v2).SquareModulus() > Precision::SquareConfusion()) - { - // avoid reporting small coordinates - for (int k = 1; k <= 3; k++) - if (std::abs(v2.Coord(k)) < Precision::Confusion()) - v2.SetCoord(k, 0.); - - isTestOk = false; - theDI << "Error: Euler sequence " << names[i - gp_Extrinsic_XYZ] << " is incorrect:\n"; - theDI << "rotating by angle 90 deg around " - << (anAxis == 0 ? "X" - : anAxis == 1 ? "Y" - : "Z") - << " converts vector (" << v.X() << ", " << v.Y() << ", " << v.Z() << ") to (" - << v2.X() << ", " << v2.Y() << ", " << v2.Z() << ")\n"; - } - } - } - - // Check correspondence of enumeration and actual rotation it defines, - // by comparing cumulative rotation matrix with sequence of rotations by axes - const double anAngle[3] = {0.1, 0.2, 0.3}; - for (int i = gp_Extrinsic_XYZ; i <= gp_Intrinsic_ZYZ; i++) - { - // Sequence of rotations - gp_Mat aR[3]; - for (int j = 0; j < 3; j++) - { - // note that current axis index is obtained by parsing of enumeration name! - int anAxis = names[i - gp_Extrinsic_XYZ][10 + j] - 'X'; - Standard_ASSERT_RETURN(anAxis >= 0 && anAxis <= 2, - "Incorrect parsing of enumeration name", - 1); - - // Set point on axis corresponding to current rotation - // We will apply rotation around this axis - gp_XYZ v(0., 0., 0.); - v.SetCoord(anAxis + 1, 1.); - aR[j].SetRotation(v, anAngle[j]); - } - - // construct cumulative transformation (differently for extrinsic and intrinsic rotations); - // note that we parse first symbol of the enum name to identify its type - gp_Mat aRot; - if (names[i - gp_Extrinsic_XYZ][0] == 'E') // extrinsic - { - aRot = aR[2] * aR[1] * aR[0]; - } - else // intrinsic - { - aRot = aR[0] * aR[1] * aR[2]; - } - - // set the same angles in quaternion - aQuat.SetEulerAngles(gp_EulerSequence(i), anAngle[0], anAngle[1], anAngle[2]); - - gp_Mat aRQ = aQuat.GetMatrix(); - gp_Mat aDiff = aRQ * aRot.Inverted() - aI; - if (aDiff.Determinant() > 1e-5) - { - theDI << "Error: Euler angles conversion does not correspond to sequential rotations for " - << names[i - gp_Extrinsic_XYZ] << "\n"; - isTestOk = false; - } - } - - // similar checkfor YawPitchRoll sequence as defined in description of #25574 - { - // Start with world coordinate system - gp_Ax2 world; - - // Perform three rotations using the yaw-pitch-roll convention. - // This means: rotate around the original z axis with angle alpha, - // then rotate around the new y axis with angle beta, - // then rotate around the new x axis with angle gamma. - alpha = 0.0 / 180.0 * M_PI; - beta = -35.0 / 180.0 * M_PI; - gamma = 90.0 / 180.0 * M_PI; - - const gp_Quaternion rotationZ(world.Direction(), alpha); - const gp_Vec rotY = rotationZ.Multiply(world.YDirection()); - const gp_Vec rotX = rotationZ.Multiply(world.XDirection()); - - const gp_Quaternion rotationY(rotY, beta); - const gp_Vec rotZ = rotationY.Multiply(world.Direction()); - const gp_Vec rotRotX = rotationY.Multiply(rotX); - - const gp_Quaternion rotationX(rotRotX, gamma); - const gp_Vec rotRotZ = rotationX.Multiply(rotZ); - - gp_Ax2 result(gp_Pnt(0.0, 0.0, 0.0), rotRotZ, rotRotX); - - // Now compute the Euler angles - gp_Trsf transformation; - transformation.SetDisplacement(gp_Ax2(), result); - - double computedAlpha; - double computedBeta; - double computedGamma; - - transformation.GetRotation().GetEulerAngles(gp_YawPitchRoll, - computedAlpha, - computedBeta, - computedGamma); - - // We expect now to get the same angles as we have used for our rotations - if (std::abs(alpha - computedAlpha) > 1e-5 || std::abs(beta - computedBeta) > 1e-5 - || std::abs(gamma - computedGamma) > 1e-5) - { - theDI << "Error: unexpected values of Euler angles for YawPitchRoll sequence:\n"; - theDI << "alpha: " << alpha / M_PI * 180.0 - << " and computed alpha: " << computedAlpha / M_PI * 180.0 << "\n"; - theDI << "beta: " << beta / M_PI * 180.0 - << " and computed beta: " << computedBeta / M_PI * 180.0 << "\n"; - theDI << "gamma: " << gamma / M_PI * 180.0 - << " and computed gamma: " << computedGamma / M_PI * 180.0 << "\n"; - isTestOk = false; - } - } - - // test from #25946 - { - gp_Quaternion q; - q.Set(0.06766916507860499, 0.21848101129786085, 0.11994599260380681, 0.9660744746954637); - - q.GetEulerAngles(gp_Intrinsic_ZYX, alpha, beta, gamma); - q.GetEulerAngles(gp_Extrinsic_XYZ, alpha2, beta2, gamma2); - - // gp_Intrinsic_ZYX and gp_Extrinsic_XYZ should produce the same values of angles but in - // opposite order - if (std::abs(alpha - gamma2) > 1e-5 || std::abs(beta - beta2) > 1e-5 - || std::abs(gamma - alpha2) > 1e-5) - { - theDI - << "Error: Euler angles computed for gp_Intrinsic_ZYX and gp_Extrinsic_XYZ do not match:\n"; - theDI << "alpha: " << alpha / M_PI * 180.0 << " and " << alpha2 / M_PI * 180.0 << "\n"; - theDI << "beta: " << beta / M_PI * 180.0 << " and " << beta2 / M_PI * 180.0 << "\n"; - theDI << "gamma: " << gamma / M_PI * 180.0 << " and " << gamma2 / M_PI * 180.0 << "\n"; - isTestOk = false; - } - } - - theDI << (isTestOk ? "Test completed" : "Test failed") << "\n"; - return 0; -} - #include #include @@ -2922,80 +1885,6 @@ int OCC26446(Draw_Interpretor& di, int n, const char** a) //================================================================================================= -#include -#include -#include - -static int OCC26407(Draw_Interpretor& theDI, int theArgNb, const char** theArgVec) -{ - if (theArgNb != 2) - { - std::cerr << "Error: wrong number of arguments! See usage:\n"; - theDI.PrintHelp(theArgVec[0]); - return 1; - } - - // Construct vertices. - std::vector wire_vertices; - wire_vertices.push_back( - BRepBuilderAPI_MakeVertex(gp_Pnt(587.90000000000009094947, 40.6758179230516248026106, 88.5))); - wire_vertices.push_back( - BRepBuilderAPI_MakeVertex(gp_Pnt(807.824182076948432040808, 260.599999999999965893949, 88.5))); - wire_vertices.push_back(BRepBuilderAPI_MakeVertex( - gp_Pnt(644.174182076948454778176, 424.249999999999943156581, 88.5000000000000142108547))); - wire_vertices.push_back( - BRepBuilderAPI_MakeVertex(gp_Pnt(629.978025792618950617907, 424.25, 88.5))); - wire_vertices.push_back( - BRepBuilderAPI_MakeVertex(gp_Pnt(793.628025792618700506864, 260.599999999999852207111, 88.5))); - wire_vertices.push_back( - BRepBuilderAPI_MakeVertex(gp_Pnt(587.900000000000204636308, 54.8719742073813492311274, 88.5))); - wire_vertices.push_back( - BRepBuilderAPI_MakeVertex(gp_Pnt(218.521974207381418864315, 424.250000000000056843419, 88.5))); - wire_vertices.push_back( - BRepBuilderAPI_MakeVertex(gp_Pnt(204.325817923051886282337, 424.249999999999943156581, 88.5))); - - // Construct wire. - BRepBuilderAPI_MakeWire wire_builder; - for (size_t i = 0; i < wire_vertices.size(); i++) - { - const TopoDS_Vertex& v = wire_vertices[i]; - const TopoDS_Vertex& w = wire_vertices[(i + 1) % wire_vertices.size()]; - - wire_builder.Add(BRepBuilderAPI_MakeEdge(v, w)); - } - - // Create face and triangulate it. - // Construct face. - gp_Pnt v0 = BRep_Tool::Pnt(wire_vertices[0]); - gp_Pnt v1 = BRep_Tool::Pnt(wire_vertices[1]); - gp_Pnt v2 = BRep_Tool::Pnt(wire_vertices[wire_vertices.size() - 1]); - - gp_Vec face_normal = gp_Vec(v0, v1).Crossed(gp_Vec(v0, v2)); - - TopoDS_Face face = BRepBuilderAPI_MakeFace(gp_Pln(v0, face_normal), wire_builder); - BRepMesh_IncrementalMesh m(face, 1e-7); - - if (m.GetStatusFlags() != 0) - { - theDI << "Failed. Status for face constructed from vertices: " << m.GetStatusFlags() << "\n"; - return 1; - } - DBRep::Set(theArgVec[1], face); - char buf[256]; - Sprintf(buf, "isos %s 0", theArgVec[1]); - theDI.Eval(buf); - - Sprintf(buf, "triangles %s", theArgVec[1]); - theDI.Eval(buf); - - theDI.Eval("smallview; fit"); - - theDI << "Test completed\n"; - return 0; -} - -//================================================================================================= - #include static int OCC26485(Draw_Interpretor& theDI, int theArgNb, const char** theArgVec) @@ -3390,245 +2279,6 @@ int OCC26525(Draw_Interpretor& di, int n, const char** a) return 0; } -//======================================================================= -// function : OCC24537 -// purpose : Puts inverted numbers (in the sense of little/big endian inversion) -// from predefined arrays. -//======================================================================= -#include - -template -inline const unsigned char* SizeRef(); - -template <> -inline const unsigned char* SizeRef<8>() -{ - static const unsigned char aSizeRef[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - return aSizeRef; -} - -template <> -inline const unsigned char* SizeRef<4>() -{ - static const unsigned char aSizeRef[] = { - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00}; - return aSizeRef; -} - -static int OCC24537(Draw_Interpretor& theDI, int argc, const char** argv) -{ - std::ofstream aF; - if (argc > 1) - { - aF.open(argv[1]); - if (!aF.is_open()) - { - std::cout << "cannot create file " << argv[1] << std::endl; - return 1; - } - } - bool isErr = false; - // 1. InverseInt - const unsigned char anIntRef[] = {0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00}; - int anIntArr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; - if (aF.is_open()) - { - for (int i = 0; i < 10; ++i) - { - int anInv = FSD_BinaryFile::InverseInt(anIntArr[i]); - aF.write(reinterpret_cast(&anInv), sizeof(anInv)); - } - } - else - { - int anInv[10]; - for (int i = 0; i < 10; ++i) - anInv[i] = FSD_BinaryFile::InverseInt(anIntArr[i]); - if (memcmp(anInv, anIntRef, sizeof(anIntRef)) != 0) - { - theDI << "Error: incorrect conversion of an integer value\n"; - isErr = true; - } - } - - // 1a. Random InverseInt - const unsigned char aRndIntRef[] = {0xFF, 0xC2, 0xF7, 0x00, 0xFF, 0xFF, 0xFB, 0x2E, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0xD2, - 0x00, 0x00, 0x04, 0xD3, 0xFF, 0xFF, 0xFD, 0x1E, 0xFF, 0xFF, - 0xFF, 0xFB, 0x00, 0x00, 0x03, 0x8D, 0x00, 0x3D, 0x09, 0x00}; - int aRndIntArr[] = {-4000000, -1234, 0, 1, 1234, 1235, -738, -5, 909, 4000000}; - if (aF.is_open()) - { - for (int i = 0; i < 10; ++i) - { - int anInv = FSD_BinaryFile::InverseInt(aRndIntArr[i]); - aF.write(reinterpret_cast(&anInv), sizeof(anInv)); - } - } - else - { - int anInv[10]; - for (int i = 0; i < 10; ++i) - anInv[i] = FSD_BinaryFile::InverseInt(aRndIntArr[i]); - if (memcmp(anInv, aRndIntRef, sizeof(aRndIntRef)) != 0) - { - theDI << "Error: incorrect conversion of a dispersed integer value\n"; - isErr = true; - } - } - - // 2. InverseReal - const unsigned char aRealRef[] = { - 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - const double aRealArr[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 0.0}; - if (aF.is_open()) - { - for (int i = 0; i < 10; ++i) - { - double anInv = FSD_BinaryFile::InverseReal(aRealArr[i]); - aF.write(reinterpret_cast(&anInv), sizeof(anInv)); - } - } - else - { - double anInv[10]; - for (int i = 0; i < 10; ++i) - anInv[i] = FSD_BinaryFile::InverseReal(aRealArr[i]); - if (memcmp(anInv, aRealRef, sizeof(aRealRef)) != 0) - { - theDI << "Error: incorrect conversion of a real value\n"; - isErr = true; - } - } - - // 2a. Random InverseReal - const unsigned char aRndRealRef[] = { - 0xFE, 0x37, 0xE4, 0x3C, 0x88, 0x00, 0x75, 0x9C, 0xBE, 0x11, 0x2E, 0x0B, 0xE8, 0x26, 0xD6, 0x95, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x11, 0x2E, 0x0B, 0xE8, 0x26, 0xD6, 0x95, - 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x09, 0x21, 0xDA, 0x45, 0x5B, 0x53, 0xE4, - 0x54, 0xB2, 0x49, 0xAD, 0x25, 0x94, 0xC3, 0x7D, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC0, 0x23, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0x40, 0x23, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD}; - const double aRndRealArr[] = {-1e300, -1.e-9, 0., 1.e-9, 1., 3.1415296, 1.e100, 8.0, -9.9, 9.9}; - if (aF.is_open()) - { - for (int i = 0; i < 10; ++i) - { - double anInv = FSD_BinaryFile::InverseReal(aRndRealArr[i]); - aF.write(reinterpret_cast(&anInv), sizeof(anInv)); - } - } - else - { - double anInv[10]; - for (int i = 0; i < 10; ++i) - anInv[i] = FSD_BinaryFile::InverseReal(aRndRealArr[i]); - if (memcmp(anInv, aRndRealRef, sizeof(aRndRealRef)) != 0) - { - theDI << "Error: incorrect conversion of a dispersed real value\n"; - isErr = true; - } - } - - // 3. InverseShortReal - const unsigned char aShortRealRef[] = { - 0x3F, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x80, - 0x00, 0x00, 0x40, 0xA0, 0x00, 0x00, 0x40, 0xC0, 0x00, 0x00, 0x40, 0xE0, 0x00, 0x00, - 0x41, 0x00, 0x00, 0x00, 0x41, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - const float aShortRealArr[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 0.0f}; - if (aF.is_open()) - { - for (int i = 0; i < 10; ++i) - { - float anInv = FSD_BinaryFile::InverseShortReal(aShortRealArr[i]); - aF.write(reinterpret_cast(&anInv), sizeof(anInv)); - } - } - else - { - float anInv[10]; - for (int i = 0; i < 10; ++i) - anInv[i] = FSD_BinaryFile::InverseShortReal(aShortRealArr[i]); - if (memcmp(anInv, aShortRealRef, sizeof(aShortRealRef)) != 0) - { - theDI << "Error: incorrect conversion of a short real value\n"; - isErr = true; - } - } - - // 3a. Random InverseShortReal - const unsigned char aRndShortRealRef[] = { - 0xB0, 0x89, 0x70, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x70, 0x5F, 0x3F, 0x80, - 0x00, 0x00, 0x40, 0x49, 0x0E, 0x56, 0xC0, 0xD6, 0x66, 0x66, 0x40, 0xD6, 0x66, 0x66, - 0x42, 0xC5, 0xCC, 0xCD, 0xC2, 0xC7, 0xCC, 0xCD, 0x42, 0xC7, 0xCC, 0xCD}; - const float aRndShortRealArr[] = - {-1.e-9f, 0.f, 1.e-9f, 1.f, 3.1415f, -6.7f, 6.7f, 98.9f, -99.9f, 99.9f}; - if (aF.is_open()) - { - for (int i = 0; i < 10; ++i) - { - float anInv = FSD_BinaryFile::InverseShortReal(aRndShortRealArr[i]); - aF.write(reinterpret_cast(&anInv), sizeof(anInv)); - } - } - else - { - float anInv[10]; - for (int i = 0; i < 10; ++i) - anInv[i] = FSD_BinaryFile::InverseShortReal(aRndShortRealArr[i]); - if (memcmp(anInv, aRndShortRealRef, sizeof(aRndShortRealRef)) != 0) - { - theDI << "Error: incorrect conversion of a dispersed short real value\n"; - isErr = true; - } - } - - // 4. InverseSize - const size_t aSizeArr[] = {1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 0ul}; - if (aF.is_open()) - { - for (int i = 0; i < 10; ++i) - { - size_t anInv = FSD_BinaryFile::InverseSize(aSizeArr[i]); - aF.write(reinterpret_cast(&anInv), sizeof(anInv)); - } - } - else - { - size_t anInv[10]; - const unsigned char* aSizeRef = SizeRef(); - for (int i = 0; i < 10; ++i) - anInv[i] = FSD_BinaryFile::InverseSize(aSizeArr[i]); - if (memcmp(anInv, aSizeRef, sizeof(size_t) * 10) != 0) - { - theDI << "Error: incorrect conversion of a size value\n"; - isErr = true; - } - } - - if (!aF.is_open() && !isErr) - theDI << "Conversion was done OK"; - if (aF.is_open()) - { - std::cout << "the file " << argv[1] << " has been created" << std::endl; - aF.close(); - } - return 0; -} - #include static TopoDS_Shape taper(const TopoDS_Shape& shape, @@ -3721,141 +2371,6 @@ static int OCC26396(Draw_Interpretor& theDI, int theArgc, const char** theArgv) return 0; } -//================================================================================================= - -static int OCC26750(Draw_Interpretor& theDI, int /*theNArg*/, const char** /*theArgVal*/) -{ - const gp_Vec2d aVec1(1.0, 0.0); - const gp_Vec2d aVec2(0.0, -1.0); - - if (aVec1.IsNormal(aVec2, Precision::Angular())) - { - theDI << "gp_Vec2d OK. Vectors are normal.\n"; - } - else - { - theDI << "Error in gp_Vec2d. Vectors should be normal.\n"; - } - - const gp_Dir2d aD1(gp_Dir2d::D::X); - const gp_Dir2d aD2(gp_Dir2d::D::NY); - - if (aD1.IsNormal(aD2, Precision::Angular())) - { - theDI << "gp_Dir2d OK. Vectors are normal.\n"; - } - else - { - theDI << "Error in gp_Dir2d. Vectors should be normal.\n"; - } - - return 0; -} - -//======================================================================= -// function : OCC26746 -// purpose : Checks if coefficients of the torus are computed properly. -//======================================================================= -#include -#include - -static int OCC26746(Draw_Interpretor& theDI, int theNArg, const char** theArgVal) -{ - if (theNArg < 2) - { - theDI << "Use: OCC26746 torus [toler NbCheckedPoints]\n"; - return 1; - } - - const occ::handle aGtor = - occ::down_cast(DrawTrSurf::GetSurface(theArgVal[1])); - - const double aToler = (theNArg >= 3) ? Draw::Atof(theArgVal[2]) : 1.0e-7; - const int aNbPntsMax = (theNArg >= 4) ? Draw::Atoi(theArgVal[3]) : 5; - - const int aLowIndex = 5; - const double aStep = 2.0 * M_PI / aNbPntsMax; - - NCollection_Array1 anArrCoeffs(aLowIndex, aLowIndex + 34); - aGtor->Torus().Coefficients(anArrCoeffs); - - double aUpar = 0.0, aVpar = 0.0; - for (int aUind = 0; aUind <= aNbPntsMax; aUind++) - { - for (int aVind = 0; aVind <= aNbPntsMax; aVind++) - { - const gp_Pnt aPt(aGtor->Value(aUpar, aVpar)); - const double aX1 = aPt.X(); - const double aX2 = aX1 * aX1; - const double aX3 = aX2 * aX1; - const double aX4 = aX2 * aX2; - const double aY1 = aPt.Y(); - const double aY2 = aY1 * aY1; - const double aY3 = aY2 * aY1; - const double aY4 = aY2 * aY2; - const double aZ1 = aPt.Z(); - const double aZ2 = aZ1 * aZ1; - const double aZ3 = aZ2 * aZ1; - const double aZ4 = aZ2 * aZ2; - - int i = aLowIndex; - - double aDelta = anArrCoeffs(i++) * aX4; // 1 - aDelta += anArrCoeffs(i++) * aY4; // 2 - aDelta += anArrCoeffs(i++) * aZ4; // 3 - aDelta += anArrCoeffs(i++) * aX3 * aY1; // 4 - aDelta += anArrCoeffs(i++) * aX3 * aZ1; // 5 - aDelta += anArrCoeffs(i++) * aY3 * aX1; // 6 - aDelta += anArrCoeffs(i++) * aY3 * aZ1; // 7 - aDelta += anArrCoeffs(i++) * aZ3 * aX1; // 8 - aDelta += anArrCoeffs(i++) * aZ3 * aY1; // 9 - aDelta += anArrCoeffs(i++) * aX2 * aY2; // 10 - aDelta += anArrCoeffs(i++) * aX2 * aZ2; // 11 - aDelta += anArrCoeffs(i++) * aY2 * aZ2; // 12 - aDelta += anArrCoeffs(i++) * aX2 * aY1 * aZ1; // 13 - aDelta += anArrCoeffs(i++) * aX1 * aY2 * aZ1; // 14 - aDelta += anArrCoeffs(i++) * aX1 * aY1 * aZ2; // 15 - aDelta += anArrCoeffs(i++) * aX3; // 16 - aDelta += anArrCoeffs(i++) * aY3; // 17 - aDelta += anArrCoeffs(i++) * aZ3; // 18 - aDelta += anArrCoeffs(i++) * aX2 * aY1; // 19 - aDelta += anArrCoeffs(i++) * aX2 * aZ1; // 20 - aDelta += anArrCoeffs(i++) * aY2 * aX1; // 21 - aDelta += anArrCoeffs(i++) * aY2 * aZ1; // 22 - aDelta += anArrCoeffs(i++) * aZ2 * aX1; // 23 - aDelta += anArrCoeffs(i++) * aZ2 * aY1; // 24 - aDelta += anArrCoeffs(i++) * aX1 * aY1 * aZ1; // 25 - aDelta += anArrCoeffs(i++) * aX2; // 26 - aDelta += anArrCoeffs(i++) * aY2; // 27 - aDelta += anArrCoeffs(i++) * aZ2; // 28 - aDelta += anArrCoeffs(i++) * aX1 * aY1; // 29 - aDelta += anArrCoeffs(i++) * aX1 * aZ1; // 30 - aDelta += anArrCoeffs(i++) * aY1 * aZ1; // 31 - aDelta += anArrCoeffs(i++) * aX1; // 32 - aDelta += anArrCoeffs(i++) * aY1; // 33 - aDelta += anArrCoeffs(i++) * aZ1; // 34 - aDelta += anArrCoeffs(i++); // 35 - - if (std::abs(aDelta) > aToler) - { - theDI << "(" << aUpar << ", " << aVpar - << "): Error in torus coefficients computation (Delta = " << aDelta << ").\n"; - } - else - { - theDI << "(" << aUpar << ", " << aVpar << "): OK (Delta = " << aDelta << ").\n"; - } - - aVpar = (aVind == aNbPntsMax) ? 2.0 * M_PI : aVpar + aStep; - } - - aVpar = 0.0; - aUpar = (aUind == aNbPntsMax) ? 2.0 * M_PI : aUpar + aStep; - } - - return 0; -} - //======================================================================= // function : OCC27048 // purpose : Calculate value of B-spline surface N times @@ -4237,8 +2752,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) &QABugs_NHandleClass::NHandleProc, group); - theCommands.Add("OCC230", "OCC230 TrimmedCurve Pnt2d Pnt2d", __FILE__, OCC230, group); - theCommands.Add("OCC22611", "OCC22611 string nb", __FILE__, OCC22611, group); theCommands.Add("OCC23774", "OCC23774 shape1 shape2", __FILE__, OCC23774, group); theCommands.Add("OCC23683", "OCC23683 shape", __FILE__, OCC23683, group); theCommands.Add("OCC23952sweep", "OCC23952sweep nbupoles shape", __FILE__, OCC23952sweep, group); @@ -4255,7 +2768,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) OCC23945, group); theCommands.Add("OCC24008", "OCC24008 curve surface", __FILE__, OCC24008, group); - theCommands.Add("OCC24005", "OCC24005 result", __FILE__, OCC24005, group); theCommands.Add("OCC24137", "OCC24137 face vertex U V [N]", __FILE__, OCC24137, group); theCommands.Add("OCC23972", "OCC23972", __FILE__, OCC23972, group); theCommands.Add("OCC24370", "OCC24370 edge pcurve surface prec", __FILE__, OCC24370, group); @@ -4266,10 +2778,7 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) OCC24667, group); theCommands.Add("OCC24834", "OCC24834", __FILE__, OCC24834, group); - theCommands.Add("OCC23951", "OCC23951 path to saved step file", __FILE__, OCC23951, group); theCommands.Add("OCC24931", "OCC24931 path to saved xml file", __FILE__, OCC24931, group); - theCommands.Add("OCC23950", "OCC23950 step_file", __FILE__, OCC23950, group); - theCommands.Add("OCC25004", "OCC25004", __FILE__, OCC25004, group); theCommands.Add("OCC24925", "OCC24925 filename [pluginLib=TKXml storageGuid retrievalGuid]" "\nOCAF persistence without setting environment variables", @@ -4277,18 +2786,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) OCC24925, group); theCommands.Add("OCC25043", "OCC25043 shape", __FILE__, OCC25043, group); - theCommands.Add( - "OCC24826,", - "This test performs simple saxpy test using multiple threads.\n Usage: OCC24826 length", - __FILE__, - OCC24826, - group); - theCommands.Add("OCC29935,", - "This test performs product of two square matrices using multiple threads.\n " - "Usage: OCC29935 size", - __FILE__, - OCC29935, - group); theCommands.Add("OCC24606", "OCC24606 : Tests ::FitAll for V3d view ('vfit' is for NIS view)", __FILE__, @@ -4306,7 +2803,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) theCommands.Add("OCC25446", "OCC25446 res b1 b2 op", __FILE__, OCC25446, group); theCommands.Add("OCC24881", "OCC24881 shape", __FILE__, OCC24881, group); theCommands.Add("xprojponf", "xprojponf p f", __FILE__, xprojponf, group); - theCommands.Add("OCC24923", "OCC24923", __FILE__, OCC24923, group); theCommands.Add("OCC26139", "OCC26139 [-boxsize value] [-boxgrid value] [-compgrid value]", __FILE__, @@ -4314,7 +2810,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) group); theCommands.Add("OCC26284", "OCC26284", __FILE__, OCC26284, group); theCommands.Add("OCC26446", "OCC26446 r c1 c2", __FILE__, OCC26446, group); - theCommands.Add("OCC26407", "OCC26407 result_name", __FILE__, OCC26407, group); theCommands.Add("OCC26485", "OCC26485 shape", __FILE__, OCC26485, group); theCommands.Add("OCC26553", "OCC26553 file_path", __FILE__, OCC26553, group); theCommands.Add( @@ -4339,11 +2834,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) theCommands.Add("OCC26396", "OCC26396 shape_file_path", __FILE__, OCC26396, group); theCommands.Add("OCC26525", "OCC26525 result edge face ", __FILE__, OCC26525, group); - theCommands.Add("OCC24537", "OCC24537 [file]", __FILE__, OCC24537, group); - theCommands.Add("OCC26750", "OCC26750", __FILE__, OCC26750, group); - theCommands.Add("OCC25574", "OCC25574", __FILE__, OCC25574, group); - theCommands.Add("OCC26746", "OCC26746 torus [toler NbCheckedPoints] ", __FILE__, OCC26746, group); - theCommands.Add("OCC27048", "OCC27048 surf U V N\nCalculate value of surface N times in the point (U, V)", __FILE__, diff --git a/src/Draw/TKQADraw/QABugs/QABugs_20.cxx b/src/Draw/TKQADraw/QABugs/QABugs_20.cxx index 5d8e9c766c..20aa88b566 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_20.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_20.cxx @@ -61,1805 +61,14 @@ #include #include -#include #include #include #include #include #include -#include -#include -#include #include -//======================================================================= -// function : SurfaceGenOCC26675_1 -// purpose : Generates a surface for intersect (in corresponding -// test case). If we save these surfaces to the disk -// then bug will not be reproduced. Therefore, this generator -// is very important (despite its taking many lines of the code). -//======================================================================= -static int SurfaceGenOCC26675_1(Draw_Interpretor& theDI, int theNArg, const char** theArgVal) -{ - - if (theNArg < 2) - { - theDI << "Use OCC26675_1 result\n"; - return 1; - } - - const gp_Pnt aCircCenter(-112.93397037070100000000, - +177.52792379072199000000, - +10.63374076104853900000); - const gp_Dir aCircN(+0.00000000000000000000, +1.00000000000000000000, +0.00000000000000000000); - const gp_Dir aCircX(+0.00000000000000000000, -0.00000000000000000000, +1.00000000000000000000); - const gp_Dir anExtrDir(-500.00000000000000000000, - -866.02540378443609000000, - +0.00000000000000000000); - const gp_Ax2 aCircAxes(aCircCenter, aCircN, aCircX); - const occ::handle aCurv = new Geom_Circle(aCircAxes, +50.00000000000000000000); - - const occ::handle aS2 = new Geom_SurfaceOfLinearExtrusion(aCurv, anExtrDir); - - NCollection_Array2 aPoles(1, 7, 1, 81); - NCollection_Array2 aWeights(1, 7, 1, 81); - NCollection_Array1 aUKnots(1, 2), aVKnots(1, 12); - NCollection_Array1 aUMult(1, 2), aVMult(1, 12); - const int aUDegree = 6, aVDegree = 8; - - aUKnots(1) = +0.00000000000000000000; - aUKnots(2) = +1.00000000000000000000; - aVKnots(1) = +0.08911853946147080300; - aVKnots(2) = +0.11779167587451674000; - aVKnots(3) = +0.14583467562325506000; - aVKnots(4) = +0.20255081178503931000; - aVKnots(5) = +0.25926694794682359000; - aVKnots(6) = +0.31598308410860781000; - aVKnots(7) = +0.34262437462234741000; - aVKnots(8) = +0.37067364397889985000; - aVKnots(9) = +0.39731552779654306000; - aVKnots(10) = +0.42536420384919182000; - aVKnots(11) = +0.45200329235672548000; - aVKnots(12) = +0.47802918742799144000; - - aUMult(1) = 7; - aUMult(2) = 7; - aVMult(1) = 9; - aVMult(2) = 7; - aVMult(3) = 7; - aVMult(4) = 7; - aVMult(5) = 7; - aVMult(6) = 7; - aVMult(7) = 7; - aVMult(8) = 7; - aVMult(9) = 7; - aVMult(10) = 8; - aVMult(11) = 8; - aVMult(12) = 9; - - //// - { - aWeights.ChangeValue(1, 1) = +1.02986327036737910000; - aPoles.ChangeValue(1, 1) = - gp_Pnt(+131.75315905495660000000, +2.88570510351864900000, -66.24709307590461500000); - aWeights.ChangeValue(1, 2) = +1.02989244478761060000; - aPoles.ChangeValue(1, 2) = - gp_Pnt(+128.70876344053133000000, +2.88791208181246970000, -67.92914281439198000000); - aWeights.ChangeValue(1, 3) = +1.02991676091113950000; - aPoles.ChangeValue(1, 3) = - gp_Pnt(+125.64133203841195000000, +2.88975018186799830000, -69.56968825975690200000); - aWeights.ChangeValue(1, 4) = +1.02993613450133650000; - aPoles.ChangeValue(1, 4) = - gp_Pnt(+122.55164101294532000000, +2.89121448973680460000, -71.16831921321855200000); - aWeights.ChangeValue(1, 5) = +1.02995970896170810000; - aPoles.ChangeValue(1, 5) = - gp_Pnt(+119.44028474076808000000, +2.89299532863950050000, -72.72471137484106400000); - aWeights.ChangeValue(1, 6) = +1.02998196300928410000; - aPoles.ChangeValue(1, 6) = - gp_Pnt(+116.30796917345266000000, +2.89467567823625730000, -74.23853925439507900000); - aWeights.ChangeValue(1, 7) = +1.02999781361772440000; - aPoles.ChangeValue(1, 7) = - gp_Pnt(+113.15537818476763000000, +2.89587201010380560000, -75.70949847615843000000); - aWeights.ChangeValue(1, 8) = +1.03001626830283270000; - aPoles.ChangeValue(1, 8) = - gp_Pnt(+109.98323502828077000000, +2.89726468512897210000, -77.13723994508107800000); - aWeights.ChangeValue(1, 9) = +1.03004822145815230000; - aPoles.ChangeValue(1, 9) = - gp_Pnt(+103.60126699909762000000, +2.89967510685080440000, -79.90571269046952800000); - aWeights.ChangeValue(1, 10) = +1.03006364818936770000; - aPoles.ChangeValue(1, 10) = - gp_Pnt(+100.39144092265354000000, +2.90083845616186050000, -81.24644132200651800000); - aWeights.ChangeValue(1, 11) = +1.03007725635592000000; - aPoles.ChangeValue(1, 11) = - gp_Pnt(+97.16342330855667300000, +2.90186436688425700000, -82.54338871675531700000); - aWeights.ChangeValue(1, 12) = +1.03009045031501500000; - aPoles.ChangeValue(1, 12) = - gp_Pnt(+93.91790293022438600000, +2.90285879918974650000, -83.79626764915399000000); - aWeights.ChangeValue(1, 13) = +1.03010285398183930000; - aPoles.ChangeValue(1, 13) = - gp_Pnt(+90.65560197798836800000, +2.90379346029782100000, -85.00479786905465600000); - aWeights.ChangeValue(1, 14) = +1.03011393120350900000; - aPoles.ChangeValue(1, 14) = - gp_Pnt(+87.37722618415423900000, +2.90462796925060120000, -86.16871841453435400000); - aWeights.ChangeValue(1, 15) = +1.03012484065787050000; - aPoles.ChangeValue(1, 15) = - gp_Pnt(+84.08346762829417300000, +2.90544970249433290000, -87.28777941880029800000); - aWeights.ChangeValue(1, 16) = +1.03015471267321200000; - aPoles.ChangeValue(1, 16) = - gp_Pnt(+74.15848807058078800000, +2.90769927244280210000, -90.50962423575197100000); - aWeights.ChangeValue(1, 17) = +1.03017194800922400000; - aPoles.ChangeValue(1, 17) = - gp_Pnt(+67.48342008926763900000, +2.90899668032978950000, -92.47701903504494700000); - aWeights.ChangeValue(1, 18) = +1.03018680682765670000; - aPoles.ChangeValue(1, 18) = - gp_Pnt(+60.75515833606132100000, +2.91011480947056490000, -94.26204121664201800000); - aWeights.ChangeValue(1, 19) = +1.03019958109549670000; - aPoles.ChangeValue(1, 19) = - gp_Pnt(+53.97928154760177200000, +2.91107580930771360000, -95.86305268935117900000); - aWeights.ChangeValue(1, 20) = +1.03021050389503350000; - aPoles.ChangeValue(1, 20) = - gp_Pnt(+47.16164692132413400000, +2.91189735380426780000, -97.27865560180262600000); - aWeights.ChangeValue(1, 21) = +1.03021974942385830000; - aPoles.ChangeValue(1, 21) = - gp_Pnt(+40.30838837608569500000, +2.91259264267907050000, -98.50769317562559000000); - aWeights.ChangeValue(1, 22) = +1.03022743299486370000; - aPoles.ChangeValue(1, 22) = - gp_Pnt(+33.42591476110869300000, +2.91317040233699530000, -99.54925039136011800000); - aWeights.ChangeValue(1, 23) = +1.03023979631718900000; - aPoles.ChangeValue(1, 23) = - gp_Pnt(+19.61576136171939000000, +2.91409991934468550000, -101.25602945077115000000); - aWeights.ChangeValue(1, 24) = +1.03024450452679140000; - aPoles.ChangeValue(1, 24) = - gp_Pnt(+12.68754355991407800000, +2.91445385083459700000, -101.92122234436175000000); - aWeights.ChangeValue(1, 25) = +1.03024781840890120000; - aPoles.ChangeValue(1, 25) = - gp_Pnt(+5.74236948737514120000, +2.91470294045230770000, -102.39751844510502000000); - aWeights.ChangeValue(1, 26) = +1.03024979501192000000; - aPoles.ChangeValue(1, 26) = - gp_Pnt(-1.21367831605073050000, +2.91485150371151920000, -102.68442590550356000000); - aWeights.ChangeValue(1, 27) = +1.03025046568879790000; - aPoles.ChangeValue(1, 27) = - gp_Pnt(-8.17455041611474620000, +2.91490191238154670000, -102.78167594353056000000); - aWeights.ChangeValue(1, 28) = +1.03024983609703540000; - aPoles.ChangeValue(1, 28) = - gp_Pnt(-15.13423127055194300000, +2.91485459458572780000, -102.68922293042964000000); - aWeights.ChangeValue(1, 29) = +1.03024788619868260000; - aPoles.ChangeValue(1, 29) = - gp_Pnt(-22.08674002008992700000, +2.91470803482494080000, -102.40724441194320000000); - aWeights.ChangeValue(1, 30) = +1.03024126030624540000; - aPoles.ChangeValue(1, 30) = - gp_Pnt(-35.96556766132121700000, +2.91420996731856930000, -101.46503408514069000000); - aWeights.ChangeValue(1, 31) = +1.03023657011944230000; - aPoles.ChangeValue(1, 31) = - gp_Pnt(-42.89191729472150200000, +2.91385737699769360000, -100.80479886745856000000); - aWeights.ChangeValue(1, 32) = +1.03023047292900880000; - aPoles.ChangeValue(1, 32) = - gp_Pnt(-49.79923779841396900000, +2.91339898565004060000, -99.95583114848535900000); - aWeights.ChangeValue(1, 33) = +1.03022290017099550000; - aPoles.ChangeValue(1, 33) = - gp_Pnt(-56.68161614207340900000, +2.91282960709223810000, -98.91875138839027700000); - aWeights.ChangeValue(1, 34) = +1.03021374148842180000; - aPoles.ChangeValue(1, 34) = - gp_Pnt(-63.53316994906088400000, +2.91214088593828220000, -97.69440448679608800000); - aWeights.ChangeValue(1, 35) = +1.03020284473128080000; - aPoles.ChangeValue(1, 35) = - gp_Pnt(-70.34804877511381000000, +2.91132129711663760000, -96.28385939245710300000); - aWeights.ChangeValue(1, 36) = +1.03019001595653580000; - aPoles.ChangeValue(1, 36) = - gp_Pnt(-77.12043535415037400000, +2.91035614521427500000, -94.68840860671046800000); - aWeights.ChangeValue(1, 37) = +1.03016805964614980000; - aPoles.ChangeValue(1, 37) = - gp_Pnt(-86.96652166958519100000, +2.90870378328618400000, -92.08365976972685000000); - aWeights.ChangeValue(1, 38) = +1.03016062145972500000; - aPoles.ChangeValue(1, 38) = - gp_Pnt(-90.07809790629383400000, +2.90814392820824040000, -91.21821667329717800000); - aWeights.ChangeValue(1, 39) = +1.03015268516758060000; - aPoles.ChangeValue(1, 39) = - gp_Pnt(-93.17869710255469300000, +2.90754650188789080000, -90.31338955501080100000); - aWeights.ChangeValue(1, 40) = +1.03014422393874510000; - aPoles.ChangeValue(1, 40) = - gp_Pnt(-96.26774201507643600000, +2.90690946644790090000, -89.36934028436292000000); - aWeights.ChangeValue(1, 41) = +1.03013520381253840000; - aPoles.ChangeValue(1, 41) = - gp_Pnt(-99.34465666946248100000, +2.90623024256504880000, -88.38624129906430900000); - aWeights.ChangeValue(1, 42) = +1.03012558369857450000; - aPoles.ChangeValue(1, 42) = - gp_Pnt(-102.40886646020824000000, +2.90550570939860810000, -87.36427556081821400000); - aWeights.ChangeValue(1, 43) = +1.03011531537676040000; - aPoles.ChangeValue(1, 43) = - gp_Pnt(-105.45979824903711000000, +2.90473220450791560000, -86.30363650725728100000); - aWeights.ChangeValue(1, 44) = +1.03009266486593140000; - aPoles.ChangeValue(1, 44) = - gp_Pnt(-111.76765655411073000000, +2.90302557752729130000, -84.02084620865503000000); - aWeights.ChangeValue(1, 45) = +1.03007954250893910000; - aPoles.ChangeValue(1, 45) = - gp_Pnt(-115.02237879255169000000, +2.90203661863772000000, -82.79254553120374300000); - aWeights.ChangeValue(1, 46) = +1.03006700046846360000; - aPoles.ChangeValue(1, 46) = - gp_Pnt(-118.26033551796380000000, +2.90109123094133370000, -81.51987347500843800000); - aWeights.ChangeValue(1, 47) = +1.03005153385518430000; - aPoles.ChangeValue(1, 47) = - gp_Pnt(-121.48081153033489000000, +2.89992503429592440000, -80.20310945547186100000); - aWeights.ChangeValue(1, 48) = +1.03003663316288070000; - aPoles.ChangeValue(1, 48) = - gp_Pnt(-124.68310204708784000000, +2.89880123910694910000, -78.84252385592422700000); - aWeights.ChangeValue(1, 49) = +1.03002002524051230000; - aPoles.ChangeValue(1, 49) = - gp_Pnt(-127.86649232671233000000, +2.89754829341323060000, -77.43842231968982000000); - aWeights.ChangeValue(1, 50) = +1.03000192732161230000; - aPoles.ChangeValue(1, 50) = - gp_Pnt(-131.03028254956638000000, +2.89618247462029290000, -75.99111259804850200000); - aWeights.ChangeValue(1, 51) = +1.02996526567113600000; - aPoles.ChangeValue(1, 51) = - gp_Pnt(-137.09281139094972000000, +2.89341459629042360000, -73.11712223836046600000); - aWeights.ChangeValue(1, 52) = +1.02994403451589630000; - aPoles.ChangeValue(1, 52) = - gp_Pnt(-139.99435839258939000000, +2.89181101472158900000, -71.69634981883045600000); - aWeights.ChangeValue(1, 53) = +1.02992866105538440000; - aPoles.ChangeValue(1, 53) = - gp_Pnt(-142.87784656482347000000, +2.89064973421052680000, -70.23882874204873900000); - aWeights.ChangeValue(1, 54) = +1.02989968743283590000; - aPoles.ChangeValue(1, 54) = - gp_Pnt(-145.74271824362268000000, +2.88845983550875030000, -68.74489127449217600000); - aWeights.ChangeValue(1, 55) = +1.02988222474524970000; - aPoles.ChangeValue(1, 55) = - gp_Pnt(-148.58838121276386000000, +2.88713941077432070000, -67.21475112846350400000); - aWeights.ChangeValue(1, 56) = +1.02985386954408620000; - aPoles.ChangeValue(1, 56) = - gp_Pnt(-151.41432118416620000000, +2.88499463682574180000, -65.64875099202183200000); - aWeights.ChangeValue(1, 57) = +1.02982704006090460000; - aPoles.ChangeValue(1, 57) = - gp_Pnt(-154.21993049579214000000, +2.88296397171855910000, -64.04717955157212800000); - aWeights.ChangeValue(1, 58) = +1.02976639514278400000; - aPoles.ChangeValue(1, 58) = - gp_Pnt(-160.00375832753414000000, +2.87837140815595260000, -60.64735416015690100000); - aWeights.ChangeValue(1, 59) = +1.02972545417711370000; - aPoles.ChangeValue(1, 59) = - gp_Pnt(-162.97914403387477000000, +2.87526824819569480000, -58.84445149944087200000); - aWeights.ChangeValue(1, 60) = +1.02970377642253300000; - aPoles.ChangeValue(1, 60) = - gp_Pnt(-165.92810584856278000000, +2.87362619373759860000, -56.99783055334398100000); - aWeights.ChangeValue(1, 61) = +1.02963665582001740000; - aPoles.ChangeValue(1, 61) = - gp_Pnt(-168.85438185317770000000, +2.86853152516479340000, -55.11698298198095400000); - aWeights.ChangeValue(1, 62) = +1.02961756328192160000; - aPoles.ChangeValue(1, 62) = - gp_Pnt(-171.75125340157436000000, +2.86708271055963240000, -53.19057330425229700000); - aWeights.ChangeValue(1, 63) = +1.02954937293527580000; - aPoles.ChangeValue(1, 63) = - gp_Pnt(-174.62251681022158000000, +2.86190007017706360000, -51.22700225930964300000); - aWeights.ChangeValue(1, 64) = +1.02950097342691520000; - aPoles.ChangeValue(1, 64) = - gp_Pnt(-177.46620192435449000000, +2.85821732043423180000, -49.22415777229338100000); - aWeights.ChangeValue(1, 65) = +1.02943612532291810000; - aPoles.ChangeValue(1, 65) = - gp_Pnt(-180.28206426096281000000, +2.85327724467687100000, -47.18300981722491400000); - aWeights.ChangeValue(1, 66) = +1.02937840445786000000; - aPoles.ChangeValue(1, 66) = - gp_Pnt(-182.89713737694305000000, +2.84888100315162470000, -45.28741010449485300000); - aWeights.ChangeValue(1, 67) = +1.02929786839840220000; - aPoles.ChangeValue(1, 67) = - gp_Pnt(-185.48808576506855000000, +2.84272935508061810000, -43.35897595091199000000); - aWeights.ChangeValue(1, 68) = +1.02927785532845030000; - aPoles.ChangeValue(1, 68) = - gp_Pnt(-188.05509745668041000000, +2.84122612975151250000, -41.39706700987362400000); - aWeights.ChangeValue(1, 69) = +1.02909457173363930000; - aPoles.ChangeValue(1, 69) = - gp_Pnt(-190.59634219852757000000, +2.82717082550985440000, -39.40453806610211300000); - aWeights.ChangeValue(1, 70) = +1.02915656102508410000; - aPoles.ChangeValue(1, 70) = - gp_Pnt(-193.11296933822229000000, +2.83195841118334000000, -37.37763511391345600000); - aWeights.ChangeValue(1, 71) = +1.02891246603941110000; - aPoles.ChangeValue(1, 71) = - gp_Pnt(-195.60305999702362000000, +2.81322479805689340000, -35.32107774203857500000); - aWeights.ChangeValue(1, 72) = +1.02884001996307940000; - aPoles.ChangeValue(1, 72) = - gp_Pnt(-198.06589030811097000000, +2.80764438138268390000, -33.23208121127716900000); - aWeights.ChangeValue(1, 73) = +1.02870418206103250000; - aPoles.ChangeValue(1, 73) = - gp_Pnt(-200.50111697620073000000, +2.79717360924099090000, -31.11182660391394400000); - aWeights.ChangeValue(1, 74) = +1.02860417892814660000; - aPoles.ChangeValue(1, 74) = - gp_Pnt(-202.93720652839650000000, +2.78949733525485710000, -28.99085629216911300000); - aWeights.ChangeValue(1, 75) = +1.02826579045547110000; - aPoles.ChangeValue(1, 75) = - gp_Pnt(-205.34394850673777000000, +2.76315604312090550000, -26.83940109433629200000); - aWeights.ChangeValue(1, 76) = +1.02871793966742330000; - aPoles.ChangeValue(1, 76) = - gp_Pnt(-207.72575255584553000000, +2.79855565223875710000, -24.65500081264426800000); - aWeights.ChangeValue(1, 77) = +1.02728787827176630000; - aPoles.ChangeValue(1, 77) = - gp_Pnt(-210.07706367406874000000, +2.68725363743552850000, -22.43634910730148800000); - aWeights.ChangeValue(1, 78) = +1.02767535385809120000; - aPoles.ChangeValue(1, 78) = - gp_Pnt(-212.39605978578481000000, +2.71705476277515070000, -20.20562112100595800000); - aWeights.ChangeValue(1, 79) = +1.02745809923169020000; - aPoles.ChangeValue(1, 79) = - gp_Pnt(-214.68098626410506000000, +2.69985190382785320000, -17.91605900374278100000); - aWeights.ChangeValue(1, 80) = +1.02725110106359850000; - aPoles.ChangeValue(1, 80) = - gp_Pnt(-216.94385389331507000000, +2.68435107488514250000, -15.61289037092123000000); - aWeights.ChangeValue(1, 81) = +1.02619749797986360000; - aPoles.ChangeValue(1, 81) = - gp_Pnt(-219.16685583874414000000, +2.59983520096898510000, -13.28583956380401400000); - aWeights.ChangeValue(2, 1) = +1.00955713824395700000; - aPoles.ChangeValue(2, 1) = - gp_Pnt(+131.76756408216349000000, +2.10451717388867540000, -66.27316135719137000000); - aWeights.ChangeValue(2, 2) = +1.00956608612165600000; - aPoles.ChangeValue(2, 2) = - gp_Pnt(+128.72252404033563000000, +2.10631182699007670000, -67.95492700832653600000); - aWeights.ChangeValue(2, 3) = +1.00957354292813030000; - aPoles.ChangeValue(2, 3) = - gp_Pnt(+125.65455798821807000000, +2.10780700070896730000, -69.59522708152212500000); - aWeights.ChangeValue(2, 4) = +1.00957948395970430000; - aPoles.ChangeValue(2, 4) = - gp_Pnt(+122.56436007131990000000, +2.10899819276768510000, -71.19369911011085600000); - aWeights.ChangeValue(2, 5) = +1.00958671248272140000; - aPoles.ChangeValue(2, 5) = - gp_Pnt(+119.45249930698063000000, +2.11044722765431250000, -72.74983445837314400000); - aWeights.ChangeValue(2, 6) = +1.00959353559448470000; - aPoles.ChangeValue(2, 6) = - gp_Pnt(+116.31971419268339000000, +2.11181476538007030000, -74.26341133748536500000); - aWeights.ChangeValue(2, 7) = +1.00959839503054960000; - aPoles.ChangeValue(2, 7) = - gp_Pnt(+113.16673272248508000000, +2.11278857229853930000, -75.73421464457315700000); - aWeights.ChangeValue(2, 8) = +1.00960405269294800000; - aPoles.ChangeValue(2, 8) = - gp_Pnt(+109.99417142410560000000, +2.11392227976110990000, -77.16175403351917300000); - aWeights.ChangeValue(2, 9) = +1.00961384794963970000; - aPoles.ChangeValue(2, 9) = - gp_Pnt(+103.61137952541701000000, +2.11588481923337430000, -79.92991318438167500000); - aWeights.ChangeValue(2, 10) = +1.00961857675621050000; - aPoles.ChangeValue(2, 10) = - gp_Pnt(+100.40113044627800000000, +2.11683214779396200000, -81.27049552555527600000); - aWeights.ChangeValue(2, 11) = +1.00962274789480260000; - aPoles.ChangeValue(2, 11) = - gp_Pnt(+97.17272090352022900000, +2.11766766635255620000, -82.56731642507010300000); - aWeights.ChangeValue(2, 12) = +1.00962679188946770000; - aPoles.ChangeValue(2, 12) = - gp_Pnt(+93.92682593436140300000, +2.11847763961438810000, -83.82006598438695700000); - aWeights.ChangeValue(2, 13) = +1.00963059350869510000; - aPoles.ChangeValue(2, 13) = - gp_Pnt(+90.66416580726762200000, +2.11923900414192050000, -85.02847304317147300000); - aWeights.ChangeValue(2, 14) = +1.00963398843777610000; - aPoles.ChangeValue(2, 14) = - gp_Pnt(+87.38545325411524800000, +2.11991885797243330000, -86.19228543784532800000); - aWeights.ChangeValue(2, 15) = +1.00963733185346640000; - aPoles.ChangeValue(2, 15) = - gp_Pnt(+84.09136475788710600000, +2.12058835416503610000, -87.31123582184922300000); - aWeights.ChangeValue(2, 16) = +1.00964648640037450000; - aPoles.ChangeValue(2, 16) = - gp_Pnt(+74.16530685267888100000, +2.12242134451684360000, -90.53282418399284400000); - aWeights.ChangeValue(2, 17) = +1.00965176794147850000; - aPoles.ChangeValue(2, 17) = - gp_Pnt(+67.48955141808187400000, +2.12347869023601370000, -92.50007118315201600000); - aWeights.ChangeValue(2, 18) = +1.00965632094816660000; - aPoles.ChangeValue(2, 18) = - gp_Pnt(+60.76066172731987800000, +2.12439006790716880000, -94.28495774595940300000); - aWeights.ChangeValue(2, 19) = +1.00966023501695720000; - aPoles.ChangeValue(2, 19) = - gp_Pnt(+53.98420072674593900000, +2.12517346720689600000, -95.88584819516199800000); - aWeights.ChangeValue(2, 20) = +1.00966358166845400000; - aPoles.ChangeValue(2, 20) = - gp_Pnt(+47.16601123883578600000, +2.12584324589548320000, -97.30134659055448800000); - aWeights.ChangeValue(2, 21) = +1.00966641434734730000; - aPoles.ChangeValue(2, 21) = - gp_Pnt(+40.31221541713015500000, +2.12641013013135180000, -98.53029698991525700000); - aWeights.ChangeValue(2, 22) = +1.00966876842241260000; - aPoles.ChangeValue(2, 22) = - gp_Pnt(+33.42921418500849000000, +2.12688121470786750000, -99.57178366381829400000); - aWeights.ChangeValue(2, 23) = +1.00967255617655650000; - aPoles.ChangeValue(2, 23) = - gp_Pnt(+19.61796125907087400000, +2.12763915883061920000, -101.27845724558523000000); - aWeights.ChangeValue(2, 24) = +1.00967399859793750000; - aPoles.ChangeValue(2, 24) = - gp_Pnt(+12.68919279606528900000, +2.12792777824197280000, -101.94361028295506000000); - aWeights.ChangeValue(2, 25) = +1.00967501382968900000; - aPoles.ChangeValue(2, 25) = - gp_Pnt(+5.74348853231593990000, +2.12813091177048630000, -102.41987704106546000000); - aWeights.ChangeValue(2, 26) = +1.00967561936957820000; - aPoles.ChangeValue(2, 26) = - gp_Pnt(-1.21307744928976070000, +2.12825206894226590000, -102.70676666240287000000); - aWeights.ChangeValue(2, 27) = +1.00967582483410380000; - aPoles.ChangeValue(2, 27) = - gp_Pnt(-8.17446448579617170000, +2.12829317854427910000, -102.80401081431219000000); - aWeights.ChangeValue(2, 28) = +1.00967563195849760000; - aPoles.ChangeValue(2, 28) = - gp_Pnt(-15.13466558037753100000, +2.12825458864942170000, -102.71156371647888000000); - aWeights.ChangeValue(2, 29) = +1.00967503459672270000; - aPoles.ChangeValue(2, 29) = - gp_Pnt(-22.08770764998126900000, +2.12813506662251010000, -102.42960214757312000000); - aWeights.ChangeValue(2, 30) = +1.00967300468446490000; - aPoles.ChangeValue(2, 30) = - gp_Pnt(-35.96760988752987500000, +2.12772890088942160000, -101.48744752427969000000); - aWeights.ChangeValue(2, 31) = +1.00967156777535580000; - aPoles.ChangeValue(2, 31) = - gp_Pnt(-42.89448004815705000000, +2.12744138030294440000, -100.82725372327035000000); - aWeights.ChangeValue(2, 32) = +1.00966969979090780000; - aPoles.ChangeValue(2, 32) = - gp_Pnt(-49.80232400744441900000, +2.12706759457740000000, -99.97834162579670200000); - aWeights.ChangeValue(2, 33) = +1.00966737970297200000; - aPoles.ChangeValue(2, 33) = - gp_Pnt(-56.68523628384353000000, +2.12660332632729520000, -98.94133225857957800000); - aWeights.ChangeValue(2, 34) = +1.00966457365849260000; - aPoles.ChangeValue(2, 34) = - gp_Pnt(-63.53734456971785200000, +2.12604178346724470000, -97.71706998895581400000); - aWeights.ChangeValue(2, 35) = +1.00966123497950600000; - aPoles.ChangeValue(2, 35) = - gp_Pnt(-70.35281013187348300000, +2.12537359908900880000, -96.30662240267085400000); - aWeights.ChangeValue(2, 36) = +1.00965730416314050000; - aPoles.ChangeValue(2, 36) = - gp_Pnt(-77.12582820180557500000, +2.12458683129447450000, -94.71128014840769500000); - aWeights.ChangeValue(2, 37) = +1.00965057624220010000; - aPoles.ChangeValue(2, 37) = - gp_Pnt(-86.97287762202962800000, +2.12324005462031540000, -92.10671540000876700000); - aWeights.ChangeValue(2, 38) = +1.00964829695753690000; - aPoles.ChangeValue(2, 38) = - gp_Pnt(-90.08473551349412400000, +2.12278376932639290000, -91.24134329153459100000); - aWeights.ChangeValue(2, 39) = +1.00964586498084840000; - aPoles.ChangeValue(2, 39) = - gp_Pnt(-93.18562459494498300000, +2.12229689243319890000, -90.33659169532975900000); - aWeights.ChangeValue(2, 40) = +1.00964327207694590000; - aPoles.ChangeValue(2, 40) = - gp_Pnt(-96.27496896689456200000, +2.12177776971417840000, -89.39262240039663300000); - aWeights.ChangeValue(2, 41) = +1.00964050782222770000; - aPoles.ChangeValue(2, 41) = - gp_Pnt(-99.35219429474524600000, +2.12122430736176200000, -88.40960770124299000000); - aWeights.ChangeValue(2, 42) = +1.00963755960468140000; - aPoles.ChangeValue(2, 42) = - gp_Pnt(-102.41672784011750000000, +2.12063397196916760000, -87.38773038403248000000); - aWeights.ChangeValue(2, 43) = +1.00963441262388320000; - aPoles.ChangeValue(2, 43) = - gp_Pnt(-105.46799849165807000000, +2.12000379050942020000, -86.32718371153289600000); - aWeights.ChangeValue(2, 44) = +1.00962747055142050000; - aPoles.ChangeValue(2, 44) = - gp_Pnt(-111.77654530973133000000, +2.11861352771318150000, -84.04460889409097000000); - aWeights.ChangeValue(2, 45) = +1.00962344856326270000; - aPoles.ChangeValue(2, 45) = - gp_Pnt(-115.03162075269803000000, +2.11780798556167320000, -82.81644583890866300000); - aWeights.ChangeValue(2, 46) = +1.00961960432211730000; - aPoles.ChangeValue(2, 46) = - gp_Pnt(-118.26993104545312000000, +2.11703799459344700000, -81.54389579486141300000); - aWeights.ChangeValue(2, 47) = +1.00961486342011010000; - aPoles.ChangeValue(2, 47) = - gp_Pnt(-121.49080060905077000000, +2.11608829135299810000, -80.22729418526657200000); - aWeights.ChangeValue(2, 48) = +1.00961029578343630000; - aPoles.ChangeValue(2, 48) = - gp_Pnt(-124.69348951442340000000, +2.11517321690879800000, -78.86685283462101400000); - aWeights.ChangeValue(2, 49) = +1.00960520454014850000; - aPoles.ChangeValue(2, 49) = - gp_Pnt(-127.87731027004676000000, +2.11415312105035590000, -77.46291256687052900000); - aWeights.ChangeValue(2, 50) = +1.00959965618773250000; - aPoles.ChangeValue(2, 50) = - gp_Pnt(-131.04156234039974000000, +2.11304129636208420000, -76.01577573259778800000); - aWeights.ChangeValue(2, 51) = +1.00958841592243690000; - aPoles.ChangeValue(2, 51) = - gp_Pnt(-137.10496896782513000000, +2.11078854745601690000, -73.14215015354327000000); - aWeights.ChangeValue(2, 52) = +1.00958190609540830000; - aPoles.ChangeValue(2, 52) = - gp_Pnt(-140.00695092509352000000, +2.10948365684345340000, -71.72161996530125800000); - aWeights.ChangeValue(2, 53) = +1.00957719225994170000; - aPoles.ChangeValue(2, 53) = - gp_Pnt(-142.89082065884315000000, +2.10853873486620720000, -70.26423921243410600000); - aWeights.ChangeValue(2, 54) = +1.00956830737110970000; - aPoles.ChangeValue(2, 54) = - gp_Pnt(-145.75622246387837000000, +2.10675729535240960000, -68.77065477701791000000); - aWeights.ChangeValue(2, 55) = +1.00956295195561060000; - aPoles.ChangeValue(2, 55) = - gp_Pnt(-148.60233584192389000000, +2.10568335609513650000, -67.24065593702246700000); - aWeights.ChangeValue(2, 56) = +1.00955425555818930000; - aPoles.ChangeValue(2, 56) = - gp_Pnt(-151.42883073983140000000, +2.10393921590561070000, -65.67497260857376800000); - aWeights.ChangeValue(2, 57) = +1.00954602613011150000; - aPoles.ChangeValue(2, 57) = - gp_Pnt(-154.23502547473331000000, +2.10228833319884910000, -64.07366145615235100000); - aWeights.ChangeValue(2, 58) = +1.00952742278729300000; - aPoles.ChangeValue(2, 58) = - gp_Pnt(-160.02004322449872000000, +2.09855561509982950000, -60.67448614970191300000); - aWeights.ChangeValue(2, 59) = +1.00951486183164940000; - aPoles.ChangeValue(2, 59) = - gp_Pnt(-162.99613088380306000000, +2.09603444654779600000, -58.87207545484513800000); - aWeights.ChangeValue(2, 60) = +1.00950821186194630000; - aPoles.ChangeValue(2, 60) = - gp_Pnt(-165.94554723216726000000, +2.09470002788322150000, -57.02566663092176900000); - aWeights.ChangeValue(2, 61) = +1.00948761363819010000; - aPoles.ChangeValue(2, 61) = - gp_Pnt(-168.87287521283019000000, +2.09056345777511910000, -55.14566924440539700000); - aWeights.ChangeValue(2, 62) = +1.00948175483840210000; - aPoles.ChangeValue(2, 62) = - gp_Pnt(-171.77025983587509000000, +2.08938700649796160000, -53.21936605947655600000); - aWeights.ChangeValue(2, 63) = +1.00946082358399410000; - aPoles.ChangeValue(2, 63) = - gp_Pnt(-174.64262250370552000000, +2.08518149324171190000, -51.25662423685646700000); - aWeights.ChangeValue(2, 64) = +1.00944596410269540000; - aPoles.ChangeValue(2, 64) = - gp_Pnt(-177.48726621628353000000, +2.08219461660139650000, -49.25423871740036900000); - aWeights.ChangeValue(2, 65) = +1.00942605045267530000; - aPoles.ChangeValue(2, 65) = - gp_Pnt(-180.30433731845508000000, +2.07819005191471670000, -47.21374002625280800000); - aWeights.ChangeValue(2, 66) = +1.00940832657289500000; - aPoles.ChangeValue(2, 66) = - gp_Pnt(-182.92026834009920000000, +2.07462614892136180000, -45.31887901738367200000); - aWeights.ChangeValue(2, 67) = +1.00938358350026620000; - aPoles.ChangeValue(2, 67) = - gp_Pnt(-185.51252638985017000000, +2.06964535925843180000, -43.39137009339865600000); - aWeights.ChangeValue(2, 68) = +1.00937745534293180000; - aPoles.ChangeValue(2, 68) = - gp_Pnt(-188.07970214515959000000, +2.06841969296490240000, -41.42984981640538000000); - aWeights.ChangeValue(2, 69) = +1.00932110415642830000; - aPoles.ChangeValue(2, 69) = - gp_Pnt(-190.62397551723822000000, +2.05705915800362950000, -39.43932945784815300000); - aWeights.ChangeValue(2, 70) = +1.00934018958961060000; - aPoles.ChangeValue(2, 70) = - gp_Pnt(-193.13969442040633000000, +2.06091733419064350000, -37.41169132931209200000); - aWeights.ChangeValue(2, 71) = +1.00926513417552190000; - aPoles.ChangeValue(2, 71) = - gp_Pnt(-195.63329272671066000000, +2.04578165519120160000, -35.35822241980492500000); - aWeights.ChangeValue(2, 72) = +1.00924284324010150000; - aPoles.ChangeValue(2, 72) = - gp_Pnt(-198.09761820165846000000, +2.04128022217386820000, -33.26975126412686700000); - aWeights.ChangeValue(2, 73) = +1.00920104311988150000; - aPoles.ChangeValue(2, 73) = - gp_Pnt(-200.53514329838038000000, +2.03283693524956680000, -31.15087616958502200000); - aWeights.ChangeValue(2, 74) = +1.00917029694372660000; - aPoles.ChangeValue(2, 74) = - gp_Pnt(-202.97255799662608000000, +2.02663657044316060000, -29.03126127135719200000); - aWeights.ChangeValue(2, 75) = +1.00906597799637380000; - aPoles.ChangeValue(2, 75) = - gp_Pnt(-205.38430250588374000000, +2.00548607046822540000, -26.88375382824776200000); - aWeights.ChangeValue(2, 76) = +1.00920552993214340000; - aPoles.ChangeValue(2, 76) = - gp_Pnt(-207.76049754988114000000, +2.03384304897263670000, -24.69318019977189100000); - aWeights.ChangeValue(2, 77) = +1.00876475817298510000; - aPoles.ChangeValue(2, 77) = - gp_Pnt(-210.12674832523484000000, +1.94448851661030540000, -22.49703905023471500000); - aWeights.ChangeValue(2, 78) = +1.00888387250469380000; - aPoles.ChangeValue(2, 78) = - gp_Pnt(-212.44800842772909000000, +1.96852329008748410000, -20.25405344977475500000); - aWeights.ChangeValue(2, 79) = +1.00881670070680670000; - aPoles.ChangeValue(2, 79) = - gp_Pnt(-214.73260668420895000000, +1.95481624964232450000, -17.97008076073228700000); - aWeights.ChangeValue(2, 80) = +1.00875338528797620000; - aPoles.ChangeValue(2, 80) = - gp_Pnt(-216.99878954601004000000, +1.94217039944868790000, -15.66960286452947800000); - aWeights.ChangeValue(2, 81) = +1.00842683370719490000; - aPoles.ChangeValue(2, 81) = - gp_Pnt(-219.23765241170187000000, +1.87520469423183880000, -13.35291936652889800000); - aWeights.ChangeValue(3, 1) = +0.99802424639217791000; - aPoles.ChangeValue(3, 1) = - gp_Pnt(+131.89876890515018000000, +1.35189067474276530000, -66.51059820355672500000); - aWeights.ChangeValue(3, 2) = +0.99802234515929278000; - aPoles.ChangeValue(3, 2) = - gp_Pnt(+128.85071311608803000000, +1.35313353595059940000, -68.19368716153405800000); - aWeights.ChangeValue(3, 3) = +0.99802076064203826000; - aPoles.ChangeValue(3, 3) = - gp_Pnt(+125.77977143028471000000, +1.35416922698475650000, -69.83529373030198400000); - aWeights.ChangeValue(3, 4) = +0.99801949820651126000; - aPoles.ChangeValue(3, 4) = - gp_Pnt(+122.68659332837821000000, +1.35499438550965670000, -71.43508181423516100000); - aWeights.ChangeValue(3, 5) = +0.99801796211084914000; - aPoles.ChangeValue(3, 5) = - gp_Pnt(+119.57173533591266000000, +1.35599832254451200000, -72.99244308799212900000); - aWeights.ChangeValue(3, 6) = +0.99801651211145281000; - aPoles.ChangeValue(3, 6) = - gp_Pnt(+116.43595392098000000000, +1.35694592285710100000, -74.50721127326711700000); - aWeights.ChangeValue(3, 7) = +0.99801547938002733000; - aPoles.ChangeValue(3, 7) = - gp_Pnt(+113.28000153804584000000, +1.35762078417993900000, -75.97921900496575600000); - aWeights.ChangeValue(3, 8) = +0.99801427699595313000; - aPoles.ChangeValue(3, 8) = - gp_Pnt(+110.10443724854701000000, +1.35840649430771500000, -77.40790012997213400000); - aWeights.ChangeValue(3, 9) = +0.99801219521191387000; - aPoles.ChangeValue(3, 9) = - gp_Pnt(+103.71561277285424000000, +1.35976677896647580000, -80.17831514578958300000); - aWeights.ChangeValue(3, 10) = +0.99801119017200446000; - aPoles.ChangeValue(3, 10) = - gp_Pnt(+100.50232486897988000000, +1.36042346207845170000, -81.51999289835789900000); - aWeights.ChangeValue(3, 11) = +0.99801030363459775000; - aPoles.ChangeValue(3, 11) = - gp_Pnt(+97.27087733082035500000, +1.36100269005924380000, -82.81788136334564900000); - aWeights.ChangeValue(3, 12) = +0.99800944410125381000; - aPoles.ChangeValue(3, 12) = - gp_Pnt(+94.02193936655145000000, +1.36156425167614130000, -84.07165794609035500000); - aWeights.ChangeValue(3, 13) = +0.99800863606857426000; - aPoles.ChangeValue(3, 13) = - gp_Pnt(+90.75622955795523700000, +1.36209214789795310000, -85.28105659074749700000); - aWeights.ChangeValue(3, 14) = +0.99800791446328430000; - aPoles.ChangeValue(3, 14) = - gp_Pnt(+87.47446474935537700000, +1.36256356235759690000, -86.44582972368263500000); - aWeights.ChangeValue(3, 15) = +0.99800720379689600000; - aPoles.ChangeValue(3, 15) = - gp_Pnt(+84.17731596959211500000, +1.36302781837419680000, -87.56569962027794000000); - aWeights.ChangeValue(3, 16) = +0.99800525790220496000; - aPoles.ChangeValue(3, 16) = - gp_Pnt(+74.24198734063921300000, +1.36429897306986340000, -90.78996991844945800000); - aWeights.ChangeValue(3, 17) = +0.99800413521623321000; - aPoles.ChangeValue(3, 17) = - gp_Pnt(+67.56001809965197000000, +1.36503231983535440000, -92.75885901427626800000); - aWeights.ChangeValue(3, 18) = +0.99800316736440942000; - aPoles.ChangeValue(3, 18) = - gp_Pnt(+60.82490109578901600000, +1.36566449260567850000, -94.54523441794054900000); - aWeights.ChangeValue(3, 19) = +0.99800233531441818000; - aPoles.ChangeValue(3, 19) = - gp_Pnt(+54.04219505707111900000, +1.36620793936844790000, -96.14746061467829500000); - aWeights.ChangeValue(3, 20) = +0.99800162387306934000; - aPoles.ChangeValue(3, 20) = - gp_Pnt(+47.21773986109732800000, +1.36667259642912180000, -97.56414160157402200000); - aWeights.ChangeValue(3, 21) = +0.99800102168630012000; - aPoles.ChangeValue(3, 21) = - gp_Pnt(+40.35765665228271400000, +1.36706588836418840000, -98.79412083143951400000); - aWeights.ChangeValue(3, 22) = +0.99800052123917371000; - aPoles.ChangeValue(3, 22) = - gp_Pnt(+33.46834796257081700000, +1.36739272798589770000, -99.83648116661171900000); - aWeights.ChangeValue(3, 23) = +0.99799971600020576000; - aPoles.ChangeValue(3, 23) = - gp_Pnt(+19.64441706716387900000, +1.36791861440644060000, -101.54459131896159000000); - aWeights.ChangeValue(3, 24) = +0.99799940935225717000; - aPoles.ChangeValue(3, 24) = - gp_Pnt(+12.70928858254282900000, +1.36811887624638580000, -102.21030492597274000000); - aWeights.ChangeValue(3, 25) = +0.99799919351964705000; - aPoles.ChangeValue(3, 25) = - gp_Pnt(+5.75722078489831280000, +1.36825982711689180000, -102.68697252648171000000); - aWeights.ChangeValue(3, 26) = +0.99799906478455291000; - aPoles.ChangeValue(3, 26) = - gp_Pnt(-1.20571159764999210000, +1.36834389755229970000, -102.97410341218257000000); - aWeights.ChangeValue(3, 27) = +0.99799902110371730000; - aPoles.ChangeValue(3, 27) = - gp_Pnt(-8.17346746041202720000, +1.36837242333404090000, -103.07142929357101000000); - aWeights.ChangeValue(3, 28) = +0.99799906210844536000; - aPoles.ChangeValue(3, 28) = - gp_Pnt(-15.14003926915473600000, +1.36834564548690430000, -102.97890429403182000000); - aWeights.ChangeValue(3, 29) = +0.99799918910460783000; - aPoles.ChangeValue(3, 29) = - gp_Pnt(-22.09945300681867100000, +1.36826271027814080000, -102.69670494840925000000); - aWeights.ChangeValue(3, 30) = +0.99799962065035785000; - aPoles.ChangeValue(3, 30) = - gp_Pnt(-35.99208002634647800000, +1.36798088374117890000, -101.75375562004130000000); - aWeights.ChangeValue(3, 31) = +0.99799992612548816000; - aPoles.ChangeValue(3, 31) = - gp_Pnt(-42.92529183965938000000, +1.36778138671521220000, -101.09300634269859000000); - aWeights.ChangeValue(3, 32) = +0.99800032324181509000; - aPoles.ChangeValue(3, 32) = - gp_Pnt(-49.83946240643516700000, +1.36752203923507090000, -100.24338136864999000000); - aWeights.ChangeValue(3, 33) = +0.99800081646744487000; - aPoles.ChangeValue(3, 33) = - gp_Pnt(-56.72868525600537000000, +1.36719992054037180000, -99.20550257416397200000); - aWeights.ChangeValue(3, 34) = +0.99800141299480705000; - aPoles.ChangeValue(3, 34) = - gp_Pnt(-63.58708851299418500000, +1.36681032802942060000, -97.98021473616272200000); - aWeights.ChangeValue(3, 35) = +0.99800212274065336000; - aPoles.ChangeValue(3, 35) = - gp_Pnt(-70.40883481115771800000, +1.36634677727753220000, -96.56858555851044900000); - aWeights.ChangeValue(3, 36) = +0.99800295834605834000; - aPoles.ChangeValue(3, 36) = - gp_Pnt(-77.18812120943384500000, +1.36580100206191160000, -94.97190570545618000000); - aWeights.ChangeValue(3, 37) = +0.99800438851666018000; - aPoles.ChangeValue(3, 37) = - gp_Pnt(-87.04430869357409500000, +1.36486684103840930000, -92.36516064771883800000); - aWeights.ChangeValue(3, 38) = +0.99800487302440710000; - aPoles.ChangeValue(3, 38) = - gp_Pnt(-90.15904180478642600000, +1.36455036334574700000, -91.49906951050012100000); - aWeights.ChangeValue(3, 39) = +0.99800538998403165000; - aPoles.ChangeValue(3, 39) = - gp_Pnt(-93.26280104894121300000, +1.36421268117563340000, -90.59356682763008500000); - aWeights.ChangeValue(3, 40) = +0.99800594114472085000; - aPoles.ChangeValue(3, 40) = - gp_Pnt(-96.35501076566437500000, +1.36385265030680070000, -89.64881447076304300000); - aWeights.ChangeValue(3, 41) = +0.99800652872047668000; - aPoles.ChangeValue(3, 41) = - gp_Pnt(-99.43509702281136200000, +1.36346882243976730000, -88.66498478868943800000); - aWeights.ChangeValue(3, 42) = +0.99800715539011531000; - aPoles.ChangeValue(3, 42) = - gp_Pnt(-102.50248760972849000000, +1.36305944519955100000, -87.64226061031386900000); - aWeights.ChangeValue(3, 43) = +0.99800782429726853000; - aPoles.ChangeValue(3, 43) = - gp_Pnt(-105.55661203062589000000, +1.36262246213878830000, -86.58083524789229600000); - aWeights.ChangeValue(3, 44) = +0.99800929984388531000; - aPoles.ChangeValue(3, 44) = - gp_Pnt(-111.87105232543304000000, +1.36165848631400000000, -84.29637819122412200000); - aWeights.ChangeValue(3, 45) = +0.99801015470554688000; - aPoles.ChangeValue(3, 45) = - gp_Pnt(-115.12916723990907000000, +1.36109998387148300000, -83.06721412498791300000); - aWeights.ChangeValue(3, 46) = +0.99801097177629106000; - aPoles.ChangeValue(3, 46) = - gp_Pnt(-118.37050305702043000000, +1.36056615831231790000, -81.79361556056927900000); - aWeights.ChangeValue(3, 47) = +0.99801197939908182000; - aPoles.ChangeValue(3, 47) = - gp_Pnt(-121.59440429164877000000, +1.35990780214188640000, -80.47594855348815200000); - aWeights.ChangeValue(3, 48) = +0.99801295017732938000; - aPoles.ChangeValue(3, 48) = - gp_Pnt(-124.80011198391350000000, +1.35927349774917520000, -79.11439339164216700000); - aWeights.ChangeValue(3, 49) = +0.99801403220993246000; - aPoles.ChangeValue(3, 49) = - gp_Pnt(-127.98695272451793000000, +1.35856646260703170000, -77.70931006235629500000); - aWeights.ChangeValue(3, 50) = +0.99801521135673477000; - aPoles.ChangeValue(3, 50) = - gp_Pnt(-131.15422466608416000000, +1.35779592883408770000, -76.26099835790641600000); - aWeights.ChangeValue(3, 51) = +0.99801760008173268000; - aPoles.ChangeValue(3, 51) = - gp_Pnt(-137.22341426940562000000, +1.35623488186342090000, -73.38505097675174200000); - aWeights.ChangeValue(3, 52) = +0.99801898347031770000; - aPoles.ChangeValue(3, 52) = - gp_Pnt(-140.12817143218851000000, +1.35533077140178190000, -71.96340636458091900000); - aWeights.ChangeValue(3, 53) = +0.99801998518653323000; - aPoles.ChangeValue(3, 53) = - gp_Pnt(-143.01477271081365000000, +1.35467609324036100000, -70.50482384325539400000); - aWeights.ChangeValue(3, 54) = +0.99802187318341851000; - aPoles.ChangeValue(3, 54) = - gp_Pnt(-145.88296929650440000000, +1.35344206211285110000, -69.01011970904052400000); - aWeights.ChangeValue(3, 55) = +0.99802301113749214000; - aPoles.ChangeValue(3, 55) = - gp_Pnt(-148.73181832948791000000, +1.35269822187277230000, -67.47885556090747600000); - aWeights.ChangeValue(3, 56) = +0.99802485896116799000; - aPoles.ChangeValue(3, 56) = - gp_Pnt(-151.56108889838526000000, +1.35149030610332030000, -65.91196867904423600000); - aWeights.ChangeValue(3, 57) = +0.99802660746081140000; - aPoles.ChangeValue(3, 57) = - gp_Pnt(-154.37005843077941000000, +1.35034719652907540000, -64.30939181125272300000); - aWeights.ChangeValue(3, 58) = +0.99803055992501810000; - aPoles.ChangeValue(3, 58) = - gp_Pnt(-160.16078498432634000000, +1.34776300585323040000, -60.90758294114521500000); - aWeights.ChangeValue(3, 59) = +0.99803322842151521000; - aPoles.ChangeValue(3, 59) = - gp_Pnt(-163.13986451909619000000, +1.34601805132734250000, -59.10384793755353900000); - aWeights.ChangeValue(3, 60) = +0.99803464125751229000; - aPoles.ChangeValue(3, 60) = - gp_Pnt(-166.09208359425281000000, +1.34509430571165490000, -57.25595351707911400000); - aWeights.ChangeValue(3, 61) = +0.99803901668572381000; - aPoles.ChangeValue(3, 61) = - gp_Pnt(-169.02259847263389000000, +1.34223252516315280000, -55.37471701865561600000); - aWeights.ChangeValue(3, 62) = +0.99804026123487555000; - aPoles.ChangeValue(3, 62) = - gp_Pnt(-171.92274649713781000000, +1.34141857200850120000, -53.44681670722970100000); - aWeights.ChangeValue(3, 63) = +0.99804470691034153000; - aPoles.ChangeValue(3, 63) = - gp_Pnt(-174.79824691248783000000, +1.33851025764084610000, -51.48277226031661500000); - aWeights.ChangeValue(3, 64) = +0.99804786265209489000; - aPoles.ChangeValue(3, 64) = - gp_Pnt(-177.64589658566118000000, +1.33644541377468110000, -49.47887210970986900000); - aWeights.ChangeValue(3, 65) = +0.99805209132461004000; - aPoles.ChangeValue(3, 65) = - gp_Pnt(-180.46609411219177000000, +1.33367801102763010000, -47.43691639460438100000); - aWeights.ChangeValue(3, 66) = +0.99805585511720041000; - aPoles.ChangeValue(3, 66) = - gp_Pnt(-183.08478109176986000000, +1.33121501172845690000, -45.54077967192022000000); - aWeights.ChangeValue(3, 67) = +0.99806110806405779000; - aPoles.ChangeValue(3, 67) = - gp_Pnt(-185.68001727848417000000, +1.32777577033982250000, -43.61205685047624300000); - aWeights.ChangeValue(3, 68) = +0.99806241123000117000; - aPoles.ChangeValue(3, 68) = - gp_Pnt(-188.24953622256075000000, +1.32692526187276720000, -41.64902509374122300000); - aWeights.ChangeValue(3, 69) = +0.99807437025077705000; - aPoles.ChangeValue(3, 69) = - gp_Pnt(-190.79766796840426000000, +1.31909012471800140000, -39.65777616520052400000); - aWeights.ChangeValue(3, 70) = +0.99807032269259688000; - aPoles.ChangeValue(3, 70) = - gp_Pnt(-193.31511620328166000000, +1.32174544077043810000, -37.62798636408343400000); - aWeights.ChangeValue(3, 71) = +0.99808625039380772000; - aPoles.ChangeValue(3, 71) = - gp_Pnt(-195.81278252670535000000, +1.31130937814640340000, -35.57429171163009600000); - aWeights.ChangeValue(3, 72) = +0.99809097922828749000; - aPoles.ChangeValue(3, 72) = - gp_Pnt(-198.28008499427182000000, +1.30820906528388470000, -33.48422839734306700000); - aWeights.ChangeValue(3, 73) = +0.99809984631895698000; - aPoles.ChangeValue(3, 73) = - gp_Pnt(-200.72099421295775000000, +1.30239515227575060000, -31.36416391357070300000); - aWeights.ChangeValue(3, 74) = +0.99810637147759285000; - aPoles.ChangeValue(3, 74) = - gp_Pnt(-203.16127009409345000000, +1.29812048781277520000, -29.24337154392900800000); - aWeights.ChangeValue(3, 75) = +0.99812847998895315000; - aPoles.ChangeValue(3, 75) = - gp_Pnt(-205.57777363915829000000, +1.28359951668439790000, -27.09591401257074100000); - aWeights.ChangeValue(3, 76) = +0.99809892249848597000; - aPoles.ChangeValue(3, 76) = - gp_Pnt(-207.95321979211485000000, +1.30303533816127510000, -24.90029856221717000000); - aWeights.ChangeValue(3, 77) = +0.99819234539248169000; - aPoles.ChangeValue(3, 77) = - gp_Pnt(-210.32920376311637000000, +1.24168994973372330000, -22.71372419603407900000); - aWeights.ChangeValue(3, 78) = +0.99816706733577565000; - aPoles.ChangeValue(3, 78) = - gp_Pnt(-212.65404345030839000000, +1.25824740351837460000, -20.46200135460381000000); - aWeights.ChangeValue(3, 79) = +0.99818127776964660000; - aPoles.ChangeValue(3, 79) = - gp_Pnt(-214.94032188963598000000, +1.24888524402456480000, -18.17894168737611000000); - aWeights.ChangeValue(3, 80) = +0.99819475509197664000; - aPoles.ChangeValue(3, 80) = - gp_Pnt(-217.21049138159862000000, +1.24010538580557930000, -15.87773552075580100000); - aWeights.ChangeValue(3, 81) = +0.99826376750414003000; - aPoles.ChangeValue(3, 81) = - gp_Pnt(-219.45963474898130000000, +1.19454909379966280000, -13.56324778739743800000); - aWeights.ChangeValue(4, 1) = +0.99424302042862245000; - aPoles.ChangeValue(4, 1) = - gp_Pnt(+132.13618409480023000000, +0.70840889522526063000, -66.94024029007874800000); - aWeights.ChangeValue(4, 2) = +0.99423758610938695000; - aPoles.ChangeValue(4, 2) = - gp_Pnt(+129.08297406972278000000, +0.70909252303575865000, -68.62615176496952100000); - aWeights.ChangeValue(4, 3) = +0.99423305718875432000; - aPoles.ChangeValue(4, 3) = - gp_Pnt(+126.00685240811242000000, +0.70966228194967051000, -70.27050713058781600000); - aWeights.ChangeValue(4, 4) = +0.99422944886444642000; - aPoles.ChangeValue(4, 4) = - gp_Pnt(+122.90845587213282000000, +0.71011623149435366000, -71.87297804945868100000); - aWeights.ChangeValue(4, 5) = +0.99422505844796127000; - aPoles.ChangeValue(4, 5) = - gp_Pnt(+119.78834767262531000000, +0.71066859395963999000, -73.43294438704307900000); - aWeights.ChangeValue(4, 6) = +0.99422091417503022000; - aPoles.ChangeValue(4, 6) = - gp_Pnt(+116.64728496160824000000, +0.71119000548737488000, -74.95024473036627900000); - aWeights.ChangeValue(4, 7) = +0.99421796254996875000; - aPoles.ChangeValue(4, 7) = - gp_Pnt(+113.48602386120655000000, +0.71156137519735096000, -76.42471498016054500000); - aWeights.ChangeValue(4, 8) = +0.99421452605999638000; - aPoles.ChangeValue(4, 8) = - gp_Pnt(+110.30511547520040000000, +0.71199375553590705000, -77.85578472764748900000); - aWeights.ChangeValue(4, 9) = +0.99420857626658776000; - aPoles.ChangeValue(4, 9) = - gp_Pnt(+103.90553506044348000000, +0.71274238201017392000, -80.63083668700706100000); - aWeights.ChangeValue(4, 10) = +0.99420570386914531000; - aPoles.ChangeValue(4, 10) = - gp_Pnt(+100.68683453164211000000, +0.71310380757531833000, -81.97476109354066400000); - aWeights.ChangeValue(4, 11) = +0.99420317017586146000; - aPoles.ChangeValue(4, 11) = - gp_Pnt(+97.44994659335081600000, +0.71342262156961334000, -83.27482261755635300000); - aWeights.ChangeValue(4, 12) = +0.99420071368291341000; - aPoles.ChangeValue(4, 12) = - gp_Pnt(+94.19554253170841200000, +0.71373172711717636000, -84.53069694549194000000); - aWeights.ChangeValue(4, 13) = +0.99419840439350793000; - aPoles.ChangeValue(4, 13) = - gp_Pnt(+90.92433917217061900000, +0.71402231445757036000, -85.74211902365664200000); - aWeights.ChangeValue(4, 14) = +0.99419634212229768000; - aPoles.ChangeValue(4, 14) = - gp_Pnt(+87.63705473050230000000, +0.71428182289044062000, -86.90884124933938900000); - aWeights.ChangeValue(4, 15) = +0.99419431112670464000; - aPoles.ChangeValue(4, 15) = - gp_Pnt(+84.33436439436984200000, +0.71453739893908408000, -88.03058362353205300000); - aWeights.ChangeValue(4, 16) = +0.99418875003915341000; - aPoles.ChangeValue(4, 16) = - gp_Pnt(+74.38231313217285400000, +0.71523720648163680000, -91.26025430410756200000); - aWeights.ChangeValue(4, 17) = +0.99418554160984429000; - aPoles.ChangeValue(4, 17) = - gp_Pnt(+67.68910051798944500000, +0.71564096751482986000, -93.23244050128337800000); - aWeights.ChangeValue(4, 18) = +0.99418277570171931000; - aPoles.ChangeValue(4, 18) = - gp_Pnt(+60.94265918181897500000, +0.71598904839509359000, -95.02180567308657500000); - aWeights.ChangeValue(4, 19) = +0.99418039790864621000; - aPoles.ChangeValue(4, 19) = - gp_Pnt(+54.14855416044807900000, +0.71628829211206946000, -96.62671289123449000000); - aWeights.ChangeValue(4, 20) = +0.99417836479981814000; - aPoles.ChangeValue(4, 20) = - gp_Pnt(+47.31263275511362600000, +0.71654416141740851000, -98.04576467050098600000); - aWeights.ChangeValue(4, 21) = +0.99417664391975691000; - aPoles.ChangeValue(4, 21) = - gp_Pnt(+40.44102486854357200000, +0.71676073875086976000, -99.27780280738555500000); - aWeights.ChangeValue(4, 22) = +0.99417521378830997000; - aPoles.ChangeValue(4, 22) = - gp_Pnt(+33.54014335198198900000, +0.71694072618465221000, -100.32190824729783000000); - aWeights.ChangeValue(4, 23) = +0.99417291266204433000; - aPoles.ChangeValue(4, 23) = - gp_Pnt(+19.69298272358705000000, +0.71723033475882103000, -102.03287833894613000000); - aWeights.ChangeValue(4, 24) = +0.99417203636017570000; - aPoles.ChangeValue(4, 24) = - gp_Pnt(+12.74619890889187300000, +0.71734062296661449000, -102.69970663658552000000); - aWeights.ChangeValue(4, 25) = +0.99417141958182476000; - aPoles.ChangeValue(4, 25) = - gp_Pnt(+5.78245043030823250000, +0.71741824902277995000, -103.17717197796689000000); - aWeights.ChangeValue(4, 26) = +0.99417105170022846000; - aPoles.ChangeValue(4, 26) = - gp_Pnt(-1.19217909208406270000, +0.71746454980293017000, -103.46478315098152000000); - aWeights.ChangeValue(4, 27) = +0.99417092687508068000; - aPoles.ChangeValue(4, 27) = - gp_Pnt(-8.17163978203099180000, +0.71748026003105458000, -103.56227159755184000000); - aWeights.ChangeValue(4, 28) = +0.99417104405253187000; - aPoles.ChangeValue(4, 28) = - gp_Pnt(-15.14991535484593800000, +0.71746551227361877000, -103.46959139663633000000); - aWeights.ChangeValue(4, 29) = +0.99417140696519068000; - aPoles.ChangeValue(4, 29) = - gp_Pnt(-22.12102296425817400000, +0.71741983693815459000, -103.18691926012113000000); - aWeights.ChangeValue(4, 30) = +0.99417264018315676000; - aPoles.ChangeValue(4, 30) = - gp_Pnt(-36.03699423807252300000, +0.71726462804712465000, -102.24239043165372000000); - aWeights.ChangeValue(4, 31) = +0.99417351313460955000; - aPoles.ChangeValue(4, 31) = - gp_Pnt(-42.98185258768797500000, +0.71715476185170723000, -101.58053487832193000000); - aWeights.ChangeValue(4, 32) = +0.99417464796983568000; - aPoles.ChangeValue(4, 32) = - gp_Pnt(-49.90763755490115700000, +0.71701193671091712000, -100.72948788576410000000); - aWeights.ChangeValue(4, 33) = +0.99417605745995530000; - aPoles.ChangeValue(4, 33) = - gp_Pnt(-56.80843390632649900000, +0.71683454604177377000, -99.68987236817491700000); - aWeights.ChangeValue(4, 34) = +0.99417776216385467000; - aPoles.ChangeValue(4, 34) = - gp_Pnt(-63.67836146608049600000, +0.71662000367742562000, -98.46253420440308400000); - aWeights.ChangeValue(4, 35) = +0.99417979042818705000; - aPoles.ChangeValue(4, 35) = - gp_Pnt(-70.51157486810592400000, +0.71636474389607163000, -97.04854231351581000000); - aWeights.ChangeValue(4, 36) = +0.99418217838737100000; - aPoles.ChangeValue(4, 36) = - gp_Pnt(-77.30226331485057800000, +0.71606422146024096000, -95.44918875092946600000); - aWeights.ChangeValue(4, 37) = +0.99418626551507883000; - aPoles.ChangeValue(4, 37) = - gp_Pnt(-87.17503156127875700000, +0.71554987190288122000, -92.83807781738744300000); - aWeights.ChangeValue(4, 38) = +0.99418765014289556000; - aPoles.ChangeValue(4, 38) = - gp_Pnt(-90.29499963358738100000, +0.71537562386381059000, -91.97053762881716900000); - aWeights.ChangeValue(4, 39) = +0.99418912751868260000; - aPoles.ChangeValue(4, 39) = - gp_Pnt(-93.40397633478176000000, +0.71518970580821706000, -91.06351986664817800000); - aWeights.ChangeValue(4, 40) = +0.99419070264287346000; - aPoles.ChangeValue(4, 40) = - gp_Pnt(-96.50138523104767800000, +0.71499148886670094000, -90.11718659777564300000); - aWeights.ChangeValue(4, 41) = +0.99419238184469383000; - aPoles.ChangeValue(4, 41) = - gp_Pnt(-99.58665166110419900000, +0.71478017704711161000, -89.13171035602891800000); - aWeights.ChangeValue(4, 42) = +0.99419417278216393000; - aPoles.ChangeValue(4, 42) = - gp_Pnt(-102.65920271683186000000, +0.71455480723882170000, -88.10727415073346000000); - aWeights.ChangeValue(4, 43) = +0.99419608444209617000; - aPoles.ChangeValue(4, 43) = - gp_Pnt(-105.71846722422283000000, +0.71431424921765596000, -87.04407147601585800000); - aWeights.ChangeValue(4, 44) = +0.99420030141669824000; - aPoles.ChangeValue(4, 44) = - gp_Pnt(-112.04353021881408000000, +0.71378360593609291000, -84.75579106017932000000); - aWeights.ChangeValue(4, 45) = +0.99420274455295243000; - aPoles.ChangeValue(4, 45) = - gp_Pnt(-115.30712351688430000000, +0.71347617951477893000, -83.52457168950516600000); - aWeights.ChangeValue(4, 46) = +0.99420507969516914000; - aPoles.ChangeValue(4, 46) = - gp_Pnt(-118.55391065270935000000, +0.71318234625457844000, -82.24884224143599500000); - aWeights.ChangeValue(4, 47) = +0.99420795946419460000; - aPoles.ChangeValue(4, 47) = - gp_Pnt(-121.78323693095153000000, +0.71281998990170370000, -80.92897147787398600000); - aWeights.ChangeValue(4, 48) = +0.99421073394729520000; - aPoles.ChangeValue(4, 48) = - gp_Pnt(-124.99434061394447000000, +0.71247088780699119000, -79.56513754354314500000); - aWeights.ChangeValue(4, 49) = +0.99421382643715051000; - aPoles.ChangeValue(4, 49) = - gp_Pnt(-128.18654935306802000000, +0.71208178090166396000, -78.15770189412481300000); - aWeights.ChangeValue(4, 50) = +0.99421719652005114000; - aPoles.ChangeValue(4, 50) = - gp_Pnt(-131.35915951555538000000, +0.71165775668839981000, -76.70696466864815500000); - aWeights.ChangeValue(4, 51) = +0.99422402375653052000; - aPoles.ChangeValue(4, 51) = - gp_Pnt(-137.43857370930490000000, +0.71079877890710363000, -73.82620311743470200000); - aWeights.ChangeValue(4, 52) = +0.99422797768691740000; - aPoles.ChangeValue(4, 52) = - gp_Pnt(-140.34822128390073000000, +0.71030132584778982000, -72.40218284379008700000); - aWeights.ChangeValue(4, 53) = +0.99423084075610579000; - aPoles.ChangeValue(4, 53) = - gp_Pnt(-143.23968120103163000000, +0.70994112075449667000, -70.94115847846593700000); - aWeights.ChangeValue(4, 54) = +0.99423623706224973000; - aPoles.ChangeValue(4, 54) = - gp_Pnt(-146.11271315064005000000, +0.70926223398833632000, -69.44395856663618400000); - aWeights.ChangeValue(4, 55) = +0.99423948964319253000; - aPoles.ChangeValue(4, 55) = - gp_Pnt(-148.96636467875118000000, +0.70885305306993507000, -67.91012785943519200000); - aWeights.ChangeValue(4, 56) = +0.99424477127021760000; - aPoles.ChangeValue(4, 56) = - gp_Pnt(-151.80041102174371000000, +0.70818863107582075000, -66.34061951491401000000); - aWeights.ChangeValue(4, 57) = +0.99424976912431906000; - aPoles.ChangeValue(4, 57) = - gp_Pnt(-154.61412826195317000000, +0.70755993553172780000, -64.73535576374381200000); - aWeights.ChangeValue(4, 58) = +0.99426106692542415000; - aPoles.ChangeValue(4, 58) = - gp_Pnt(-160.41462700323274000000, +0.70613881146866808000, -61.32785485541679500000); - aWeights.ChangeValue(4, 59) = +0.99426869485276259000; - aPoles.ChangeValue(4, 59) = - gp_Pnt(-163.39874797129167000000, +0.70517937516238605000, -59.52109641918814000000); - aWeights.ChangeValue(4, 60) = +0.99427273335051769000; - aPoles.ChangeValue(4, 60) = - gp_Pnt(-166.35588428707737000000, +0.70467140031138198000, -57.67014968010805400000); - aWeights.ChangeValue(4, 61) = +0.99428524121150996000; - aPoles.ChangeValue(4, 61) = - gp_Pnt(-169.29147402675417000000, +0.70309833118760823000, -55.78569706052214600000); - aWeights.ChangeValue(4, 62) = +0.99428879891231192000; - aPoles.ChangeValue(4, 62) = - gp_Pnt(-172.19641321622018000000, +0.70265088960130029000, -53.85463096447261900000); - aWeights.ChangeValue(4, 63) = +0.99430150819260854000; - aPoles.ChangeValue(4, 63) = - gp_Pnt(-175.07684836851479000000, +0.70105264832187786000, -51.88726956537038900000); - aWeights.ChangeValue(4, 64) = +0.99431053021705873000; - aPoles.ChangeValue(4, 64) = - gp_Pnt(-177.92932492963632000000, +0.69991818857623234000, -49.88000737868681300000); - aWeights.ChangeValue(4, 65) = +0.99432262020918794000; - aPoles.ChangeValue(4, 65) = - gp_Pnt(-180.75433885652521000000, +0.69839807993520564000, -47.83460859504128800000); - aWeights.ChangeValue(4, 66) = +0.99433338093448842000; - aPoles.ChangeValue(4, 66) = - gp_Pnt(-183.37745173242254000000, +0.69704510882650861000, -45.93530736698277700000); - aWeights.ChangeValue(4, 67) = +0.99434840096468768000; - aPoles.ChangeValue(4, 67) = - gp_Pnt(-185.97711214268182000000, +0.69515696483250133000, -44.00334265992864100000); - aWeights.ChangeValue(4, 68) = +0.99435212441487342000; - aPoles.ChangeValue(4, 68) = - gp_Pnt(-188.55092060214918000000, +0.69468843290184534000, -42.03706245316480100000); - aWeights.ChangeValue(4, 69) = +0.99438632495837886000; - aPoles.ChangeValue(4, 69) = - gp_Pnt(-191.10351948864678000000, +0.69039032514405918000, -40.04240176159244400000); - aWeights.ChangeValue(4, 70) = +0.99437474610357146000; - aPoles.ChangeValue(4, 70) = - gp_Pnt(-193.62512272227769000000, +0.69184483548244469000, -38.00925246210125900000); - aWeights.ChangeValue(4, 71) = +0.99442029730057158000; - aPoles.ChangeValue(4, 71) = - gp_Pnt(-196.12715745709386000000, +0.68612074693666814000, -35.95207510226987300000); - aWeights.ChangeValue(4, 72) = +0.99443382321708784000; - aPoles.ChangeValue(4, 72) = - gp_Pnt(-198.59871781224271000000, +0.68442148883790921000, -33.85842837168388500000); - aWeights.ChangeValue(4, 73) = +0.99445918644353237000; - aPoles.ChangeValue(4, 73) = - gp_Pnt(-201.04387700918369000000, +0.68123533540985159000, -31.73471330438436400000); - aWeights.ChangeValue(4, 74) = +0.99447784672499884000; - aPoles.ChangeValue(4, 74) = - gp_Pnt(-203.48830197003542000000, +0.67889067518118906000, -29.61036197082074800000); - aWeights.ChangeValue(4, 75) = +0.99454111417144087000; - aPoles.ChangeValue(4, 75) = - gp_Pnt(-205.90905874701556000000, +0.67094847421818948000, -27.45911353863423800000); - aWeights.ChangeValue(4, 76) = +0.99445650432969468000; - aPoles.ChangeValue(4, 76) = - gp_Pnt(-208.28851122415659000000, +0.68156618053615436000, -25.25989914496455000000); - aWeights.ChangeValue(4, 77) = +0.99472383917628937000; - aPoles.ChangeValue(4, 77) = - gp_Pnt(-210.66819860636727000000, +0.64801004101885640000, -23.06997485052475800000); - aWeights.ChangeValue(4, 78) = +0.99465154011060308000; - aPoles.ChangeValue(4, 78) = - gp_Pnt(-212.99829629837927000000, +0.65709020698928045000, -20.81293704958459000000); - aWeights.ChangeValue(4, 79) = +0.99469225299704522000; - aPoles.ChangeValue(4, 79) = - gp_Pnt(-215.28778722004142000000, +0.65198647566642243000, -18.52648999480212300000); - aWeights.ChangeValue(4, 80) = +0.99473072608314816000; - aPoles.ChangeValue(4, 80) = - gp_Pnt(-217.56233176434088000000, +0.64714607636795729000, -16.22125679272672700000); - aWeights.ChangeValue(4, 81) = +0.99492849872148770000; - aPoles.ChangeValue(4, 81) = - gp_Pnt(-219.81591407133737000000, +0.62237708094437050000, -13.90082269618381800000); - aWeights.ChangeValue(5, 1) = +0.99802424639217535000; - aPoles.ChangeValue(5, 1) = - gp_Pnt(+132.45622778603641000000, +0.24240580374773624000, -67.51941232824347600000); - aWeights.ChangeValue(5, 2) = +0.99802234515930366000; - aPoles.ChangeValue(5, 2) = - gp_Pnt(+129.39621499227619000000, +0.24264599956164210000, -69.20932849809996400000); - aWeights.ChangeValue(5, 3) = +0.99802076064199163000; - aPoles.ChangeValue(5, 3) = - gp_Pnt(+126.31320722587012000000, +0.24284620475411531000, -70.85757023346207000000); - aWeights.ChangeValue(5, 4) = +0.99801949820656444000; - aPoles.ChangeValue(5, 4) = - gp_Pnt(+123.20785947444472000000, +0.24300571706284735000, -72.46379895615213200000); - aWeights.ChangeValue(5, 5) = +0.99801796211084626000; - aPoles.ChangeValue(5, 5) = - gp_Pnt(+120.08075545981777000000, +0.24319982314295371000, -74.02745916652884300000); - aWeights.ChangeValue(5, 6) = +0.99801651211139986000; - aPoles.ChangeValue(5, 6) = - gp_Pnt(+116.93263892914923000000, +0.24338306180645181000, -75.54835063375608700000); - aWeights.ChangeValue(5, 7) = +0.99801547938007906000; - aPoles.ChangeValue(5, 7) = - gp_Pnt(+113.76425167349765000000, +0.24351357797625062000, -77.02627451676777100000); - aWeights.ChangeValue(5, 8) = +0.99801427699593348000; - aPoles.ChangeValue(5, 8) = - gp_Pnt(+110.57618061475338000000, +0.24366553774363486000, -78.46071663606139200000); - aWeights.ChangeValue(5, 9) = +0.99801219521177365000; - aPoles.ChangeValue(5, 9) = - gp_Pnt(+104.16217613984874000000, +0.24392865233284403000, -81.24228081548614000000); - aWeights.ChangeValue(5, 10) = +0.99801119017243534000; - aPoles.ChangeValue(5, 10) = - gp_Pnt(+100.93622072836907000000, +0.24405568433254640000, -82.58935804874866400000); - aWeights.ChangeValue(5, 11) = +0.99801030363411136000; - aPoles.ChangeValue(5, 11) = - gp_Pnt(+97.69202612265307600000, +0.24416774311013159000, -83.89246252379766100000); - aWeights.ChangeValue(5, 12) = +0.99800944410126124000; - aPoles.ChangeValue(5, 12) = - gp_Pnt(+94.43027249107268500000, +0.24427639255629080000, -85.15127753548810600000); - aWeights.ChangeValue(5, 13) = +0.99800863606905588000; - aPoles.ChangeValue(5, 13) = - gp_Pnt(+91.15167507122404800000, +0.24437853537532742000, -86.36553541507953500000); - aWeights.ChangeValue(5, 14) = +0.99800791446282866000; - aPoles.ChangeValue(5, 14) = - gp_Pnt(+87.85695090009397700000, +0.24446975628264125000, -87.53498464352057300000); - aWeights.ChangeValue(5, 15) = +0.99800720379704511000; - aPoles.ChangeValue(5, 15) = - gp_Pnt(+84.54678770958248900000, +0.24455959646371978000, -88.65934979276558200000); - aWeights.ChangeValue(5, 16) = +0.99800525790220262000; - aPoles.ChangeValue(5, 16) = - gp_Pnt(+74.57222162875666500000, +0.24480559775636487000, -91.89655746079053200000); - aWeights.ChangeValue(5, 17) = +0.99800413521623044000; - aPoles.ChangeValue(5, 17) = - gp_Pnt(+67.86385477996348900000, +0.24494753702776123000, -93.87334138726605200000); - aWeights.ChangeValue(5, 18) = +0.99800316736440708000; - aPoles.ChangeValue(5, 18) = - gp_Pnt(+61.10212188651380700000, +0.24506990714535715000, -95.66687639706128700000); - aWeights.ChangeValue(5, 19) = +0.99800233531441618000; - aPoles.ChangeValue(5, 19) = - gp_Pnt(+54.29260355218377000000, +0.24517511152453569000, -97.27552257290322800000); - aWeights.ChangeValue(5, 20) = +0.99800162387306812000; - aPoles.ChangeValue(5, 20) = - gp_Pnt(+47.44116356008504500000, +0.24526506890417449000, -98.69787956398771200000); - aWeights.ChangeValue(5, 21) = +0.99800102168629923000; - aPoles.ChangeValue(5, 21) = - gp_Pnt(+40.55394899036769400000, +0.24534121333759545000, -99.93278652962781900000); - aWeights.ChangeValue(5, 22) = +0.99800052123917249000; - aPoles.ChangeValue(5, 22) = - gp_Pnt(+33.63739034141031700000, +0.24540449418574758000, -100.97932209286283000000); - aWeights.ChangeValue(5, 23) = +0.99799971600020576000; - aPoles.ChangeValue(5, 23) = - gp_Pnt(+19.75877904385457000000, +0.24550631764576064000, -102.69427034587730000000); - aWeights.ChangeValue(5, 24) = +0.99799940935225595000; - aPoles.ChangeValue(5, 24) = - gp_Pnt(+12.79621461719473900000, +0.24554509442498113000, -103.36264862290150000000); - aWeights.ChangeValue(5, 25) = +0.99799919351964361000; - aPoles.ChangeValue(5, 25) = - gp_Pnt(+5.81664173483571470000, +0.24557238768930081000, -103.84122357926364000000); - aWeights.ChangeValue(5, 26) = +0.99799906478454914000; - aPoles.ChangeValue(5, 26) = - gp_Pnt(-1.17384006705611750000, +0.24558866712534574000, -104.12950288114470000000); - aWeights.ChangeValue(5, 27) = +0.99799902110371452000; - aPoles.ChangeValue(5, 27) = - gp_Pnt(-8.16916502467035950000, +0.24559419086566145000, -104.22721740658889000000); - aWeights.ChangeValue(5, 28) = +0.99799906210844525000; - aPoles.ChangeValue(5, 28) = - gp_Pnt(-15.16330109337111900000, +0.24558900548798951000, -104.13432123956672000000); - aWeights.ChangeValue(5, 29) = +0.99799918910460916000; - aPoles.ChangeValue(5, 29) = - gp_Pnt(-22.15024989420349800000, +0.24557294601509544000, -103.85099166853988000000); - aWeights.ChangeValue(5, 30) = +0.99799962065035952000; - aPoles.ChangeValue(5, 30) = - gp_Pnt(-36.09784025928350100000, +0.24551837507724711000, -102.90426687944763000000); - aWeights.ChangeValue(5, 31) = +0.99799992612548860000; - aPoles.ChangeValue(5, 31) = - gp_Pnt(-43.05848024708384300000, +0.24547974681812620000, -102.24087223758063000000); - aWeights.ChangeValue(5, 32) = +0.99800032324181287000; - aPoles.ChangeValue(5, 32) = - gp_Pnt(-50.00000136683811300000, +0.24542953068576923000, -101.38784584473753000000); - aWeights.ChangeValue(5, 33) = +0.99800081646744143000; - aPoles.ChangeValue(5, 33) = - gp_Pnt(-56.91647304260395400000, +0.24536716218422927000, -100.34581179308852000000); - aWeights.ChangeValue(5, 34) = +0.99800141299480460000; - aPoles.ChangeValue(5, 34) = - gp_Pnt(-63.80199929133657100000, +0.24529173277606747000, -99.11561770524215800000); - aWeights.ChangeValue(5, 35) = +0.99800212274065292000; - aPoles.ChangeValue(5, 35) = - gp_Pnt(-70.65071863638867500000, +0.24520198988589620000, -97.69833476064030700000); - aWeights.ChangeValue(5, 36) = +0.99800295834605834000; - aPoles.ChangeValue(5, 36) = - gp_Pnt(-77.45680402323041800000, +0.24509633690518939000, -96.09525772913629300000); - aWeights.ChangeValue(5, 37) = +0.99800438851665707000; - aPoles.ChangeValue(5, 37) = - gp_Pnt(-87.35194268844766400000, +0.24491551610541196000, -93.47806376363495000000); - aWeights.ChangeValue(5, 38) = +0.99800487302440644000; - aPoles.ChangeValue(5, 38) = - gp_Pnt(-90.47898339307414500000, +0.24485425955861742000, -92.60850028621504700000); - aWeights.ChangeValue(5, 39) = +0.99800538998403221000; - aPoles.ChangeValue(5, 39) = - gp_Pnt(-93.59500505694055100000, +0.24478890139349116000, -91.69936647202810300000); - aWeights.ChangeValue(5, 40) = +0.99800594114472096000; - aPoles.ChangeValue(5, 40) = - gp_Pnt(-96.69942959625443300000, +0.24471922075774133000, -90.75082469114758500000); - aWeights.ChangeValue(5, 41) = +0.99800652872047502000; - aPoles.ChangeValue(5, 41) = - gp_Pnt(-99.79168063143930600000, +0.24464493811196314000, -89.76304779373697300000); - aWeights.ChangeValue(5, 42) = +0.99800715539011187000; - aPoles.ChangeValue(5, 42) = - gp_Pnt(-102.87118348036965000000, +0.24456571523016235000, -88.73621911304020700000); - aWeights.ChangeValue(5, 43) = +0.99800782429726465000; - aPoles.ChangeValue(5, 43) = - gp_Pnt(-105.93736515171811000000, +0.24448115520035879000, -87.67053246863201800000); - aWeights.ChangeValue(5, 44) = +0.99800929984371112000; - aPoles.ChangeValue(5, 44) = - gp_Pnt(-112.27672847568951000000, +0.24429462970498794000, -85.37690123862388700000); - aWeights.ChangeValue(5, 45) = +0.99801015470633669000; - aPoles.ChangeValue(5, 45) = - gp_Pnt(-115.54769755356581000000, +0.24418656943131900000, -84.14279592325505100000); - aWeights.ChangeValue(5, 46) = +0.99801097177455889000; - aPoles.ChangeValue(5, 46) = - gp_Pnt(-118.80182311076892000000, +0.24408328894344730000, -82.86408351153079400000); - aWeights.ChangeValue(5, 47) = +0.99801197940129383000; - aPoles.ChangeValue(5, 47) = - gp_Pnt(-122.03843417449148000000, +0.24395592759703674000, -81.54111184389478200000); - aWeights.ChangeValue(5, 48) = +0.99801295017559344000; - aPoles.ChangeValue(5, 48) = - gp_Pnt(-125.25678060282321000000, +0.24383322797751039000, -80.17408187890907800000); - aWeights.ChangeValue(5, 49) = +0.99801403221073270000; - aPoles.ChangeValue(5, 49) = - gp_Pnt(-128.45617956663568000000, +0.24369647262362162000, -78.76334161483092100000); - aWeights.ChangeValue(5, 50) = +0.99801521135655380000; - aPoles.ChangeValue(5, 50) = - gp_Pnt(-131.63592529803751000000, +0.24354745092247693000, -77.30919404502431300000); - aWeights.ChangeValue(5, 51) = +0.99801760008187401000; - aPoles.ChangeValue(5, 51) = - gp_Pnt(-137.72900951211963000000, +0.24324557860805471000, -74.42165429070698200000); - aWeights.ChangeValue(5, 52) = +0.99801898346970708000; - aPoles.ChangeValue(5, 52) = - gp_Pnt(-140.64518873661288000000, +0.24307076523393223000, -72.99426192178911800000); - aWeights.ChangeValue(5, 53) = +0.99801998518786039000; - aPoles.ChangeValue(5, 53) = - gp_Pnt(-143.54316005505726000000, +0.24294418386170585000, -71.52981926220020600000); - aWeights.ChangeValue(5, 54) = +0.99802187318168345000; - aPoles.ChangeValue(5, 54) = - gp_Pnt(-146.42260629144496000000, +0.24270562978064991000, -70.02903356238938700000); - aWeights.ChangeValue(5, 55) = +0.99802301113888081000; - aPoles.ChangeValue(5, 55) = - gp_Pnt(-149.28266198929455000000, +0.24256185427332766000, -68.49161271016626500000); - aWeights.ChangeValue(5, 56) = +0.99802485896051119000; - aPoles.ChangeValue(5, 56) = - gp_Pnt(-152.12302992679020000000, +0.24232840183433180000, -66.91836178765569800000); - aWeights.ChangeValue(5, 57) = +0.99802660746095961000; - aPoles.ChangeValue(5, 57) = - gp_Pnt(-154.94301695331424000000, +0.24210751871096883000, -65.30929034698890200000); - aWeights.ChangeValue(5, 58) = +0.99803055992501044000; - aPoles.ChangeValue(5, 58) = - gp_Pnt(-160.75642720778953000000, +0.24160825342055195000, -61.89368007550259400000); - aWeights.ChangeValue(5, 59) = +0.99803322842160846000; - aPoles.ChangeValue(5, 59) = - gp_Pnt(-163.74717060555361000000, +0.24127121961594802000, -60.08255013672670200000); - aWeights.ChangeValue(5, 60) = +0.99803464125717123000; - aPoles.ChangeValue(5, 60) = - gp_Pnt(-166.71086689375946000000, +0.24109275824918924000, -58.22731479955884700000); - aWeights.ChangeValue(5, 61) = +0.99803901668628470000; - aPoles.ChangeValue(5, 61) = - gp_Pnt(-169.65297207222594000000, +0.24054025241076704000, -56.33806928337021700000); - aWeights.ChangeValue(5, 62) = +0.99804026123435818000; - aPoles.ChangeValue(5, 62) = - gp_Pnt(-172.56427255537395000000, +0.24038308942389072000, -54.40260496408483000000); - aWeights.ChangeValue(5, 63) = +0.99804470691060532000; - aPoles.ChangeValue(5, 63) = - gp_Pnt(-175.45101016300779000000, +0.23982181928534163000, -52.43032166263763100000); - aWeights.ChangeValue(5, 64) = +0.99804786265202527000; - aPoles.ChangeValue(5, 64) = - gp_Pnt(-178.30970270493245000000, +0.23942347201733374000, -50.41823769283568900000); - aWeights.ChangeValue(5, 65) = +0.99805209132460959000; - aPoles.ChangeValue(5, 65) = - gp_Pnt(-181.14080917168710000000, +0.23888978094458979000, -48.36782293133622100000); - aWeights.ChangeValue(5, 66) = +0.99805585511722006000; - aPoles.ChangeValue(5, 66) = - gp_Pnt(-183.76963089028271000000, +0.23841474156011525000, -46.46384963887197700000); - aWeights.ChangeValue(5, 67) = +0.99806110806389992000; - aPoles.ChangeValue(5, 67) = - gp_Pnt(-186.37480135254410000000, +0.23775204017864099000, -44.52702607060874100000); - aWeights.ChangeValue(5, 68) = +0.99806241123039841000; - aPoles.ChangeValue(5, 68) = - gp_Pnt(-188.95443339023049000000, +0.23758721013871806000, -42.55611011320790700000); - aWeights.ChangeValue(5, 69) = +0.99807437025022461000; - aPoles.ChangeValue(5, 69) = - gp_Pnt(-191.51185439080101000000, +0.23607937004601673000, -40.55588840407725800000); - aWeights.ChangeValue(5, 70) = +0.99807032269304363000; - aPoles.ChangeValue(5, 70) = - gp_Pnt(-194.03956238778505000000, +0.23658914396266717000, -38.51843887702921200000); - aWeights.ChangeValue(5, 71) = +0.99808625039358922000; - aPoles.ChangeValue(5, 71) = - gp_Pnt(-196.54607703546344000000, +0.23458111537982981000, -36.45513422497234800000); - aWeights.ChangeValue(5, 72) = +0.99809097922833689000; - aPoles.ChangeValue(5, 72) = - gp_Pnt(-199.02284030117690000000, +0.23398526561785285000, -34.35633603568415100000); - aWeights.ChangeValue(5, 73) = +0.99809984631895676000; - aPoles.ChangeValue(5, 73) = - gp_Pnt(-201.47284391020807000000, +0.23286808083306546000, -32.22700780168109700000); - aWeights.ChangeValue(5, 74) = +0.99810637147739267000; - aPoles.ChangeValue(5, 74) = - gp_Pnt(-203.92239692899503000000, +0.23204542949601353000, -30.09717639714928000000); - aWeights.ChangeValue(5, 75) = +0.99812847998973830000; - aPoles.ChangeValue(5, 75) = - gp_Pnt(-206.34684289021220000000, +0.22926391512904498000, -27.93902362306789300000); - aWeights.ChangeValue(5, 76) = +0.99809892249694432000; - aPoles.ChangeValue(5, 76) = - gp_Pnt(-208.73420674519565000000, +0.23297935369059405000, -25.73750919512989600000); - aWeights.ChangeValue(5, 77) = +0.99819234539430379000; - aPoles.ChangeValue(5, 77) = - gp_Pnt(-211.11258262007470000000, +0.22122441504945897000, -23.53328220960779800000); - aWeights.ChangeValue(5, 78) = +0.99816706733442118000; - aPoles.ChangeValue(5, 78) = - gp_Pnt(-213.44890831521380000000, +0.22441150695403267000, -21.27426418813643800000); - aWeights.ChangeValue(5, 79) = +0.99818127777024523000; - aPoles.ChangeValue(5, 79) = - gp_Pnt(-215.74298068197336000000, +0.22262736656649654000, -18.98075706196405200000); - aWeights.ChangeValue(5, 80) = +0.99819475509184485000; - aPoles.ChangeValue(5, 80) = - gp_Pnt(-218.02209738817496000000, +0.22092240555297402000, -16.66880151580776100000); - aWeights.ChangeValue(5, 81) = +0.99826376750413803000; - aPoles.ChangeValue(5, 81) = - gp_Pnt(-220.27506837008727000000, +0.21227676902692139000, -14.33587171753685400000); - aWeights.ChangeValue(6, 1) = +1.00955713824395920000; - aPoles.ChangeValue(6, 1) = - gp_Pnt(+132.82497533600920000000, -0.00000000000000355271, -68.18672206105269100000); - aWeights.ChangeValue(6, 2) = +1.00956608612165510000; - aPoles.ChangeValue(6, 2) = - gp_Pnt(+129.75720107675980000000, -0.00000000000001501048, -69.88134023490506800000); - aWeights.ChangeValue(6, 3) = +1.00957354292813720000; - aPoles.ChangeValue(6, 3) = - gp_Pnt(+126.66630562875893000000, +0.00000000000001468880, -71.53414324810810900000); - aWeights.ChangeValue(6, 4) = +1.00957948395969920000; - aPoles.ChangeValue(6, 4) = - gp_Pnt(+123.55299204973852000000, -0.00000000000002420214, -73.14476521965842400000); - aWeights.ChangeValue(6, 5) = +1.00958671248272540000; - aPoles.ChangeValue(6, 5) = - gp_Pnt(+120.41786571412476000000, +0.00000000000000774289, -74.71276629883676900000); - aWeights.ChangeValue(6, 6) = +1.00959353559449030000; - aPoles.ChangeValue(6, 6) = - gp_Pnt(+117.26165038381876000000, +0.00000000000002827238, -76.23787924846354300000); - aWeights.ChangeValue(6, 7) = +1.00959839503053540000; - aPoles.ChangeValue(6, 7) = - gp_Pnt(+114.08506189168672000000, -0.00000000000002567399, -77.71984701658058700000); - aWeights.ChangeValue(6, 8) = +1.00960405269295440000; - aPoles.ChangeValue(6, 8) = - gp_Pnt(+110.88875430250306000000, +0.00000000000001531652, -79.15824703626482500000); - aWeights.ChangeValue(6, 9) = +1.00961384794965610000; - aPoles.ChangeValue(6, 9) = - gp_Pnt(+104.45816547225203000000, +0.00000000000002372811, -81.94743615023858800000); - aWeights.ChangeValue(6, 10) = +1.00961857675613920000; - aPoles.ChangeValue(6, 10) = - gp_Pnt(+101.22387341781818000000, -0.00000000000003253030, -83.29820264563102200000); - aWeights.ChangeValue(6, 11) = +1.00962274789490230000; - aPoles.ChangeValue(6, 11) = - gp_Pnt(+97.97127406275538400000, +0.00000000000002165813, -84.60486564781918200000); - aWeights.ChangeValue(6, 12) = +1.00962679188945900000; - aPoles.ChangeValue(6, 12) = - gp_Pnt(+94.70106106239124700000, +0.00000000000003307844, -85.86712155505158300000); - aWeights.ChangeValue(6, 13) = +1.00963059350859920000; - aPoles.ChangeValue(6, 13) = - gp_Pnt(+91.41394873512904000000, -0.00000000000001002370, -87.08469757155246800000); - aWeights.ChangeValue(6, 14) = +1.00963398843787310000; - aPoles.ChangeValue(6, 14) = - gp_Pnt(+88.11065082060795800000, -0.00000000000001620026, -88.25733602781997400000); - aWeights.ChangeValue(6, 15) = +1.00963733185343440000; - aPoles.ChangeValue(6, 15) = - gp_Pnt(+84.79187377942922400000, +0.00000000000001387836, -89.38476986722990600000); - aWeights.ChangeValue(6, 16) = +1.00964648640037490000; - aPoles.ChangeValue(6, 16) = - gp_Pnt(+74.79138897281484300000, +0.00000000000001147648, -92.63077806554609600000); - aWeights.ChangeValue(6, 17) = +1.00965176794147980000; - aPoles.ChangeValue(6, 17) = - gp_Pnt(+68.06556894151637500000, +0.00000000000001348105, -94.61292925638954900000); - aWeights.ChangeValue(6, 18) = +1.00965632094816880000; - aPoles.ChangeValue(6, 18) = - gp_Pnt(+61.28620656548358900000, +0.00000000000001132208, -96.41133393799678700000); - aWeights.ChangeValue(6, 19) = +1.00966023501695920000; - aPoles.ChangeValue(6, 19) = - gp_Pnt(+54.45890525472331200000, +0.00000000000000779610, -98.02434736777235000000); - aWeights.ChangeValue(6, 20) = +1.00966358166845540000; - aPoles.ChangeValue(6, 20) = - gp_Pnt(+47.58955228763309700000, +0.00000000000000496426, -99.45056478986435900000); - aWeights.ChangeValue(6, 21) = +1.00966641434734750000; - aPoles.ChangeValue(6, 21) = - gp_Pnt(+40.68431826182812500000, +0.00000000000000415229, -100.68882169811890000000); - aWeights.ChangeValue(6, 22) = +1.00966876842241240000; - aPoles.ChangeValue(6, 22) = - gp_Pnt(+33.74965652868991100000, +0.00000000000000595055, -101.73819405254569000000); - aWeights.ChangeValue(6, 23) = +1.00967255617655690000; - aPoles.ChangeValue(6, 23) = - gp_Pnt(+19.83474481990451800000, +0.00000000000000626687, -103.45778313292877000000); - aWeights.ChangeValue(6, 24) = +1.00967399859793900000; - aPoles.ChangeValue(6, 24) = - gp_Pnt(+12.85396744583563800000, +0.00000000000000961706, -104.12796934503771000000); - aWeights.ChangeValue(6, 25) = +1.00967501382969150000; - aPoles.ChangeValue(6, 25) = - gp_Pnt(+5.85612456199985140000, +0.00000000000001451316, -104.60783896197547000000); - aWeights.ChangeValue(6, 26) = +1.00967561936958040000; - aPoles.ChangeValue(6, 26) = - gp_Pnt(-1.15266320632332260000, +0.00000000000001739414, -104.89689790453474000000); - aWeights.ChangeValue(6, 27) = +1.00967582483410530000; - aPoles.ChangeValue(6, 27) = - gp_Pnt(-8.16630892272242730000, +0.00000000000001688939, -104.99487618531697000000); - aWeights.ChangeValue(6, 28) = +1.00967563195849790000; - aPoles.ChangeValue(6, 28) = - gp_Pnt(-15.17875958769639600000, +0.00000000000001381871, -104.90172793642448000000); - aWeights.ChangeValue(6, 29) = +1.00967503459672230000; - aPoles.ChangeValue(6, 29) = - gp_Pnt(-22.18399638815323600000, +0.00000000000001119232, -104.61763141615558000000); - aWeights.ChangeValue(6, 30) = +1.00967300468446440000; - aPoles.ChangeValue(6, 30) = - gp_Pnt(-36.16808769247344200000, +0.00000000000001926896, -103.66834538209933000000); - aWeights.ChangeValue(6, 31) = +1.00967156777535520000; - aPoles.ChangeValue(6, 31) = - gp_Pnt(-43.14695215605046700000, +0.00000000000002086710, -103.00315490229345000000); - aWeights.ChangeValue(6, 32) = +1.00966969979090850000; - aPoles.ChangeValue(6, 32) = - gp_Pnt(-50.10664482445217500000, +0.00000000000002115378, -102.14781821392242000000); - aWeights.ChangeValue(6, 33) = +1.00966737970297340000; - aPoles.ChangeValue(6, 33) = - gp_Pnt(-57.04121502398449900000, +0.00000000000002158031, -101.10296070558179000000); - aWeights.ChangeValue(6, 34) = +1.00966457365849420000; - aPoles.ChangeValue(6, 34) = - gp_Pnt(-63.94474533155499800000, +0.00000000000002290082, -99.86943240681669900000); - aWeights.ChangeValue(6, 35) = +1.00966123497950670000; - aPoles.ChangeValue(6, 35) = - gp_Pnt(-70.81135197820185600000, +0.00000000000002517228, -98.44830786498150100000); - aWeights.ChangeValue(6, 36) = +1.00965730416314160000; - aPoles.ChangeValue(6, 36) = - gp_Pnt(-77.63518524225725100000, +0.00000000000002775445, -96.84088598857995600000); - aWeights.ChangeValue(6, 37) = +1.00965057624219750000; - aPoles.ChangeValue(6, 37) = - gp_Pnt(-87.55609990295042200000, +0.00000000000002423047, -94.21659328767886200000); - aWeights.ChangeValue(6, 38) = +1.00964829695753600000; - aPoles.ChangeValue(6, 38) = - gp_Pnt(-90.69129861847109500000, +0.00000000000002587407, -93.34466557470412300000); - aWeights.ChangeValue(6, 39) = +1.00964586498085130000; - aPoles.ChangeValue(6, 39) = - gp_Pnt(-93.81544408055053500000, +0.00000000000003006614, -92.43305897005754400000); - aWeights.ChangeValue(6, 40) = +1.00964327207695040000; - aPoles.ChangeValue(6, 40) = - gp_Pnt(-96.92795589621758300000, +0.00000000000003388207, -91.48193626907418300000); - aWeights.ChangeValue(6, 41) = +1.00964050782223150000; - aPoles.ChangeValue(6, 41) = - gp_Pnt(-100.02825520717420000000, +0.00000000000003564727, -90.49147079864104600000); - aWeights.ChangeValue(6, 42) = +1.00963755960468200000; - aPoles.ChangeValue(6, 42) = - gp_Pnt(-103.11576472135789000000, +0.00000000000003493709, -89.46184640324143800000); - aWeights.ChangeValue(6, 43) = +1.00963441262388120000; - aPoles.ChangeValue(6, 43) = - gp_Pnt(-106.18990874397944000000, +0.00000000000003257692, -88.39325742978746800000); - aWeights.ChangeValue(6, 44) = +1.00962747055172470000; - aPoles.ChangeValue(6, 44) = - gp_Pnt(-112.54574015681582000000, +0.00000000000006160655, -86.09336936272072200000); - aWeights.ChangeValue(6, 45) = +1.00962344856191890000; - aPoles.ChangeValue(6, 45) = - gp_Pnt(-115.82520602454126000000, -0.00000000000003931317, -84.85588414554271700000); - aWeights.ChangeValue(6, 46) = +1.00961960432502520000; - aPoles.ChangeValue(6, 46) = - gp_Pnt(-119.08778487668772000000, +0.00000000000016494845, -83.57368219250022900000); - aWeights.ChangeValue(6, 47) = +1.00961486341637220000; - aPoles.ChangeValue(6, 47) = - gp_Pnt(-122.33277704237545000000, -0.00000000000006102663, -82.24707666574315100000); - aWeights.ChangeValue(6, 48) = +1.00961029578642010000; - aPoles.ChangeValue(6, 48) = - gp_Pnt(-125.55945424028559000000, +0.00000000000005443726, -80.87630621413205700000); - aWeights.ChangeValue(6, 49) = +1.00960520453872830000; - aPoles.ChangeValue(6, 49) = - gp_Pnt(-128.76711471386264000000, +0.00000000000006731284, -79.46169679871513800000); - aWeights.ChangeValue(6, 50) = +1.00959965618806670000; - aPoles.ChangeValue(6, 50) = - gp_Pnt(-131.95505034236234000000, +0.00000000000001744703, -78.00355594499717400000); - aWeights.ChangeValue(6, 51) = +1.00958841592259230000; - aPoles.ChangeValue(6, 51) = - gp_Pnt(-138.06383173526737000000, +0.00000000000005091738, -75.10807262033468100000); - aWeights.ChangeValue(6, 52) = +1.00958190609477040000; - aPoles.ChangeValue(6, 52) = - gp_Pnt(-140.98751167669514000000, +0.00000000000001249767, -73.67671445695528100000); - aWeights.ChangeValue(6, 53) = +1.00957719226123470000; - aPoles.ChangeValue(6, 53) = - gp_Pnt(-143.89297197091258000000, +0.00000000000004304958, -72.20827197874005800000); - aWeights.ChangeValue(6, 54) = +1.00956830736954160000; - aPoles.ChangeValue(6, 54) = - gp_Pnt(-146.77976177895343000000, +0.00000000000014315600, -70.70325097869228200000); - aWeights.ChangeValue(6, 55) = +1.00956295195680430000; - aPoles.ChangeValue(6, 55) = - gp_Pnt(-149.64716302220674000000, -0.00000000000013374459, -69.16163316263994400000); - aWeights.ChangeValue(6, 56) = +1.00955425555763600000; - aPoles.ChangeValue(6, 56) = - gp_Pnt(-152.49476001470052000000, +0.00000000000014982315, -67.58397318476696100000); - aWeights.ChangeValue(6, 57) = +1.00954602613024340000; - aPoles.ChangeValue(6, 57) = - gp_Pnt(-155.32190503332637000000, -0.00000000000000021066, -65.97043121899140800000); - aWeights.ChangeValue(6, 58) = +1.00952742278739690000; - aPoles.ChangeValue(6, 58) = - gp_Pnt(-161.15007234465017000000, -0.00000000000001992904, -62.54527347940126700000); - aWeights.ChangeValue(6, 59) = +1.00951486183122910000; - aPoles.ChangeValue(6, 59) = - gp_Pnt(-164.14837014605524000000, +0.00000000000023572067, -60.72896647597298900000); - aWeights.ChangeValue(6, 60) = +1.00950821186278380000; - aPoles.ChangeValue(6, 60) = - gp_Pnt(-167.11960531963629000000, -0.00000000000028988207, -58.86870049528032900000); - aWeights.ChangeValue(6, 61) = +1.00948761363721440000; - aPoles.ChangeValue(6, 61) = - gp_Pnt(-170.06906478280905000000, +0.00000000000040689923, -56.97372124744497800000); - aWeights.ChangeValue(6, 62) = +1.00948175483910860000; - aPoles.ChangeValue(6, 62) = - gp_Pnt(-172.98765254825670000000, -0.00000000000024250881, -55.03312548926784600000); - aWeights.ChangeValue(6, 63) = +1.00946082358368820000; - aPoles.ChangeValue(6, 63) = - gp_Pnt(-175.88148729884773000000, +0.00000000000015443744, -53.05496328096450000000); - aWeights.ChangeValue(6, 64) = +1.00944596410276510000; - aPoles.ChangeValue(6, 64) = - gp_Pnt(-178.74719668858941000000, +0.00000000000002184305, -51.03719587787818300000); - aWeights.ChangeValue(6, 65) = +1.00942605045267690000; - aPoles.ChangeValue(6, 65) = - gp_Pnt(-181.58512029181043000000, +0.00000000000003863576, -48.98084041218928800000); - aWeights.ChangeValue(6, 66) = +1.00940832657292460000; - aPoles.ChangeValue(6, 66) = - gp_Pnt(-184.22041885135505000000, +0.00000000000012642202, -47.07128183802177500000); - aWeights.ChangeValue(6, 67) = +1.00938358350016230000; - aPoles.ChangeValue(6, 67) = - gp_Pnt(-186.83172267077580000000, -0.00000000000026075896, -45.12863792869809700000); - aWeights.ChangeValue(6, 68) = +1.00937745534316470000; - aPoles.ChangeValue(6, 68) = - gp_Pnt(-189.41814135962036000000, +0.00000000000050815389, -43.15221363464823400000); - aWeights.ChangeValue(6, 69) = +1.00932110415609880000; - aPoles.ChangeValue(6, 69) = - gp_Pnt(-191.98049421722968000000, -0.00000000000036869153, -41.14519558079494000000); - aWeights.ChangeValue(6, 70) = +1.00934018958992230000; - aPoles.ChangeValue(6, 70) = - gp_Pnt(-194.51554398045388000000, +0.00000000000024701945, -39.10283303403318900000); - aWeights.ChangeValue(6, 71) = +1.00926513417534820000; - aPoles.ChangeValue(6, 71) = - gp_Pnt(-197.02654362639632000000, +0.00000000000002378284, -37.03182458375535900000); - aWeights.ChangeValue(6, 72) = +1.00924284324015100000; - aPoles.ChangeValue(6, 72) = - gp_Pnt(-199.50902604112426000000, +0.00000000000001468063, -34.92696457232537500000); - aWeights.ChangeValue(6, 73) = +1.00920104311988210000; - aPoles.ChangeValue(6, 73) = - gp_Pnt(-201.96417476016930000000, +0.00000000000004485301, -32.79087292323346500000); - aWeights.ChangeValue(6, 74) = +1.00917029694376930000; - aPoles.ChangeValue(6, 74) = - gp_Pnt(-204.41947086956830000000, +0.00000000000007013856, -30.65436716589900700000); - aWeights.ChangeValue(6, 75) = +1.00906597799622610000; - aPoles.ChangeValue(6, 75) = - gp_Pnt(-206.84718146821811000000, -0.00000000000006381675, -28.48746943619916600000); - aWeights.ChangeValue(6, 76) = +1.00920552993238920000; - aPoles.ChangeValue(6, 76) = - gp_Pnt(-209.24487385523256000000, +0.00000000000020688933, -26.28443183778934900000); - aWeights.ChangeValue(6, 77) = +1.00876475817276390000; - aPoles.ChangeValue(6, 77) = - gp_Pnt(-211.61934752962611000000, -0.00000000000012087895, -24.05869960942788700000); - aWeights.ChangeValue(6, 78) = +1.00888387250480620000; - aPoles.ChangeValue(6, 78) = - gp_Pnt(-213.96155431166437000000, +0.00000000000019025578, -21.80066237623914200000); - aWeights.ChangeValue(6, 79) = +1.00881670070678450000; - aPoles.ChangeValue(6, 79) = - gp_Pnt(-216.26151615033589000000, -0.00000000000009572292, -19.49741392382435400000); - aWeights.ChangeValue(6, 80) = +1.00875338528797620000; - aPoles.ChangeValue(6, 80) = - gp_Pnt(-218.54531424806936000000, +0.00000000000008182630, -17.17704407009146500000); - aWeights.ChangeValue(6, 81) = +1.00842683370719580000; - aPoles.ChangeValue(6, 81) = - gp_Pnt(-220.79435406720884000000, +0.00000000000004973799, -14.82789528118522200000); - aWeights.ChangeValue(7, 1) = +1.02986327036737910000; - aPoles.ChangeValue(7, 1) = - gp_Pnt(+133.20307692191452000000, -0.00000000000000177636, -68.87095947031473000000); - aWeights.ChangeValue(7, 2) = +1.02989244478762340000; - aPoles.ChangeValue(7, 2) = - gp_Pnt(+130.12738123407763000000, -0.00000000000000516390, -70.57040146390383500000); - aWeights.ChangeValue(7, 3) = +1.02991676091110000000; - aPoles.ChangeValue(7, 3) = - gp_Pnt(+127.02840986317391000000, +0.00000000000000554535, -72.22789464235242500000); - aWeights.ChangeValue(7, 4) = +1.02993613450137910000; - aPoles.ChangeValue(7, 4) = - gp_Pnt(+123.90694758506712000000, -0.00000000000000702621, -73.84302715009133100000); - aWeights.ChangeValue(7, 5) = +1.02995970896171030000; - aPoles.ChangeValue(7, 5) = - gp_Pnt(+120.76360256847768000000, -0.00000000000000047370, -75.41549467632542300000); - aWeights.ChangeValue(7, 6) = +1.02998196300924330000; - aPoles.ChangeValue(7, 6) = - gp_Pnt(+117.59908279457284000000, +0.00000000000000772901, -76.94495426059752700000); - aWeights.ChangeValue(7, 7) = +1.02999781361776170000; - aPoles.ChangeValue(7, 7) = - gp_Pnt(+114.41407453952652000000, -0.00000000000000327310, -78.43108601253017300000); - aWeights.ChangeValue(7, 8) = +1.03001626830282000000; - aPoles.ChangeValue(7, 8) = - gp_Pnt(+111.20931631680004000000, +0.00000000000000421483, -79.87356087705671800000); - aWeights.ChangeValue(7, 9) = +1.03004822145821140000; - aPoles.ChangeValue(7, 9) = - gp_Pnt(+104.76172782897289000000, +0.00000000000000259283, -82.67059011797552200000); - aWeights.ChangeValue(7, 10) = +1.03006364818919470000; - aPoles.ChangeValue(7, 10) = - gp_Pnt(+101.51889932580750000000, +0.00000000000000793496, -84.02514647707548100000); - aWeights.ChangeValue(7, 11) = +1.03007725635610380000; - aPoles.ChangeValue(7, 11) = - gp_Pnt(+98.25768758130365700000, +0.00000000000000127608, -85.33546669488836800000); - aWeights.ChangeValue(7, 12) = +1.03009045031501540000; - aPoles.ChangeValue(7, 12) = - gp_Pnt(+94.97880175952953200000, +0.00000000000000289709, -86.60126064632369500000); - aWeights.ChangeValue(7, 13) = +1.03010285398165520000; - aPoles.ChangeValue(7, 13) = - gp_Pnt(+91.68295682468645700000, +0.00000000000000548904, -87.82224920548925700000); - aWeights.ChangeValue(7, 14) = +1.03011393120368040000; - aPoles.ChangeValue(7, 14) = - gp_Pnt(+88.37086140882031800000, -0.00000000000000004450, -88.99816853898946100000); - aWeights.ChangeValue(7, 15) = +1.03012484065781210000; - aPoles.ChangeValue(7, 15) = - gp_Pnt(+85.04324466385365600000, +0.00000000000000407116, -90.12875955698966400000); - aWeights.ChangeValue(7, 16) = +1.03015471267321310000; - aPoles.ChangeValue(7, 16) = - gp_Pnt(+75.01621211174902700000, +0.00000000000001208092, -93.38380423550353300000); - aWeights.ChangeValue(7, 17) = +1.03017194800922480000; - aPoles.ChangeValue(7, 17) = - gp_Pnt(+68.27251352067813200000, +0.00000000000001147779, -95.37146758037383200000); - aWeights.ChangeValue(7, 18) = +1.03018680682765580000; - aPoles.ChangeValue(7, 18) = - gp_Pnt(+61.47507566136914600000, +0.00000000000000851456, -97.17487791831784700000); - aWeights.ChangeValue(7, 19) = +1.03019958109549560000; - aPoles.ChangeValue(7, 19) = - gp_Pnt(+54.62953031922813800000, +0.00000000000000645560, -98.79238303220959900000); - aWeights.ChangeValue(7, 20) = +1.03021050389503310000; - aPoles.ChangeValue(7, 20) = - gp_Pnt(+47.74179355100338300000, +0.00000000000000683493, -100.22257163394704000000); - aWeights.ChangeValue(7, 21) = +1.03021974942385920000; - aPoles.ChangeValue(7, 21) = - gp_Pnt(+40.81806392732334400000, +0.00000000000000945638, -101.46427420633951000000); - aWeights.ChangeValue(7, 22) = +1.03022743299486530000; - aPoles.ChangeValue(7, 22) = - gp_Pnt(+33.86482072309787100000, +0.00000000000001239365, -102.51656369616552000000); - aWeights.ChangeValue(7, 23) = +1.03023979631718960000; - aPoles.ChangeValue(7, 23) = - gp_Pnt(+19.91267581058432200000, +0.00000000000001269021, -104.24092170462040000000); - aWeights.ChangeValue(7, 24) = +1.03024450452679180000; - aPoles.ChangeValue(7, 24) = - gp_Pnt(+12.91322103073442500000, +0.00000000000001310657, -104.91296575233191000000); - aWeights.ChangeValue(7, 25) = +1.03024781840890150000; - aPoles.ChangeValue(7, 25) = - gp_Pnt(+5.89663552968925500000, +0.00000000000001362222, -105.39416639705574000000); - aWeights.ChangeValue(7, 26) = +1.03024979501191980000; - aPoles.ChangeValue(7, 26) = - gp_Pnt(-1.13093554742009240000, +0.00000000000001442955, -105.68402704533355000000); - aWeights.ChangeValue(7, 27) = +1.03025046568879810000; - aPoles.ChangeValue(7, 27) = - gp_Pnt(-8.16338049757019310000, +0.00000000000001553070, -105.78227646648484000000); - aWeights.ChangeValue(7, 28) = +1.03024983609703620000; - aPoles.ChangeValue(7, 28) = - gp_Pnt(-15.19462185431612500000, +0.00000000000001673746, -105.68886888131540000000); - aWeights.ChangeValue(7, 29) = +1.03024788619868390000; - aPoles.ChangeValue(7, 29) = - gp_Pnt(-22.21861718693262200000, +0.00000000000001767135, -105.40398398356824000000); - aWeights.ChangeValue(7, 30) = +1.03024126030624560000; - aPoles.ChangeValue(7, 30) = - gp_Pnt(-36.24014829916134100000, +0.00000000000002019891, -104.45206611492652000000); - aWeights.ChangeValue(7, 31) = +1.03023657011944200000; - aPoles.ChangeValue(7, 31) = - gp_Pnt(-43.23771519136024500000, +0.00000000000002161068, -103.78502949380328000000); - aWeights.ChangeValue(7, 32) = +1.03023047292900840000; - aPoles.ChangeValue(7, 32) = - gp_Pnt(-50.21605719916001900000, +0.00000000000002249329, -102.92731708926736000000); - aWeights.ChangeValue(7, 33) = +1.03022290017099440000; - aPoles.ChangeValue(7, 33) = - gp_Pnt(-57.16920057960702200000, +0.00000000000002320995, -101.87955571848956000000); - aWeights.ChangeValue(7, 34) = +1.03021374148842140000; - aPoles.ChangeValue(7, 34) = - gp_Pnt(-64.09120253994868200000, +0.00000000000002399266, -100.64259867222304000000); - aWeights.ChangeValue(7, 35) = +1.03020284473128120000; - aPoles.ChangeValue(7, 35) = - gp_Pnt(-70.97615252947152000000, +0.00000000000002494226, -99.21752532044712300000); - aWeights.ChangeValue(7, 36) = +1.03019001595653670000; - aPoles.ChangeValue(7, 36) = - gp_Pnt(-77.81817349811507300000, +0.00000000000002602838, -97.60564061068184600000); - aWeights.ChangeValue(7, 37) = +1.03016805964614980000; - aPoles.ChangeValue(7, 37) = - gp_Pnt(-87.76549855749630100000, +0.00000000000002703745, -94.97405836608523100000); - aWeights.ChangeValue(7, 38) = +1.03016062145972500000; - aPoles.ChangeValue(7, 38) = - gp_Pnt(-90.90906843451735100000, +0.00000000000002735353, -94.09969925934423400000); - aWeights.ChangeValue(7, 39) = +1.03015268516758060000; - aPoles.ChangeValue(7, 39) = - gp_Pnt(-94.04154842308000200000, +0.00000000000002795160, -93.18554984223239000000); - aWeights.ChangeValue(7, 40) = +1.03014422393874510000; - aPoles.ChangeValue(7, 40) = - gp_Pnt(-97.16235536263198500000, +0.00000000000002873660, -92.23177350871787900000); - aWeights.ChangeValue(7, 41) = +1.03013520381253840000; - aPoles.ChangeValue(7, 41) = - gp_Pnt(-100.27090735629974000000, +0.00000000000002960449, -91.23854430518403500000); - aWeights.ChangeValue(7, 42) = +1.03012558369857450000; - aPoles.ChangeValue(7, 42) = - gp_Pnt(-103.36662387191370000000, +0.00000000000003044224, -90.20604688574815100000); - aWeights.ChangeValue(7, 43) = +1.03011531537676040000; - aPoles.ChangeValue(7, 43) = - gp_Pnt(-106.44892584135401000000, +0.00000000000003112785, -89.13447646370049400000); - aWeights.ChangeValue(7, 44) = +1.03009266486582220000; - aPoles.ChangeValue(7, 44) = - gp_Pnt(-112.82164316087234000000, +0.00000000000002877514, -86.82815610446842000000); - aWeights.ChangeValue(7, 45) = +1.03007954250937140000; - aPoles.ChangeValue(7, 45) = - gp_Pnt(-116.10982863064515000000, +0.00000000000005217709, -85.58719260568324200000); - aWeights.ChangeValue(7, 46) = +1.03006700046765860000; - aPoles.ChangeValue(7, 46) = - gp_Pnt(-119.38108228759732000000, -0.00000000000000364635, -84.30140001571530200000); - aWeights.ChangeValue(7, 47) = +1.03005153385603830000; - aPoles.ChangeValue(7, 47) = - gp_Pnt(-122.63466837574235000000, +0.00000000000007773224, -82.97105629274108200000); - aWeights.ChangeValue(7, 48) = +1.03003663316235050000; - aPoles.ChangeValue(7, 48) = - gp_Pnt(-125.86988610286646000000, +0.00000000000000501775, -81.59643931580511400000); - aWeights.ChangeValue(7, 49) = +1.03002002524069390000; - aPoles.ChangeValue(7, 49) = - gp_Pnt(-129.08600965998806000000, +0.00000000000004872530, -80.17785297868806500000); - aWeights.ChangeValue(7, 50) = +1.03000192732158440000; - aPoles.ChangeValue(7, 50) = - gp_Pnt(-132.28232849510800000000, +0.00000000000003627431, -78.71561001568775900000); - aWeights.ChangeValue(7, 51) = +1.02996526567106140000; - aPoles.ChangeValue(7, 51) = - gp_Pnt(-138.40719443250111000000, +0.00000000000004030865, -75.81195871455292900000); - aWeights.ChangeValue(7, 52) = +1.02994403451619650000; - aPoles.ChangeValue(7, 52) = - gp_Pnt(-141.33856968181306000000, +0.00000000000003444592, -74.37651555974527200000); - aWeights.ChangeValue(7, 53) = +1.02992866105480000000; - aPoles.ChangeValue(7, 53) = - gp_Pnt(-144.25171811139330000000, +0.00000000000003429445, -72.90395453557894700000); - aWeights.ChangeValue(7, 54) = +1.02989968743351530000; - aPoles.ChangeValue(7, 54) = - gp_Pnt(-147.14603336223070000000, +0.00000000000004355038, -71.39457006641885100000); - aWeights.ChangeValue(7, 55) = +1.02988222474475720000; - aPoles.ChangeValue(7, 55) = - gp_Pnt(-150.02095857157173000000, +0.00000000000003217269, -69.84863841933133700000); - aWeights.ChangeValue(7, 56) = +1.02985386954430420000; - aPoles.ChangeValue(7, 56) = - gp_Pnt(-152.87595706513403000000, +0.00000000000003648661, -68.26644064265008200000); - aWeights.ChangeValue(7, 57) = +1.02982704006085530000; - aPoles.ChangeValue(7, 57) = - gp_Pnt(-155.71041601974636000000, +0.00000000000003591181, -66.64830754728993200000); - aWeights.ChangeValue(7, 58) = +1.02976639514271140000; - aPoles.ChangeValue(7, 58) = - gp_Pnt(-161.55369960091491000000, +0.00000000000003646415, -63.21332070345936700000); - aWeights.ChangeValue(7, 59) = +1.02972545417744080000; - aPoles.ChangeValue(7, 59) = - gp_Pnt(-164.55974256681068000000, +0.00000000000003294676, -61.39167299907511900000); - aWeights.ChangeValue(7, 60) = +1.02970377642180270000; - aPoles.ChangeValue(7, 60) = - gp_Pnt(-167.53873683551103000000, +0.00000000000002190344, -59.52621075357659900000); - aWeights.ChangeValue(7, 61) = +1.02963665582099750000; - aPoles.ChangeValue(7, 61) = - gp_Pnt(-170.49570646978711000000, +0.00000000000009010479, -57.62531748377598000000); - aWeights.ChangeValue(7, 62) = +1.02961756328110620000; - aPoles.ChangeValue(7, 62) = - gp_Pnt(-173.42176702363508000000, -0.00000000000003499440, -55.67944052993496500000); - aWeights.ChangeValue(7, 63) = +1.02954937293567860000; - aPoles.ChangeValue(7, 63) = - gp_Pnt(-176.32284460610933000000, +0.00000000000007636921, -53.69521656711459900000); - aWeights.ChangeValue(7, 64) = +1.02950097342681770000; - aPoles.ChangeValue(7, 64) = - gp_Pnt(-179.19569709355173000000, +0.00000000000003273955, -51.67161593723249500000); - aWeights.ChangeValue(7, 65) = +1.02943612532291810000; - aPoles.ChangeValue(7, 65) = - gp_Pnt(-182.04053139917158000000, +0.00000000000003996803, -49.60917258111981500000); - aWeights.ChangeValue(7, 66) = +1.02937840445762090000; - aPoles.ChangeValue(7, 66) = - gp_Pnt(-184.68250151172640000000, +0.00000000000004112926, -47.69381589112448700000); - aWeights.ChangeValue(7, 67) = +1.02929786839945800000; - aPoles.ChangeValue(7, 67) = - gp_Pnt(-187.30004443981446000000, +0.00000000000003629801, -45.74517623046489900000); - aWeights.ChangeValue(7, 68) = +1.02927785532615720000; - aPoles.ChangeValue(7, 68) = - gp_Pnt(-189.89358418563035000000, +0.00000000000003708012, -43.76295173174737800000); - aWeights.ChangeValue(7, 69) = +1.02909457173661250000; - aPoles.ChangeValue(7, 69) = - gp_Pnt(-192.46070903458983000000, +0.00000000000005500515, -41.74904085552218200000); - aWeights.ChangeValue(7, 70) = +1.02915656102268340000; - aPoles.ChangeValue(7, 70) = - gp_Pnt(-195.00353322314638000000, +0.00000000000002645256, -39.70148425813464900000); - aWeights.ChangeValue(7, 71) = +1.02891246604057510000; - aPoles.ChangeValue(7, 71) = - gp_Pnt(-197.51895024482548000000, +0.00000000000005006422, -37.62251287581096900000); - aWeights.ChangeValue(7, 72) = +1.02884001996279940000; - aPoles.ChangeValue(7, 72) = - gp_Pnt(-200.00717902020989000000, +0.00000000000003866246, -35.51147139839754600000); - aWeights.ChangeValue(7, 73) = +1.02870418206103280000; - aPoles.ChangeValue(7, 73) = - gp_Pnt(-202.46745722827831000000, +0.00000000000003996803, -33.36845405838467800000); - aWeights.ChangeValue(7, 74) = +1.02860417892808040000; - aPoles.ChangeValue(7, 74) = - gp_Pnt(-204.92874075079348000000, +0.00000000000003952569, -31.22492832365916000000); - aWeights.ChangeValue(7, 75) = +1.02826579045574770000; - aPoles.ChangeValue(7, 75) = - gp_Pnt(-207.35951843182116000000, +0.00000000000002864861, -29.04902036970887700000); - aWeights.ChangeValue(7, 76) = +1.02871793966685040000; - aPoles.ChangeValue(7, 76) = - gp_Pnt(-209.76815931164757000000, +0.00000000000007786791, -26.84449461829588300000); - aWeights.ChangeValue(7, 77) = +1.02728787827248790000; - aPoles.ChangeValue(7, 77) = - gp_Pnt(-212.13952611955784000000, -0.00000000000002645359, -24.59453985262025100000); - aWeights.ChangeValue(7, 78) = +1.02767535385751650000; - aPoles.ChangeValue(7, 78) = - gp_Pnt(-214.48523983715771000000, +0.00000000000011316462, -22.34028621398329100000); - aWeights.ChangeValue(7, 79) = +1.02745809923196680000; - aPoles.ChangeValue(7, 79) = - gp_Pnt(-216.79261871005519000000, -0.00000000000002978790, -20.02558452892611700000); - aWeights.ChangeValue(7, 80) = +1.02725110106353260000; - aPoles.ChangeValue(7, 80) = - gp_Pnt(-219.08116944862113000000, +0.00000000000005732296, -17.69632354506026700000); - aWeights.ChangeValue(7, 81) = +1.02619749797986360000; - aPoles.ChangeValue(7, 81) = - gp_Pnt(-221.32510969435936000000, +0.00000000000004618528, -15.33078661161192400000); - } - //// - - const occ::handle aS1 = - new Geom_BSplineSurface(aPoles, aWeights, aUKnots, aVKnots, aUMult, aVMult, aUDegree, aVDegree); - - char buff[1024]; - - Sprintf(buff, "%s_1", theArgVal[1]); - DrawTrSurf::Set(buff, aS1); - theDI << buff << " "; - - Sprintf(buff, "%s_2", theArgVal[1]); - DrawTrSurf::Set(buff, aS2); - theDI << buff << "\n"; - - return 0; -} - //======================================================================= // function : OCC27021 // purpose : Tests performance of obtaining geometry (points) via topological @@ -2133,262 +342,6 @@ static int OCC27466(Draw_Interpretor& theDI, int theNArg, const char** theArgVal return 0; } -#include -#include -#include -#include - -namespace Parab2d_Bug26747 -{ -// Directrix and X-axe direction -gp_Ax2d Axes; - -// Focus -gp_Pnt2d FocusPoint; - -// Focal length -double FocalLength; - -// Coordinates of the vertex -double VertX, VertY; - -// Parameter -double Parameter; - -// Coefficients -double Coeffs[6]; -} // namespace Parab2d_Bug26747 - -//======================================================================== -// function : OCC26747_CheckParabola -// purpose : Checks if created parabola is correct -//======================================================================== -static void OCC26747_CheckParabola(Draw_Interpretor& theDI, - const char* theName, - const bool theSense = true) -{ - const double aCompareTol = 1.0e-12; - - // Directrix, Focus - GC_MakeParabola2d aPrb(Parab2d_Bug26747::Axes, Parab2d_Bug26747::FocusPoint, theSense); - - DrawTrSurf::Set(theName, aPrb.Value()); - - gp_Pnt2d aVert(aPrb.Value()->Parab2d().Location()); - - theDI << "Focal Length: " << aPrb.Value()->Parab2d().Focal() << "\n"; - theDI << "Vertex (" << aVert.X() << ", " << aVert.Y() << ")\n"; - theDI << "Parameter = " << aPrb.Value()->Parab2d().Parameter() << "\n"; - - double aF[6] = {RealLast(), RealLast(), RealLast(), RealLast(), RealLast(), RealLast()}; - aPrb.Value()->Parab2d().Coefficients(aF[0], aF[1], aF[2], aF[3], aF[4], aF[5]); - theDI << "A = " << aF[0] << ", B = " << aF[1] << ", C = " << aF[2] << ", D = " << aF[3] - << ", E = " << aF[4] << ", F = " << aF[5] << "\n"; - - if (std::abs(aPrb.Value()->Parab2d().Focal() - Parab2d_Bug26747::FocalLength) > aCompareTol) - theDI << "Error in focal length computation!\n"; - - if ((std::abs(aVert.X() - Parab2d_Bug26747::VertX) > aCompareTol) - || (std::abs(aVert.Y() - Parab2d_Bug26747::VertY) > aCompareTol)) - theDI << "Error in vertex computation!\n"; - - if (std::abs(aPrb.Value()->Parab2d().Parameter() - Parab2d_Bug26747::Parameter) > aCompareTol) - theDI << "Error in parameter computation!\n"; - - for (int i = 0; i < 6; i++) - { - if (std::abs(aF[i] - Parab2d_Bug26747::Coeffs[i]) > aCompareTol) - { - theDI << "Error in " << i << "-th coefficient computation!\n"; - } - } -} - -//======================================================================== -// function : OCC26747_1 -// purpose : Creates a 2D-parabola for testing -//======================================================================== -static int OCC26747_1(Draw_Interpretor& theDI, int theNArg, const char** theArgVal) -{ - if (theNArg < 2) - { - theDI << "Use: OCC26747_1 result\n"; - return 1; - } - - // Expected parabola: - - // ^ Y - // | - // | - // | - // | - // | o - // | A o F - // | o x - // | o - // | o - // | - // ---------------------------> X - - // where - // Y-axe is the directrix of the parabola, - // A(0.5, 3.0) is a Vertex of the parabola, - // F(1.0, 3.0) is the focus of the parabola, - // Focal length is 0.5, - // Parameter of the parabola is 1. - // Equation: (y-3)^2=2*p*(x-0.5), i.e. (y-3)^2=2*(x-0.5) - // A * X^2 + B * Y^2 + 2*C*X*Y + 2*D*X + 2*E*Y + F = 0. - // OR - // 0 * X^2 + 1 * Y^2 + 2*0*X*Y + 2*(-1)*X + 2*(-3)*Y + 10 = 0. - - Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 3.0), gp_Dir2d(gp_Dir2d::D::Y)); - Parab2d_Bug26747::FocusPoint.SetCoord(1.0, 3.0); - - Parab2d_Bug26747::FocalLength = 0.5; - - Parab2d_Bug26747::VertX = 0.5; - Parab2d_Bug26747::VertY = 3.0; - - Parab2d_Bug26747::Parameter = 1.0; - - Parab2d_Bug26747::Coeffs[0] = 0.0; - Parab2d_Bug26747::Coeffs[1] = 1.0; - Parab2d_Bug26747::Coeffs[2] = 0.0; - Parab2d_Bug26747::Coeffs[3] = -1.0; - Parab2d_Bug26747::Coeffs[4] = -3.0; - Parab2d_Bug26747::Coeffs[5] = 10.0; - - OCC26747_CheckParabola(theDI, theArgVal[1]); - - return 0; -} - -//======================================================================= -// function : OCC26747_2 -// purpose : Creates a 2D-parabola for testing -//======================================================================= -static int OCC26747_2(Draw_Interpretor& theDI, int theNArg, const char** theArgVal) -{ - if (theNArg < 2) - { - theDI << "Use: OCC26747_2 result\n"; - return 1; - } - - // Expected parabola: - - // ^ Y - // | - // o | - // o | - // F x o A | - // o | - // o | - // | - // <------------------------ - // X - - // where (in UCS - User Coordinate System, - which - // is shown in the picture): - // Y-axe is the directrix of the parabola, - // A(0.5, 3.0) is a Vertex of the parabola, - // F(1.0, 3.0) is the focus of the parabola. - // - // In WCS (World Coordinate System) these points have coordinates: - // A(-0.5, 3.0), F(-1.0, 3.0). - // - // Focal length is 0.5, - // Parameter of the parabola is 1. - // Equation (in WCS): (y-3)^2=2*p*(-x-0.5), i.e. (y-3)^2=2*(-x-0.5) - // A * X^2 + B * (Y^2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0. - // 0 * X^2 + 1 * (Y^2) + 2*0*(X*Y) + 2*1*X + 2*(-3)*Y + 10 = 0. - - Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(gp_Dir2d::D::Y)); - Parab2d_Bug26747::FocusPoint.SetCoord(-1.0, 3.0); - - Parab2d_Bug26747::FocalLength = 0.5; - - Parab2d_Bug26747::VertX = -0.5; - Parab2d_Bug26747::VertY = 3.0; - - Parab2d_Bug26747::Parameter = 1.0; - - Parab2d_Bug26747::Coeffs[0] = 0.0; - Parab2d_Bug26747::Coeffs[1] = 1.0; - Parab2d_Bug26747::Coeffs[2] = 0.0; - Parab2d_Bug26747::Coeffs[3] = 1.0; - Parab2d_Bug26747::Coeffs[4] = -3.0; - Parab2d_Bug26747::Coeffs[5] = 10.0; - - OCC26747_CheckParabola(theDI, theArgVal[1], false); - - return 0; -} - -//======================================================================= -// function : OCC26747_3 -// purpose : Creates a 2D-parabola for testing -//======================================================================= -static int OCC26747_3(Draw_Interpretor& theDI, int theNArg, const char** theArgVal) -{ - if (theNArg < 2) - { - theDI << "Use: OCC26747_2 result\n"; - return 1; - } - - // Expected parabola: - - // ^ Y - // | - // o | - // o | - // F x o A - // o | - // o | - // | - // <------------------ - // X - - // where (in UCS - User Coordinate System, - which - // is shown in the picture): - // Y-axe is the directrix of the parabola, - // A(0.0, 3.0) is a Vertex of the parabola, - // F(0.0, 3.0) is the focus of the parabola (the Focus - // matches with the Apex). - // - // In WCS (World Coordinate System) these points have coordinates: - // A(0.0, 3.0), F(0.0, 3.0). - // - // Focal length is 0.0, - // Parameter of the parabola is 0.0. - // Equation (in WCS): (y-3)^2=2*p*(-x-0.0), i.e. (y-3)^2=0 (looks like a line y=3) - // A * X^2 + B * (Y^2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0. - // 0 * X^2 + 1 * (Y^2) + 2*0*(X*Y) + 2*0*X + 2*(-3)*Y + 9 = 0. - - Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(gp_Dir2d::D::Y)); - Parab2d_Bug26747::FocusPoint.SetCoord(0.0, 3.0); - - Parab2d_Bug26747::FocalLength = 0.0; - - Parab2d_Bug26747::VertX = 0.0; - Parab2d_Bug26747::VertY = 3.0; - - Parab2d_Bug26747::Parameter = 0.0; - - Parab2d_Bug26747::Coeffs[0] = 0.0; - Parab2d_Bug26747::Coeffs[1] = 1.0; - Parab2d_Bug26747::Coeffs[2] = 0.0; - Parab2d_Bug26747::Coeffs[3] = 0.0; - Parab2d_Bug26747::Coeffs[4] = -3.0; - Parab2d_Bug26747::Coeffs[5] = 9.0; - - OCC26747_CheckParabola(theDI, theArgVal[1], false); - - return 0; -} - #include "Geom2d_BezierCurve.hxx" #include "Geom2dGcc_QualifiedCurve.hxx" #include "Geom2dAdaptor_Curve.hxx" @@ -2441,31 +394,6 @@ static int OCC26270(Draw_Interpretor& theDI, int theNArg, const char** theArgVal return 0; } -#include - -static int OCC27875(Draw_Interpretor& theDI, int theNArg, const char** theArgVal) -{ - if (theNArg < 2) - { - theDI << "Use: OCC27875 curve\n"; - } - - NCollection_Sequence> aNC(new NCollection_IncAllocator()); - - const occ::handle aC = occ::down_cast(DrawTrSurf::Get(theArgVal[1])); - - aNC.Append(aC); - - GeomFill_NSections aNS(aNC); - - if (aNS.BSplineSurface().IsNull()) - { - theDI << "GeomFill_NSections is not done.\n"; - } - - return 0; -} - #include #include #include @@ -2710,58 +638,6 @@ static int OCC28389(Draw_Interpretor& di, int argc, const char** argv) return 0; } -#include -#include -#include -#include -#include - -static int OCC28594(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc != 3) - { - di << "Usage :" << argv[0] << " curve_with_scale curve_without_scale\n"; - return 0; - } - occ::handle> points_2d = new NCollection_HArray1(1, 6); - (*points_2d)(1) = gp_Pnt2d(-30.4, 8); - (*points_2d)(2) = gp_Pnt2d(-16.689912, 17.498217); - (*points_2d)(3) = gp_Pnt2d(-23.803064, 24.748543); - (*points_2d)(4) = gp_Pnt2d(-16.907466, 32.919615); - (*points_2d)(5) = gp_Pnt2d(-8.543829, 26.549421); - (*points_2d)(6) = gp_Pnt2d(0, 39.200000); - - NCollection_Array1 tangent_2d(1, 6); - (tangent_2d)(1) = gp_Vec2d(0.3, 0.4); - (tangent_2d)(2) = gp_Vec2d(0, 0); - (tangent_2d)(3) = gp_Vec2d(0, 0); - (tangent_2d)(4) = gp_Vec2d(0, 0); - (tangent_2d)(5) = gp_Vec2d(0, 0); - (tangent_2d)(6) = gp_Vec2d(1, 0); - - occ::handle> tangent_flags = new NCollection_HArray1(1, 6); - (*tangent_flags)(1) = true; - (*tangent_flags)(2) = false; - (*tangent_flags)(3) = false; - (*tangent_flags)(4) = false; - (*tangent_flags)(5) = false; - (*tangent_flags)(6) = true; - - Geom2dAPI_Interpolate interp_2d_with_scale(points_2d, false, Precision::Confusion()); - interp_2d_with_scale.Load(tangent_2d, tangent_flags); - interp_2d_with_scale.Perform(); - occ::handle curve_2d_with_scale = interp_2d_with_scale.Curve(); - - Geom2dAPI_Interpolate interp_2d_without_scale(points_2d, false, Precision::Confusion()); - interp_2d_without_scale.Load(tangent_2d, tangent_flags, false); - interp_2d_without_scale.Perform(); - occ::handle curve_2d_without_scale = interp_2d_without_scale.Curve(); - - DrawTrSurf::Set(argv[1], curve_2d_with_scale); - DrawTrSurf::Set(argv[2], curve_2d_without_scale); - return 0; -} - static int OCC28784(Draw_Interpretor&, int argc, const char** argv) { if (argc < 3) @@ -2795,210 +671,8 @@ static int OCC28829(Draw_Interpretor&, int, const char**) return 0; } -#include -#include -#include -#include - -#ifdef max - #undef max -#endif - -static int OCC28131(Draw_Interpretor&, int theNbArgs, const char** theArgVec) -{ - if (theNbArgs != 2) - { - std::cerr << "Error: wrong number of arguments" << std::endl; - return 1; - } - - double height = 8.5; - gp_Pnt JiZhunXian2_v0 = gp_Pnt(-17.6, 0.0, 0.0); - gp_Pnt JiZhunXian2_v1 = gp_Pnt(0, 32.8, 0.0); - - // Outline - NCollection_Array1 outer_e_bzr_geom_v(1, 4); - { - outer_e_bzr_geom_v(1) = JiZhunXian2_v0; - outer_e_bzr_geom_v(4) = JiZhunXian2_v1; - - double ratio1 = 5.4 / 13.2; - outer_e_bzr_geom_v(2) = - gp_Pnt(outer_e_bzr_geom_v(1).X(), ratio1 * outer_e_bzr_geom_v(4).Y(), 0); - double ratio2 = 6.0 / 6.8; - outer_e_bzr_geom_v(3) = - gp_Pnt(ratio2 * outer_e_bzr_geom_v(1).X(), outer_e_bzr_geom_v(4).Y(), 0); - } - - occ::handle outer_e_bzr_geom = new Geom_BezierCurve(outer_e_bzr_geom_v); - occ::handle outer_e_bsp_geom = - GeomConvert::CurveToBSplineCurve(outer_e_bzr_geom); - TopoDS_Edge outer_e = BRepBuilderAPI_MakeEdge(outer_e_bsp_geom); - - occ::handle curve1; - { - occ::handle> harray = - new NCollection_HArray1(1, 2); // sizing harray - harray->SetValue(1, gp_Pnt2d(-JiZhunXian2_v1.Y(), 0)); - harray->SetValue(2, gp_Pnt2d(0, height + height / 2)); - - Geom2dAPI_Interpolate anInterpolation(harray, false, 1e-6); - - gp_Vec2d vtangent1(0, 1); - gp_Vec2d vtangent2(1, 0); - anInterpolation.Load(vtangent1, vtangent2); - anInterpolation.Perform(); - - occ::handle c = anInterpolation.Curve(); - - gp_Pln pln{gp_Ax3(gp_Pnt(), gp_Dir(gp_Dir::D::X), gp_Dir(gp_Dir::D::NY))}; - - occ::handle c3d = occ::down_cast(GeomAPI::To3d(c, pln)); - curve1 = c3d; - } - - occ::handle curve2; - { - occ::handle> harray = - new NCollection_HArray1(1, 3); // sizing harray - harray->SetValue(1, gp_Pnt2d(-JiZhunXian2_v0.X(), 0)); - harray->SetValue(2, gp_Pnt2d(-JiZhunXian2_v0.X() - 2.6, height)); - harray->SetValue(3, gp_Pnt2d(0, height + height / 2)); - - Geom2dAPI_Interpolate anInterpolation(harray, false, 1e-6); - anInterpolation.Perform(); - - occ::handle c = anInterpolation.Curve(); - gp_Pln pln{gp_Ax3(gp_Pnt(), gp_Dir(gp_Dir::D::NY), gp_Dir(gp_Dir::D::NX))}; - occ::handle c3d = occ::down_cast(GeomAPI::To3d(c, pln)); - curve2 = c3d; - } - - ////////////////////////////////////// - GeomFill_BSplineCurves fill2; - fill2.Init(outer_e_bsp_geom, curve1, curve2, GeomFill_CoonsStyle); - - const occ::handle& surf_geom = fill2.Surface(); - - TopoDS_Shape filled_face = BRepBuilderAPI_MakeFace(surf_geom, 0); - - DBRep::Set(theArgVec[1], filled_face); - - /* - /////////////////////////////////////////////////////////////////////// - TopoDS_Solid first_solid; - { - BRepOffset_MakeOffset myOffsetShape(filled_face, -offset_thick, 1e-4, - BRepOffset_Skin, //Mode - false, //Intersection - false, //SelfInter - GeomAbs_Intersection, //Join - true, //Thickening - false //RemoveIntEdges - ); //RemoveInvalidFaces - first_solid = TopoDS::Solid(myOffsetShape.Shape()); - } - */ - return 0; -} - -#include -#include -#include - -#include -#include -#include -#include - -// check that copying of empty maps does not allocate extra memory -template -void AllocDummyArr(Draw_Interpretor& theDI, int theN1, int theN2) -{ - NCollection_Array1 aMapArr1(0, theN1), aMapArr2(0, theN2); - - OSD_MemInfo aMemTool; - size_t aMem0 = aMemTool.Value(OSD_MemInfo::MemHeapUsage); - - for (int i = 1; i < theN1; i++) - aMapArr1(i) = aMapArr1(i - 1); - for (int i = 1; i < theN2; i++) - aMapArr2(i) = aMapArr2(0); - - aMemTool.Update(); - size_t aMem1 = aMemTool.Value(OSD_MemInfo::MemHeapUsage); - - theDI << "Heap usage before copy = " << (int)aMem0 << ", after = " << (int)aMem1 << "\n"; - - if (aMem1 > aMem0) - theDI << "Error: memory increased by " << (int)(aMem1 - aMem0) << " bytes\n"; -} - -static int OCC29064(Draw_Interpretor& theDI, int theArgc, const char** theArgv) -{ - if (theArgc < 2) - { - std::cout << "Error: give argument indicating type of map (map, doublemap, datamap, " - "indexedmap, indexeddatamap)" - << std::endl; - return 1; - } - - const int nbm1 = 10000, nbm2 = 10000; - if (strcasecmp(theArgv[1], "map") == 0) - AllocDummyArr>(theDI, nbm1, nbm2); - else if (strcasecmp(theArgv[1], "doublemap") == 0) - AllocDummyArr>(theDI, nbm1, nbm2); - else if (strcasecmp(theArgv[1], "datamap") == 0) - AllocDummyArr>(theDI, nbm1, nbm2); - else if (strcasecmp(theArgv[1], "indexedmap") == 0) - AllocDummyArr>(theDI, nbm1, nbm2); - else if (strcasecmp(theArgv[1], "indexeddatamap") == 0) - AllocDummyArr>(theDI, nbm1, nbm2); - else - { - std::cout << "Error: unrecognized argument " << theArgv[1] << std::endl; - return 1; - } - return 0; -} - -#include -#include -#include -#include - -//================================================================================================= - -static int OCC29430(Draw_Interpretor& theDI, int /*theNArg*/, const char** theArgVal) -{ - const double r45 = M_PI / 4.0, r225 = 3.0 * M_PI / 4.0; - - GC_MakeArcOfCircle arcMaker( - gp_Circ(gp_Ax2(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), 1.0), - r45, - r225, - true); - BRepBuilderAPI_MakeEdge edgeMaker(arcMaker.Value()); - BRepBuilderAPI_MakeWire wireMaker(edgeMaker.Edge()); - const TopoDS_Wire circle = wireMaker.Wire(); - - DBRep::Set(theArgVal[1], circle); - - BRepAdaptor_CompCurve curve(circle); - theDI << "Curve.FirstParameter() = " << curve.FirstParameter() << "\n"; - theDI << "Curve.LastParameter() = " << curve.LastParameter() << "\n"; - theDI << "Curve.Period() = " << (curve.IsPeriodic() ? curve.Period() : 0.0) << "\n"; - const gp_Pnt aStartPt = curve.Value(curve.FirstParameter()); - const gp_Pnt anEndPt = curve.Value(curve.LastParameter()); - - DrawTrSurf::Set(theArgVal[2], aStartPt); - DrawTrSurf::Set(theArgVal[3], anEndPt); - - return 0; -} - #include +#include //================================================================================================= @@ -3414,44 +1088,6 @@ static int OCC29195(Draw_Interpretor&, int theArgC, const char** theArgV) return 0; } -//======================================================================= -// function : QAStartsWith string startstring -//======================================================================= -static int QAStartsWith(Draw_Interpretor& di, int n, const char** a) -{ - if (n == 3) - { - TCollection_ExtendedString str = a[1]; - TCollection_ExtendedString startstr = a[2]; - if (str.StartsWith(startstr)) - di << "Yes"; - else - di << "No"; - return 0; - } - std::cerr << "Syntax error\n"; - return 1; -} - -//======================================================================= -// function : QAEndsWith string endstring -//======================================================================= -static int QAEndsWith(Draw_Interpretor& di, int n, const char** a) -{ - if (n == 3) - { - TCollection_ExtendedString str = a[1]; - TCollection_ExtendedString endstr = a[2]; - if (str.EndsWith(endstr)) - di << "Yes"; - else - di << "No"; - return 0; - } - std::cerr << "Syntax error\n"; - return 1; -} - // Class is used in OCC30435 #include @@ -3563,93 +1199,6 @@ static int OCC30435(Draw_Interpretor& di, int, const char** a) return 0; } -//================================================================================================= - -#include -#include -#include - -static int OCC30747(Draw_Interpretor& theDI, int theArgc, const char** theArgV) -{ - if (theArgc < 2) - { - return 1; - } - - const occ::handle aCirc = GC_MakeCircle2d(gp_Pnt2d(0, 0), 50); - - double aF = aCirc->FirstParameter(); - double aL = aCirc->LastParameter(); - double aNb = 10; - double aDelta = (aF + aL) / aNb; - occ::handle aFTrim = new Geom2d_TrimmedCurve(aCirc, aF, aDelta); - Geom2dConvert_CompCurveToBSplineCurve aRes(aFTrim); - for (int anId = 1; anId < aNb; anId++) - { - occ::handle aLTrim; - if (anId == (aNb - 1)) - { - aLTrim = new Geom2d_TrimmedCurve(aCirc, anId * aDelta, aF); - } - else - { - aLTrim = new Geom2d_TrimmedCurve(aCirc, anId * aDelta, (anId + 1) * aDelta); - } - aRes.Add(aLTrim, Precision::PConfusion()); - } - - if (!aRes.BSplineCurve()->IsClosed()) - { - theDI << "Error: curve isn't closed"; - return 1; - } - - DrawTrSurf::Set(theArgV[1], aRes.BSplineCurve()); - return 0; -} - -//================================================================================================= - -static int OCC30869(Draw_Interpretor& theDI, int theArgc, const char** theArgv) -{ - if (theArgc != 2) - { - theDI.PrintHelp(theArgv[0]); - return 1; - } - - TopoDS_Shape aWire = DBRep::Get(theArgv[1]); - if (aWire.IsNull() || aWire.ShapeType() != TopAbs_WIRE) - { - theDI << theArgv[1] << " is not a wire.\n"; - return 1; - } - - BRepAdaptor_CompCurve aBACC(TopoDS::Wire(aWire)); - - double aFirst = aBACC.FirstParameter(); - double aLast = aBACC.LastParameter(); - - gp_Pnt aPFirst, aPLast; - gp_Vec aVFirst, aVLast; - - aBACC.D1(aFirst, aPFirst, aVFirst); - aBACC.D1(aLast, aPLast, aVLast); - - if (aVFirst.SquareMagnitude() > gp::Resolution()) - aVFirst.Normalize(); - if (aVLast.SquareMagnitude() > gp::Resolution()) - aVLast.Normalize(); - - theDI << aFirst << ": point " << aPFirst.X() << " " << aPFirst.Y() << " " << aPFirst.Z() - << ", tangent " << aVFirst.X() << " " << aVFirst.Y() << " " << aVFirst.Z() << "\n"; - - theDI << aLast << ": point " << aPLast.X() << " " << aPLast.Y() << " " << aPLast.Z() - << ", tangent " << aVLast.X() << " " << aVLast.Y() << " " << aVLast.Z() << "\n"; - - return 0; -} - #include //================================================================================================= @@ -3719,226 +1268,6 @@ static int OCC30880(Draw_Interpretor& theDI, int theArgc, const char** theArgv) return 0; } -#include - -//======================================================================= -// function : OCC30990 -// purpose : check consistency of implementation of cache in B-Spline surfaces -// with respect to update of the cache for points located exactly -// on boundary between bspline spans (i.e. at knots) -//======================================================================= -static int OCC30990(Draw_Interpretor& theDI, int theNArg, const char** theArgV) -{ - if (theNArg != 2) - { - std::cerr << "Use: " << theArgV[0] << "surface\n"; - return 1; - } - - const occ::handle aSurf = - occ::down_cast(DrawTrSurf::GetSurface(theArgV[1])); - if (aSurf.IsNull()) - { - theDI << "Error: " << theArgV[1] << " is not a B-Spline surface"; - return 0; - } - GeomAdaptor_Surface aS(aSurf); - - // Evaluate points for U and V located exactly at b-spline knots, - // after evaluation of points inside the spans before and after the knot, - // and ensure that result at the knot is exactly the same regardless - // of previous evaluation (i.e. the cache is updated as necessary). - // Note: the points (D0) computed on different spans are slightly different - // due to rounding, which allows us to detect this situation without - // analysis of higher derivatives (which would show non-negligible difference). - int aNbErr = 0; - - theDI << "U knots: "; - for (int i = 1; i <= aSurf->NbUKnots(); i++) - { - theDI << aSurf->UKnot(i); - if (i < aSurf->NbUKnots()) - theDI << ","; - } - theDI << "\n"; - for (int i = 2; i < aSurf->NbUKnots(); i++) - { - double aUknot = aSurf->UKnot(i); - double aUprev = 0.5 * (aUknot + aSurf->UKnot(i - 1)); - double aUnext = 0.5 * (aUknot + aSurf->UKnot(i + 1)); - for (int j = 1; j < aSurf->NbVKnots(); j++) - { - double aV = 0.5 * (aSurf->VKnot(j) + aSurf->VKnot(j + 1)); - aS.Value(aUprev, aV); - gp_Pnt aValue1 = aS.Value(aUknot, aV); - aS.Value(aUnext, aV); - gp_Pnt aValue2 = aS.Value(aUknot, aV); - for (int k = 1; k <= 3; k++) - { - if (aValue1.Coord(k) != aValue2.Coord(k)) - { - Standard_SStream aStr; - aStr.precision(20); - aStr << "Error evaluating point at UV = (" << aUknot << ", " << aV << "):\n"; - aStr << "probe 1: " << (char)('X' + k - 1) << " = " << aValue1.Coord(k) << "\n"; - aStr << "probe 2: " << (char)('X' + k - 1) << " = " << aValue2.Coord(k) << "\n"; - theDI << aStr.str().c_str(); - aNbErr++; - } - } - } - } - - theDI << "V knots: "; - for (int j = 1; j <= aSurf->NbVKnots(); j++) - { - theDI << aSurf->VKnot(j); - if (j < aSurf->NbVKnots()) - theDI << ","; - } - theDI << "\n"; - for (int j = 2; j < aSurf->NbVKnots(); j++) - { - double aVknot = aSurf->VKnot(j); - double aVprev = 0.5 * (aVknot + aSurf->VKnot(j - 1)); - double aVnext = 0.5 * (aVknot + aSurf->VKnot(j + 1)); - for (int i = 1; i < aSurf->NbUKnots(); i++) - { - double aU = 0.5 * (aSurf->UKnot(i) + aSurf->UKnot(i + 1)); - aS.Value(aU, aVprev); - gp_Pnt aValue1 = aS.Value(aU, aVknot); - aS.Value(aU, aVnext); - gp_Pnt aValue2 = aS.Value(aU, aVknot); - for (int k = 1; k <= 3; k++) - { - if (aValue1.Coord(k) != aValue2.Coord(k)) - { - Standard_SStream aStr; - aStr.precision(20); - aStr << "Error evaluating point at UV = (" << aU << ", " << aVknot << "):\n"; - aStr << "probe 1: " << (char)('X' + k - 1) << " = " << aValue1.Coord(k) << "\n"; - aStr << "probe 2: " << (char)('X' + k - 1) << " = " << aValue2.Coord(k) << "\n"; - theDI << aStr.str().c_str(); - aNbErr++; - } - } - } - } - - theDI << "Total " << aNbErr << " deviations detected"; - return 0; -} - -#include -#include -#include - -//================================================================================================= - -static int OCC31697(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc < 3) - { - di << "Usage : " << argv[0] << " expression variable\n"; - return 1; - } - - TCollection_AsciiString anExpStr(argv[1]); - TCollection_AsciiString aVarStr(argv[2]); - - occ::handle exprIntrp = ExprIntrp_GenExp::Create(); - - // - // Create the expression - exprIntrp->Process(anExpStr); - - if (!exprIntrp->IsDone()) - { - di << "Interpretation of expression " << argv[1] << " failed\n"; - return 1; - } - - occ::handle anExpr = exprIntrp->Expression(); - occ::handle aVar = new Expr_NamedUnknown(aVarStr); - - if (!anExpr->Contains(aVar)) - { - di << "Expression " << argv[1] << " does not contain variable " << argv[2] << "\n"; - return 1; - } - - occ::handle aDer = anExpr->Derivative(aVar); - - TCollection_AsciiString aDerStr = aDer->String(); - - di << "The derivative of the " << argv[1] << " by " << argv[2] << " is equal to " << aDerStr - << "\n"; - - return 0; -} - -#include -#include -#include - -//================================================================================================= - -static int OCC31320(Draw_Interpretor& di, int argc, const char** argv) -{ - if (argc < 3) - { - di << "Usage : " << argv[0] << " DocName ObjName\n"; - return 1; - } - occ::handle aModel; - occ::handle D; - if (!DDocStd::GetDocument(argv[1], D)) - { - di << "Error: document " << argv[1] << " not found\n"; - return 1; - } - - TDF_Label aLabel = D->Main(); - occ::handle aModelAttr; - if (!aLabel.IsNull() && aLabel.FindAttribute(TObj_TModel::GetID(), aModelAttr)) - aModel = aModelAttr->Model(); - - if (aModel.IsNull()) - { - di << "Error: TObj model " << argv[1] << " not found\n"; - return 1; - } - - occ::handle aName = new TCollection_HExtendedString(argv[2]); - occ::handle aDict; - occ::handle anObj = aModel->FindObject(aName, aDict); - - if (aModel.IsNull()) - { - di << "Error: object " << argv[2] << " not found\n"; - return 1; - } - - // do a test: find the first child of an object, remove object and get the father of this child - occ::handle aChildrenIter = anObj->GetChildren(); - if (!aChildrenIter->More()) - { - di << "Error: object " << argv[2] << " has no children\n"; - return 1; - } - - occ::handle aChild = aChildrenIter->Value(); - anObj->Detach(); - occ::handle aFather = aChild->GetFatherObject(); - if (!aFather.IsNull()) - { - di << "Error: father is not null\n"; - return 1; - } - - return 0; -} - #include #include @@ -4070,151 +1399,6 @@ static int OCC32744(Draw_Interpretor& theDi, int theNbArgs, const char** theArgV return 0; } -//================================================================================================= - -static int OCC33657_1(Draw_Interpretor&, int, const char**) -{ - STEPCAFControl_Controller::Init(); - // Checking constructors working in parallel. - OSD_Parallel::For(0, 1000, [](int) { - STEPCAFControl_Reader aReader; - aReader.SetColorMode(true); - STEPCAFControl_Writer aWriter; - aWriter.SetDimTolMode(true); - }); - - return 0; -} - -//================================================================================================= - -static int OCC33657_2(Draw_Interpretor& theDI, int theArgC, const char** theArgV) -{ - if (theArgC < 2) - { - theDI << "Use: " << theArgV[0] << " file\n"; - return 1; - } - - STEPCAFControl_Controller::Init(); - // Checking readers working in parallel. - OSD_Parallel::For(0, 100, [&](int) { - STEPControl_Reader aReader; - aReader.ReadFile(theArgV[1], DESTEP_Parameters{}); - aReader.TransferRoots(); - }); - - return 0; -} - -//================================================================================================= - -static int OCC33657_3(Draw_Interpretor&, int, const char**) -{ - STEPCAFControl_Controller::Init(); - const TopoDS_Shape aShape = BRepPrimAPI_MakeBox(10.0, 20.0, 30.0).Shape(); - // Checking writers working in parallel. - OSD_Parallel::For(0, 100, [&](int) { - STEPControl_Writer aWriter; - aWriter.Transfer(aShape, STEPControl_StepModelType::STEPControl_AsIs, DESTEP_Parameters{}); - std::ostringstream aStream; - aWriter.WriteStream(aStream); - }); - - return 0; -} - -//================================================================================================= - -static int OCC33657_4(Draw_Interpretor& theDI, int theArgC, const char** theArgV) -{ - if (theArgC < 2) - { - theDI << "Use: " << theArgV[0] << " file\n"; - return 1; - } - - STEPCAFControl_Controller::Init(); - - // Acquire shape to write/read. - STEPControl_Reader aReader; - aReader.ReadFile(theArgV[1], DESTEP_Parameters{}); - aReader.TransferRoots(); - TopoDS_Shape aSourceShape = aReader.OneShape(); - - // Analyzer to compare the shape with the same shape after write-read sequence. - ShapeAnalysis_ShapeContents aSourceAnalyzer; - aSourceAnalyzer.Perform(aSourceShape); - - // Flag is set to false if any error is detected. - // Reads and writes to the flag are performed exclusively in relaxed memory order - // in order to avoid inter-thread synchronization that can potentially omit some problems. - std::atomic_bool anErrorOccurred(false); - - OSD_Parallel::For(0, 100, [&](int) { - if (anErrorOccurred.load(std::memory_order_relaxed)) - { - return; - } - - // Writing. - STEPControl_Writer aWriter; - aWriter.Transfer(aSourceShape, - STEPControl_StepModelType::STEPControl_AsIs, - DESTEP_Parameters{}); - std::stringstream aStream; - aWriter.WriteStream(aStream); - - // Reading. - STEPControl_Reader aReader; - aReader.ReadStream("", DESTEP_Parameters{}, aStream); - aReader.TransferRoots(); - const TopoDS_Shape aResultShape = aReader.OneShape(); - ShapeAnalysis_ShapeContents aResultAnalyzer; - aResultAnalyzer.Perform(aResultShape); - - // Making sure that shape is unchanged. - if (aSourceAnalyzer.NbSolids() != aResultAnalyzer.NbSolids()) - { - theDI << "Error: Wrong number of solids in the result shape.\nExpected: " - << aSourceAnalyzer.NbSolids() << "\nActual" << aResultAnalyzer.NbSolids() << "\n"; - anErrorOccurred.store(true, std::memory_order_relaxed); - } - if (aSourceAnalyzer.NbShells() != aResultAnalyzer.NbShells()) - { - theDI << "Error: Wrong number of shells in the result shape.\nExpected: " - << aSourceAnalyzer.NbShells() << "\nActual" << aResultAnalyzer.NbShells() << "\n"; - anErrorOccurred.store(true, std::memory_order_relaxed); - } - if (aSourceAnalyzer.NbFaces() != aResultAnalyzer.NbFaces()) - { - theDI << "Error: Wrong number of faces in the result shape.\nExpected: " - << aSourceAnalyzer.NbFaces() << "\nActual" << aResultAnalyzer.NbFaces() << "\n"; - anErrorOccurred.store(true, std::memory_order_relaxed); - } - if (aSourceAnalyzer.NbWires() != aResultAnalyzer.NbWires()) - { - theDI << "Error: Wrong number of wires in the result shape.\nExpected: " - << aSourceAnalyzer.NbWires() << "\nActual" << aResultAnalyzer.NbWires() << "\n"; - anErrorOccurred.store(true, std::memory_order_relaxed); - } - if (aSourceAnalyzer.NbEdges() != aResultAnalyzer.NbEdges()) - { - theDI << "Error: Wrong number of edges in the result shape.\nExpected: " - << aSourceAnalyzer.NbEdges() << "\nActual" << aResultAnalyzer.NbEdges() << "\n"; - anErrorOccurred.store(true, std::memory_order_relaxed); - } - if (aSourceAnalyzer.NbVertices() != aResultAnalyzer.NbVertices()) - { - theDI << "Error: Wrong number of vertices in the result shape.\nExpected: " - << aSourceAnalyzer.NbVertices() << "\nActual" << aResultAnalyzer.NbVertices() << "\n"; - anErrorOccurred.store(true, std::memory_order_relaxed); - } - }); - - return anErrorOccurred; -} - //======================================================================= // function : QACheckBends // purpose : @@ -4404,43 +1588,21 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { const char* group = "QABugs"; - theCommands.Add("OCC26675_1", "OCC26675_1 result", __FILE__, SurfaceGenOCC26675_1, group); theCommands.Add("OCC27021", "OCC27021", __FILE__, OCC27021, group); theCommands.Add("OCC27235", "OCC27235", __FILE__, OCC27235, group); theCommands.Add("OCC26930", "OCC26930", __FILE__, OCC26930, group); theCommands.Add("OCC27466", "OCC27466", __FILE__, OCC27466, group); - theCommands.Add("OCC26747_1", "OCC26747_1 result", __FILE__, OCC26747_1, group); - theCommands.Add("OCC26747_2", "OCC26747_2 result", __FILE__, OCC26747_2, group); - theCommands.Add("OCC26747_3", "OCC26747_3 result", __FILE__, OCC26747_3, group); theCommands.Add("OCC26270", "OCC26270 shape result", __FILE__, OCC26270, group); - theCommands.Add("OCC27875", "OCC27875 curve", __FILE__, OCC27875, group); theCommands.Add("OCC27884", "OCC27884: Possible improvement for 2d classifier", __FILE__, OCC27884, group); theCommands.Add("OCC28389", "OCC28389", __FILE__, OCC28389, group); - theCommands.Add("OCC28594", "OCC28594", __FILE__, OCC28594, group); theCommands.Add("OCC28784", "OCC28784 result shape", __FILE__, OCC28784, group); theCommands.Add("OCC28829", "OCC28829: perform invalid FPE operation", __FILE__, OCC28829, group); - theCommands.Add("OCC28131", - "OCC28131 name: creates face problematic for offset", - __FILE__, - OCC28131, - group); - theCommands.Add("OCC29430", - "OCC29430 " - " ", - __FILE__, - OCC29430, - group); theCommands.Add("OCC29531", "OCC29531 ", __FILE__, OCC29531, group); - theCommands.Add("OCC29064", - "OCC29064: test memory usage by copying empty maps", - __FILE__, - OCC29064, - group); theCommands.Add("OCC29807", "OCC29807 surface1 surface2 u1 v1 u2 v2", __FILE__, OCC29807, group); theCommands.Add("OCC29311", "OCC29311 shape counter nbiter: check performance of OBB calculation", @@ -4464,19 +1626,6 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) OCC29195, group); theCommands.Add("OCC30435", "OCC30435 result curve inverse nbit", __FILE__, OCC30435, group); - theCommands.Add("OCC30747", "OCC30747: create a closed curve", __FILE__, OCC30747, group); - theCommands.Add("OCC30990", "OCC30990 surface", __FILE__, OCC30990, group); - - theCommands.Add("QAStartsWith", "QAStartsWith string startstring", __FILE__, QAStartsWith, group); - - theCommands.Add("QAEndsWith", "QAEndsWith string endstring", __FILE__, QAEndsWith, group); - - theCommands.Add("OCC30869", - "Prints bounding points of the given wire and tangent vectors at these points.\n" - "Usage: OCC30869 wire", - __FILE__, - OCC30869, - group); theCommands.Add("OCC30880", "Looks for extrema between edge and face.\n" @@ -4485,15 +1634,6 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) OCC30880, group); - theCommands.Add("OCC31697", "OCC31697 expression variable", __FILE__, OCC31697, group); - - theCommands.Add( - "OCC31320", - "OCC31320 DocName ObjName : tests remove of the children GetFather method if father is removed", - __FILE__, - OCC31320, - group); - theCommands.Add("OCC31785", "OCC31785 file.xbf : test reading XBF file in another thread", __FILE__, @@ -4524,30 +1664,5 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) OCC26441, group); - theCommands.Add( - "OCC33657_1", - "Check performance of STEPCAFControl_Reader/Writer constructors in multithreading environment.", - __FILE__, - OCC33657_1, - group); - - theCommands.Add("OCC33657_2", - "Check performance of STEPControl_Reader in multithreading environment.", - __FILE__, - OCC33657_2, - group); - - theCommands.Add("OCC33657_3", - "Check performance of STEPControl_Writer in multithreading environment.", - __FILE__, - OCC33657_3, - group); - - theCommands.Add("OCC33657_4", - "Check performance of STEPControl_Reader/Writer in multithreading environment.", - __FILE__, - OCC33657_4, - group); - return; } diff --git a/src/FoundationClasses/TKMath/GTests/FILES.cmake b/src/FoundationClasses/TKMath/GTests/FILES.cmake index 4b907f3eda..2900ab40c1 100644 --- a/src/FoundationClasses/TKMath/GTests/FILES.cmake +++ b/src/FoundationClasses/TKMath/GTests/FILES.cmake @@ -50,6 +50,8 @@ set(OCCT_TKMath_GTests_FILES gp_Pln_Test.cxx gp_Pnt_Test.cxx gp_Pnt2d_Test.cxx + gp_Quaternion_Test.cxx + gp_Torus_Test.cxx gp_Trsf_Test.cxx gp_Vec_Test.cxx gp_Vec2d_Test.cxx diff --git a/src/FoundationClasses/TKMath/GTests/gp_Lin_Test.cxx b/src/FoundationClasses/TKMath/GTests/gp_Lin_Test.cxx index 8ad4b0a4e4..363117f9e7 100644 --- a/src/FoundationClasses/TKMath/GTests/gp_Lin_Test.cxx +++ b/src/FoundationClasses/TKMath/GTests/gp_Lin_Test.cxx @@ -15,10 +15,13 @@ #include #include #include +#include #include +#include #include #include #include +#include #include @@ -109,3 +112,26 @@ TEST(gp_LinTest, Transform) gp_Lin aTransformed = aLin.Transformed(aTrsf); EXPECT_NEAR(aTransformed.Location().Z(), 10.0, Precision::Confusion()); } + +// OCC15489: gp_Lin2d construction from implicit line equation A*x + B*y + C = 0. +// The constructor must throw Standard_ConstructionError when the direction +// vector is zero (sqrt(A*A + B*B) <= gp::Resolution()). + +TEST(gp_Lin2dTest, ConstructFromEquation_ZeroDirection_ThrowsException) +{ +// A=0, B=0 -> direction vector is zero -> must throw +#ifndef No_Exception + EXPECT_THROW(gp_Lin2d(0.0, 0.0, 1.0), Standard_ConstructionError); +#endif +} + +TEST(gp_Lin2dTest, ConstructFromEquation_ValidCoefficients_CorrectOrigin) +{ + // A=1e-20, B=-1, C=2 gives the line 1e-20 * x - y + 2 = 0 + // Origin (closest point to global origin on the line) must be + // X_0 ~= -1.9999999999999999e-20, Y_0 ~= 2 + const gp_Lin2d aLin2d(1e-20, -1.0, 2.0); + const gp_Pnt2d anOrigin = aLin2d.Location(); + EXPECT_NEAR(anOrigin.X(), -1.9999999999999999e-20, 1e-25); + EXPECT_NEAR(anOrigin.Y(), 2.0, 0.001); +} diff --git a/src/FoundationClasses/TKMath/GTests/gp_Quaternion_Test.cxx b/src/FoundationClasses/TKMath/GTests/gp_Quaternion_Test.cxx new file mode 100644 index 0000000000..8ae6085318 --- /dev/null +++ b/src/FoundationClasses/TKMath/GTests/gp_Quaternion_Test.cxx @@ -0,0 +1,186 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +// Test OCC25574: gp_Quaternion Euler angle conversion is consistent and correct +// for all supported Euler sequences, including YawPitchRoll. +TEST(gp_QuaternionTest, OCC25574_EulerAnglesConsistency) +{ + const char* aNames[] = {"Extrinsic_XYZ", "Extrinsic_XZY", "Extrinsic_YZX", "Extrinsic_YXZ", + "Extrinsic_ZXY", "Extrinsic_ZYX", "Intrinsic_XYZ", "Intrinsic_XZY", + "Intrinsic_YZX", "Intrinsic_YXZ", "Intrinsic_ZXY", "Intrinsic_ZYX", + "Extrinsic_XYX", "Extrinsic_XZX", "Extrinsic_YZY", "Extrinsic_YXY", + "Extrinsic_ZYZ", "Extrinsic_ZXZ", "Intrinsic_XYX", "Intrinsic_XZX", + "Intrinsic_YZY", "Intrinsic_YXY", "Intrinsic_ZXZ", "Intrinsic_ZYZ"}; + + gp_Quaternion aQuat; + aQuat.Set(0.06766916507860499, 0.21848101129786085, 0.11994599260380681, 0.9660744746954637); + + gp_Mat aRinv = aQuat.GetMatrix().Inverted(); + gp_Mat aI; + aI.SetIdentity(); + + // Check round-trip consistency: GetEulerAngles then SetEulerAngles should reproduce the matrix + for (int i = gp_Extrinsic_XYZ; i <= gp_Intrinsic_ZYZ; i++) + { + double alpha, beta, gamma; + aQuat.GetEulerAngles(gp_EulerSequence(i), alpha, beta, gamma); + + gp_Quaternion aQuat2; + aQuat2.SetEulerAngles(gp_EulerSequence(i), alpha, beta, gamma); + + gp_Mat aR = aQuat2.GetMatrix(); + gp_Mat aDiff = aR * aRinv - aI; + EXPECT_LE(aDiff.Determinant(), 1e-5) + << "Round-trip failed for Euler sequence " << aNames[i - gp_Extrinsic_XYZ]; + } +} + +// Test OCC25574: Each Euler angle rotation around a named axis should not change +// a point lying on that axis. +TEST(gp_QuaternionTest, OCC25574_EulerAxisRotationPreservesAxis) +{ + const char* aNames[] = {"Extrinsic_XYZ", "Extrinsic_XZY", "Extrinsic_YZX", "Extrinsic_YXZ", + "Extrinsic_ZXY", "Extrinsic_ZYX", "Intrinsic_XYZ", "Intrinsic_XZY", + "Intrinsic_YZX", "Intrinsic_YXZ", "Intrinsic_ZXY", "Intrinsic_ZYX", + "Extrinsic_XYX", "Extrinsic_XZX", "Extrinsic_YZY", "Extrinsic_YXY", + "Extrinsic_ZYZ", "Extrinsic_ZXZ", "Intrinsic_XYX", "Intrinsic_XZX", + "Intrinsic_YZY", "Intrinsic_YXY", "Intrinsic_ZXZ", "Intrinsic_ZYZ"}; + + for (int i = gp_Extrinsic_XYZ; i <= gp_Intrinsic_ZYZ; i++) + { + for (int j = 0; j < 3; j++) + { + // Determine axis index from the sequence name (X=0, Y=1, Z=2) + const int anAxis = aNames[i - gp_Extrinsic_XYZ][10 + j] - 'X'; + ASSERT_GE(anAxis, 0); + ASSERT_LE(anAxis, 2); + + // 90-degree rotation around the j-th axis of the sequence + double anAngles[3] = {0., 0., 0.}; + anAngles[j] = 0.5 * M_PI; + + gp_Quaternion q2; + q2.SetEulerAngles(gp_EulerSequence(i), anAngles[0], anAngles[1], anAngles[2]); + + // Unit vector on the rotation axis + gp_XYZ v(0., 0., 0.); + v.SetCoord(anAxis + 1, 1.); + + gp_Trsf aT; + aT.SetRotation(q2); + gp_XYZ v2 = v; + aT.Transforms(v2); + + EXPECT_LE((v - v2).SquareModulus(), Precision::SquareConfusion()) + << "Rotation around axis should not move a point on that axis. Sequence: " + << aNames[i - gp_Extrinsic_XYZ] << ", angle index: " << j; + } + } +} + +// Test OCC25574: Extrinsic and intrinsic Euler sequences produce compatible matrices. +TEST(gp_QuaternionTest, OCC25574_ExtrinsicIntrinsicCorrespondence) +{ + const double alpha = 0.1517461713131; + const double beta = 1.5162198410141; + const double gamma = 1.9313156236541; + + const gp_EulerSequence aPairs[][2] = {{gp_Extrinsic_XYZ, gp_Intrinsic_ZYX}, + {gp_Extrinsic_XZY, gp_Intrinsic_YZX}, + {gp_Extrinsic_YZX, gp_Intrinsic_XZY}, + {gp_Extrinsic_YXZ, gp_Intrinsic_ZXY}, + {gp_Extrinsic_ZXY, gp_Intrinsic_YXZ}, + {gp_Extrinsic_ZYX, gp_Intrinsic_XYZ}}; + const char* aPairNames[] = {"XYZ/ZYX", "XZY/YZX", "YZX/XZY", "YXZ/ZXY", "ZXY/YXZ", "ZYX/XYZ"}; + + gp_Quaternion aQuat; + for (int i = 0; i < 6; i++) + { + aQuat.SetEulerAngles(aPairs[i][0], alpha, beta, gamma); + + double alpha2, beta2, gamma2; + aQuat.GetEulerAngles(aPairs[i][1], gamma2, beta2, alpha2); + + EXPECT_NEAR(alpha, alpha2, 1e-5) << "alpha mismatch for pair " << aPairNames[i]; + EXPECT_NEAR(beta, beta2, 1e-5) << "beta mismatch for pair " << aPairNames[i]; + EXPECT_NEAR(gamma, gamma2, 1e-5) << "gamma mismatch for pair " << aPairNames[i]; + } +} + +// Test OCC25574 (YawPitchRoll): applying three sequential rotations and recovering +// angles via gp_YawPitchRoll must reproduce the original angles. +TEST(gp_QuaternionTest, OCC25574_YawPitchRollRoundTrip) +{ + const gp_Ax2 aWorld; + const double aAlpha = 0.0; + const double aBeta = -35.0 / 180.0 * M_PI; + const double aGamma = 90.0 / 180.0 * M_PI; + + // Build the rotated frame step by step (yaw-pitch-roll convention) + const gp_Quaternion aRotZ(aWorld.Direction(), aAlpha); + const gp_Vec aRotY = aRotZ.Multiply(aWorld.YDirection()); + const gp_Vec aRotX = aRotZ.Multiply(aWorld.XDirection()); + + const gp_Quaternion aRotYaw(aRotY, aBeta); + const gp_Vec aRotZ2 = aRotYaw.Multiply(aWorld.Direction()); + const gp_Vec aRotX2 = aRotYaw.Multiply(aRotX); + + const gp_Quaternion aRotRoll(aRotX2, aGamma); + const gp_Vec aRotZ3 = aRotRoll.Multiply(aRotZ2); + + const gp_Ax2 aResult(gp_Pnt(0., 0., 0.), aRotZ3, aRotX2); + + gp_Trsf aTransformation; + aTransformation.SetDisplacement(gp_Ax2(), aResult); + + double aComputedAlpha, aComputedBeta, aComputedGamma; + aTransformation.GetRotation().GetEulerAngles(gp_YawPitchRoll, + aComputedAlpha, + aComputedBeta, + aComputedGamma); + + EXPECT_NEAR(aAlpha, aComputedAlpha, 1e-5) << "YawPitchRoll alpha mismatch"; + EXPECT_NEAR(aBeta, aComputedBeta, 1e-5) << "YawPitchRoll beta mismatch"; + EXPECT_NEAR(aGamma, aComputedGamma, 1e-5) << "YawPitchRoll gamma mismatch"; +} + +// Test OCC25574 (issue 25946): gp_Intrinsic_ZYX and gp_Extrinsic_XYZ yield the +// same Euler angles in reversed order. +TEST(gp_QuaternionTest, OCC25574_IntrinsicZYX_vs_ExtrinsicXYZ) +{ + gp_Quaternion aQuat; + aQuat.Set(0.06766916507860499, 0.21848101129786085, 0.11994599260380681, 0.9660744746954637); + + double aAlpha, aBeta, aGamma; + aQuat.GetEulerAngles(gp_Intrinsic_ZYX, aAlpha, aBeta, aGamma); + + double aAlpha2, aBeta2, aGamma2; + aQuat.GetEulerAngles(gp_Extrinsic_XYZ, aAlpha2, aBeta2, aGamma2); + + EXPECT_NEAR(aAlpha, aGamma2, 1e-5) << "Intrinsic ZYX alpha should equal Extrinsic XYZ gamma"; + EXPECT_NEAR(aBeta, aBeta2, 1e-5) << "beta should match"; + EXPECT_NEAR(aGamma, aAlpha2, 1e-5) << "Intrinsic ZYX gamma should equal Extrinsic XYZ alpha"; +} diff --git a/src/FoundationClasses/TKMath/GTests/gp_Torus_Test.cxx b/src/FoundationClasses/TKMath/GTests/gp_Torus_Test.cxx new file mode 100644 index 0000000000..a1ecd9fde9 --- /dev/null +++ b/src/FoundationClasses/TKMath/GTests/gp_Torus_Test.cxx @@ -0,0 +1,118 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +// Test OCC26746: gp_Torus::Coefficients() computes correct implicit equation coefficients. +// Verifies that evaluating the 35-coefficient polynomial at many points on the torus surface +// gives values close to zero within tolerance. +TEST(gp_TorusTest, OCC26746_CoefficientsCorrect) +{ + // Torus constructed from the original Draw script: + // torus tr 55.52514413 2.070076585 73.83409062 + // 0.37231784651136368 0.58886674834874120 0.71736697293527607 + // 0.80682335496555135 0.17666016102759910 -0.56376170618524390 + // 87.08479625 23.14682176 + const gp_Ax3 anAx3(gp_Pnt(55.52514413, 2.070076585, 73.83409062), + gp_Dir(0.37231784651136368, 0.58886674834874120, 0.71736697293527607), + gp_Dir(0.80682335496555135, 0.17666016102759910, -0.56376170618524390)); + + Handle(Geom_ToroidalSurface) aTorus = new Geom_ToroidalSurface(anAx3, 87.08479625, 23.14682176); + + const double aTolerance = 3.0e-7; + const int aNbPtsMax = 5; + const int aLowIndex = 5; + const double aStep = 2.0 * M_PI / aNbPtsMax; + + NCollection_Array1 aCoeffs(aLowIndex, aLowIndex + 34); + aTorus->Torus().Coefficients(aCoeffs); + + double aUPar = 0.0; + for (int aUind = 0; aUind <= aNbPtsMax; aUind++) + { + double aVPar = 0.0; + for (int aVind = 0; aVind <= aNbPtsMax; aVind++) + { + const gp_Pnt aPt = aTorus->Value(aUPar, aVPar); + const double aX1 = aPt.X(); + const double aX2 = aX1 * aX1; + const double aX3 = aX2 * aX1; + const double aX4 = aX2 * aX2; + const double aY1 = aPt.Y(); + const double aY2 = aY1 * aY1; + const double aY3 = aY2 * aY1; + const double aY4 = aY2 * aY2; + const double aZ1 = aPt.Z(); + const double aZ2 = aZ1 * aZ1; + const double aZ3 = aZ2 * aZ1; + const double aZ4 = aZ2 * aZ2; + + int i = aLowIndex; + + double aDelta = aCoeffs(i++) * aX4; + aDelta += aCoeffs(i++) * aY4; + aDelta += aCoeffs(i++) * aZ4; + aDelta += aCoeffs(i++) * aX3 * aY1; + aDelta += aCoeffs(i++) * aX3 * aZ1; + aDelta += aCoeffs(i++) * aY3 * aX1; + aDelta += aCoeffs(i++) * aY3 * aZ1; + aDelta += aCoeffs(i++) * aZ3 * aX1; + aDelta += aCoeffs(i++) * aZ3 * aY1; + aDelta += aCoeffs(i++) * aX2 * aY2; + aDelta += aCoeffs(i++) * aX2 * aZ2; + aDelta += aCoeffs(i++) * aY2 * aZ2; + aDelta += aCoeffs(i++) * aX2 * aY1 * aZ1; + aDelta += aCoeffs(i++) * aX1 * aY2 * aZ1; + aDelta += aCoeffs(i++) * aX1 * aY1 * aZ2; + aDelta += aCoeffs(i++) * aX3; + aDelta += aCoeffs(i++) * aY3; + aDelta += aCoeffs(i++) * aZ3; + aDelta += aCoeffs(i++) * aX2 * aY1; + aDelta += aCoeffs(i++) * aX2 * aZ1; + aDelta += aCoeffs(i++) * aY2 * aX1; + aDelta += aCoeffs(i++) * aY2 * aZ1; + aDelta += aCoeffs(i++) * aZ2 * aX1; + aDelta += aCoeffs(i++) * aZ2 * aY1; + aDelta += aCoeffs(i++) * aX1 * aY1 * aZ1; + aDelta += aCoeffs(i++) * aX2; + aDelta += aCoeffs(i++) * aY2; + aDelta += aCoeffs(i++) * aZ2; + aDelta += aCoeffs(i++) * aX1 * aY1; + aDelta += aCoeffs(i++) * aX1 * aZ1; + aDelta += aCoeffs(i++) * aY1 * aZ1; + aDelta += aCoeffs(i++) * aX1; + aDelta += aCoeffs(i++) * aY1; + aDelta += aCoeffs(i++) * aZ1; + aDelta += aCoeffs(i++); + + EXPECT_NEAR(aDelta, 0.0, aTolerance) + << "Torus coefficient equation not satisfied at (u=" << aUPar << ", v=" << aVPar + << "), delta=" << aDelta; + + aVPar = (aVind == aNbPtsMax) ? 2.0 * M_PI : aVPar + aStep; + } + + aVPar = 0.0; + aUPar = (aUind == aNbPtsMax) ? 2.0 * M_PI : aUPar + aStep; + } +} diff --git a/src/FoundationClasses/TKMath/GTests/gp_Vec2d_Test.cxx b/src/FoundationClasses/TKMath/GTests/gp_Vec2d_Test.cxx index aa5f23c339..4a46d2e9c6 100644 --- a/src/FoundationClasses/TKMath/GTests/gp_Vec2d_Test.cxx +++ b/src/FoundationClasses/TKMath/GTests/gp_Vec2d_Test.cxx @@ -163,3 +163,18 @@ TEST(gp_Vec2dTest, SetLinearForm) EXPECT_NEAR(aResult.X(), 2.0, Precision::Confusion()); EXPECT_NEAR(aResult.Y(), 3.0, Precision::Confusion()); } + +TEST(gp_Vec2dTest, OCC26750_IsNormal_NegativeAngle) +{ + // OCC26750: gp_Vec2d::IsNormal() returned FALSE when the angle is -PI/2 (not only +PI/2). + const gp_Vec2d aVec1(1.0, 0.0); + const gp_Vec2d aVec2(0.0, -1.0); // -90 degrees + EXPECT_TRUE(aVec1.IsNormal(aVec2, Precision::Angular())) + << "Vectors at -90 degrees should be recognized as normal"; + + // Verify gp_Dir2d as well + const gp_Dir2d aD1(gp_Dir2d::D::X); + const gp_Dir2d aD2(gp_Dir2d::D::NY); + EXPECT_TRUE(aD1.IsNormal(aD2, Precision::Angular())) + << "Direction X and direction -Y should be recognized as normal"; +} diff --git a/src/FoundationClasses/TKMath/GTests/math_GlobOptMin_Test.cxx b/src/FoundationClasses/TKMath/GTests/math_GlobOptMin_Test.cxx index 4fb54cabd3..5a26beab4b 100644 --- a/src/FoundationClasses/TKMath/GTests/math_GlobOptMin_Test.cxx +++ b/src/FoundationClasses/TKMath/GTests/math_GlobOptMin_Test.cxx @@ -13,6 +13,8 @@ #include #include +#include +#include #include #include @@ -100,6 +102,71 @@ public: } }; +// Branin function: standard global optimization benchmark with 3 global minima. +// f(x,y) = a*(y - b*x^2 + c*x - r)^2 + s*(1-t)*cos(x) + s +// Standard parameters: a=1, b=5.1/(4pi^2), c=5/pi, r=6, s=10, t=1/(8pi) +// Global minimum value: ~0.397887 at 3 locations: (-pi,12.275), (pi,2.275), (9.42478,2.475) +class BraninFunction : public math_MultipleVarFunctionWithHessian +{ +public: + BraninFunction() + { + a = 1.0; + b = 5.1 / (4.0 * M_PI * M_PI); + c = 5.0 / M_PI; + r = 6.0; + s = 10.0; + t = 1.0 / (8.0 * M_PI); + } + + int NbVariables() const override { return 2; } + + bool Value(const math_Vector& theX, double& theF) override + { + const double u = theX(1); + const double v = theX(2); + const double aSqPt = (v - b * u * u + c * u - r); + const double aLnPt = s * (1 - t) * cos(u); + theF = a * aSqPt * aSqPt + aLnPt + s; + return true; + } + + bool Gradient(const math_Vector& theX, math_Vector& theG) override + { + const double u = theX(1); + const double v = theX(2); + const double aSqPt = (v - b * u * u + c * u - r); + theG(1) = 2 * a * aSqPt * (c - 2 * b * u) - s * (1 - t) * sin(u); + theG(2) = 2 * a * aSqPt; + return true; + } + + bool Values(const math_Vector& theX, double& theF, math_Vector& theG) override + { + Value(theX, theF); + Gradient(theX, theG); + return true; + } + + bool Values(const math_Vector& theX, double& theF, math_Vector& theG, math_Matrix& theH) override + { + Value(theX, theF); + Gradient(theX, theG); + const double u = theX(1); + const double v = theX(2); + const double aSqPt = (v - b * u * u + c * u - r); + const double aTmpPt = c - 2 * b * u; + theH(1, 1) = 2 * a * aTmpPt * aTmpPt - 4 * a * b * aSqPt - s * (1 - t) * cos(u); + theH(1, 2) = 2 * a * aTmpPt; + theH(2, 1) = theH(1, 2); + theH(2, 2) = 2 * a; + return true; + } + +private: + double a, b, c, r, s, t; +}; + } // anonymous namespace TEST(MathGlobOptMinTest, QuadraticFunctionOptimization) @@ -513,4 +580,67 @@ TEST(MathGlobOptMinTest, SmallSearchSpace) aSolver.Points(1, aSol); EXPECT_NEAR(aSol(1), 1.0, 0.02) << "Should find solution close to global minimum"; EXPECT_NEAR(aSol(2), 2.0, 0.02) << "Should find solution close to global minimum"; -} \ No newline at end of file +} + +TEST(MathGlobOptMinTest, OCC25004_BraninFunctionGlobalOptimum) +{ + // OCC25004: Extrema_ExtCC incorrect result. Tests math_GlobOptMin on Branin benchmark. + // The Branin function has exactly 3 global minima at ~(-pi,12.275), (pi,2.275), (9.42478,2.475). + // Expected minimum value: ~0.39788735772. + BraninFunction aFunc; + + math_Vector aLower(1, 2), aUpper(1, 2); + aLower(1) = -5; + aLower(2) = 0; + aUpper(1) = 10; + aUpper(2) = 15; + + // Estimate Lipschitz constant on a regular 16x16 grid. + const int aGridOrder = 16; + math_Vector aFuncValues(1, aGridOrder * aGridOrder); + double aLipConst = 0; + math_Vector aCurrPnt1(1, 2), aCurrPnt2(1, 2); + + int idx = 1; + for (int i = 1; i <= aGridOrder; i++) + { + for (int j = 1; j <= aGridOrder; j++) + { + aCurrPnt1(1) = aLower(1) + (aUpper(1) - aLower(1)) * (i - 1) / (aGridOrder - 1.0); + aCurrPnt1(2) = aLower(2) + (aUpper(2) - aLower(2)) * (j - 1) / (aGridOrder - 1.0); + aFunc.Value(aCurrPnt1, aFuncValues(idx)); + idx++; + } + } + + for (int i = 1; i <= aGridOrder; i++) + for (int j = 1; j <= aGridOrder; j++) + for (int k = 1; k <= aGridOrder; k++) + for (int l = 1; l <= aGridOrder; l++) + { + if (i == k && j == l) + continue; + aCurrPnt1(1) = aLower(1) + (aUpper(1) - aLower(1)) * (i - 1) / (aGridOrder - 1.0); + aCurrPnt1(2) = aLower(2) + (aUpper(2) - aLower(2)) * (j - 1) / (aGridOrder - 1.0); + aCurrPnt2(1) = aLower(1) + (aUpper(1) - aLower(1)) * (k - 1) / (aGridOrder - 1.0); + aCurrPnt2(2) = aLower(2) + (aUpper(2) - aLower(2)) * (l - 1) / (aGridOrder - 1.0); + const int idx1 = (i - 1) * aGridOrder + j; + const int idx2 = (k - 1) * aGridOrder + l; + // Use subtracted vector norm for Lipschitz estimation + aCurrPnt1.Add(-aCurrPnt2); + const double aDist = aCurrPnt1.Norm(); + if (aDist > 0.0) + { + const double aC = std::abs(aFuncValues(idx1) - aFuncValues(idx2)) / aDist; + if (aC > aLipConst) + aLipConst = aC; + } + } + + math_GlobOptMin aFinder(&aFunc, aLower, aUpper, aLipConst); + aFinder.Perform(); + + EXPECT_TRUE(aFinder.isDone()) << "Optimizer must converge on Branin function"; + EXPECT_NEAR(aFinder.GetF(), 0.39788735772, 0.1) << "Minimum value of Branin function"; + EXPECT_EQ(aFinder.NbExtrema(), 3) << "Branin function has exactly 3 global minima"; +} diff --git a/src/FoundationClasses/TKMath/GTests/math_Vector_Test.cxx b/src/FoundationClasses/TKMath/GTests/math_Vector_Test.cxx index 0a4cd58751..8a18a9dc09 100644 --- a/src/FoundationClasses/TKMath/GTests/math_Vector_Test.cxx +++ b/src/FoundationClasses/TKMath/GTests/math_Vector_Test.cxx @@ -861,3 +861,45 @@ TEST(MathVectorTest, Resize_NegativeLowerBound) EXPECT_DOUBLE_EQ(aVec(i), static_cast(i)); } } + +// OCC524: math_Vector::Multiply(vector, matrix) and TMultiply(vector, matrix). +// Reference values from the original Draw Harness test: +// Vector(1..6) filled with 5.0, Matrix(1..6, 1..6) filled with 4.0 +// Vector1 = Vector * Matrix -> each component = 6 * 5 * 4 = 120 +// After Matrix(2,1) += 1 (-> 5): +// Vector2 = Vector * Matrix^T -> component 2 = 5*5 + 5*4*5 = 25+100 = 125, rest = 120 + +TEST(MathVectorTest, Multiply_RowVectorByMatrix_AllComponentsEqual) +{ + const int aLow = 1, aHigh = 6; + math_Vector aVec(aLow, aHigh, 5.0); + math_Matrix aMat(aLow, aHigh, aLow, aHigh, 4.0); + math_Vector aResult(aLow, aHigh); + + aResult.Multiply(aVec, aMat); + + for (int i = aLow; i <= aHigh; ++i) + { + EXPECT_DOUBLE_EQ(aResult(i), 120.0); + } +} + +TEST(MathVectorTest, TMultiply_RowVectorByTransposedMatrix_ModifiedComponent) +{ + const int aLow = 1, aHigh = 6; + math_Vector aVec(aLow, aHigh, 5.0); + math_Matrix aMat(aLow, aHigh, aLow, aHigh, 4.0); + math_Vector aResult(aLow, aHigh); + + // Modify one element to create an asymmetry in the transposed multiply + aMat(aLow + 1, aLow) += 1.0; + + aResult.TMultiply(aVec, aMat); + + EXPECT_DOUBLE_EQ(aResult(1), 120.0); + EXPECT_DOUBLE_EQ(aResult(2), 125.0); + for (int i = 3; i <= aHigh; ++i) + { + EXPECT_DOUBLE_EQ(aResult(i), 120.0); + } +} diff --git a/src/FoundationClasses/TKernel/GTests/FILES.cmake b/src/FoundationClasses/TKernel/GTests/FILES.cmake index db757b8220..32bd462d56 100644 --- a/src/FoundationClasses/TKernel/GTests/FILES.cmake +++ b/src/FoundationClasses/TKernel/GTests/FILES.cmake @@ -2,6 +2,7 @@ set(OCCT_TKernel_GTests_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}") set(OCCT_TKernel_GTests_FILES + FSD_BinaryFile_Test.cxx Handle_Advanced_Test.cxx Handle_Operations_Test.cxx Message_Messenger_Test.cxx @@ -30,8 +31,10 @@ set(OCCT_TKernel_GTests_FILES NCollection_SparseArray_Test.cxx NCollection_UBTree_Test.cxx NCollection_Vec4_Test.cxx + OSD_Parallel_Test.cxx OSD_Path_Test.cxx OSD_PerfMeter_Test.cxx + Resource_Manager_Test.cxx Quantity_Color_Test.cxx Quantity_ColorRGBA_Test.cxx Quantity_Date_Test.cxx diff --git a/src/FoundationClasses/TKernel/GTests/FSD_BinaryFile_Test.cxx b/src/FoundationClasses/TKernel/GTests/FSD_BinaryFile_Test.cxx new file mode 100644 index 0000000000..1ca74097e1 --- /dev/null +++ b/src/FoundationClasses/TKernel/GTests/FSD_BinaryFile_Test.cxx @@ -0,0 +1,160 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +#include + +namespace +{ + +// Reference for size_t inversion depending on sizeof(size_t). +template +inline const unsigned char* SizeRef(); + +template <> +[[maybe_unused]] inline const unsigned char* SizeRef<8>() +{ + static const unsigned char aSizeRef[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + return aSizeRef; +} + +template <> +[[maybe_unused]] inline const unsigned char* SizeRef<4>() +{ + static const unsigned char aSizeRef[] = { + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00}; + return aSizeRef; +} + +} // namespace + +// OCC24537: GCC compiler warnings in byte order reversion code. +// Tests correctness of InverseInt, InverseReal, InverseShortReal, InverseSize +// on a little-endian platform. + +TEST(FSD_BinaryFileTest, OCC24537_InverseInt_Sequential) +{ + const unsigned char anIntRef[] = {0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00}; + const int anIntArr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; + + int anInv[10]; + for (int i = 0; i < 10; ++i) + anInv[i] = FSD_BinaryFile::InverseInt(anIntArr[i]); + + EXPECT_EQ(0, memcmp(anInv, anIntRef, sizeof(anIntRef))); +} + +TEST(FSD_BinaryFileTest, OCC24537_InverseInt_Random) +{ + const unsigned char aRndIntRef[] = {0xFF, 0xC2, 0xF7, 0x00, 0xFF, 0xFF, 0xFB, 0x2E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0xD2, + 0x00, 0x00, 0x04, 0xD3, 0xFF, 0xFF, 0xFD, 0x1E, 0xFF, 0xFF, + 0xFF, 0xFB, 0x00, 0x00, 0x03, 0x8D, 0x00, 0x3D, 0x09, 0x00}; + const int aRndIntArr[] = {-4000000, -1234, 0, 1, 1234, 1235, -738, -5, 909, 4000000}; + + int anInv[10]; + for (int i = 0; i < 10; ++i) + anInv[i] = FSD_BinaryFile::InverseInt(aRndIntArr[i]); + + EXPECT_EQ(0, memcmp(anInv, aRndIntRef, sizeof(aRndIntRef))); +} + +TEST(FSD_BinaryFileTest, OCC24537_InverseReal_Sequential) +{ + const unsigned char aRealRef[] = { + 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + const double aRealArr[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 0.0}; + + double anInv[10]; + for (int i = 0; i < 10; ++i) + anInv[i] = FSD_BinaryFile::InverseReal(aRealArr[i]); + + EXPECT_EQ(0, memcmp(anInv, aRealRef, sizeof(aRealRef))); +} + +TEST(FSD_BinaryFileTest, OCC24537_InverseReal_Random) +{ + const unsigned char aRndRealRef[] = { + 0xFE, 0x37, 0xE4, 0x3C, 0x88, 0x00, 0x75, 0x9C, 0xBE, 0x11, 0x2E, 0x0B, 0xE8, 0x26, 0xD6, 0x95, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x11, 0x2E, 0x0B, 0xE8, 0x26, 0xD6, 0x95, + 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x09, 0x21, 0xDA, 0x45, 0x5B, 0x53, 0xE4, + 0x54, 0xB2, 0x49, 0xAD, 0x25, 0x94, 0xC3, 0x7D, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0x23, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0x40, 0x23, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD}; + const double aRndRealArr[] = {-1e300, -1.e-9, 0., 1.e-9, 1., 3.1415296, 1.e100, 8.0, -9.9, 9.9}; + + double anInv[10]; + for (int i = 0; i < 10; ++i) + anInv[i] = FSD_BinaryFile::InverseReal(aRndRealArr[i]); + + EXPECT_EQ(0, memcmp(anInv, aRndRealRef, sizeof(aRndRealRef))); +} + +TEST(FSD_BinaryFileTest, OCC24537_InverseShortReal_Sequential) +{ + const unsigned char aShortRealRef[] = { + 0x3F, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x80, + 0x00, 0x00, 0x40, 0xA0, 0x00, 0x00, 0x40, 0xC0, 0x00, 0x00, 0x40, 0xE0, 0x00, 0x00, + 0x41, 0x00, 0x00, 0x00, 0x41, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + const float aShortRealArr[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 0.0f}; + + float anInv[10]; + for (int i = 0; i < 10; ++i) + anInv[i] = FSD_BinaryFile::InverseShortReal(aShortRealArr[i]); + + EXPECT_EQ(0, memcmp(anInv, aShortRealRef, sizeof(aShortRealRef))); +} + +TEST(FSD_BinaryFileTest, OCC24537_InverseShortReal_Random) +{ + const unsigned char aRndShortRealRef[] = { + 0xB0, 0x89, 0x70, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x70, 0x5F, 0x3F, 0x80, + 0x00, 0x00, 0x40, 0x49, 0x0E, 0x56, 0xC0, 0xD6, 0x66, 0x66, 0x40, 0xD6, 0x66, 0x66, + 0x42, 0xC5, 0xCC, 0xCD, 0xC2, 0xC7, 0xCC, 0xCD, 0x42, 0xC7, 0xCC, 0xCD}; + const float aRndShortRealArr[] = + {-1.e-9f, 0.f, 1.e-9f, 1.f, 3.1415f, -6.7f, 6.7f, 98.9f, -99.9f, 99.9f}; + + float anInv[10]; + for (int i = 0; i < 10; ++i) + anInv[i] = FSD_BinaryFile::InverseShortReal(aRndShortRealArr[i]); + + EXPECT_EQ(0, memcmp(anInv, aRndShortRealRef, sizeof(aRndShortRealRef))); +} + +TEST(FSD_BinaryFileTest, OCC24537_InverseSize_Sequential) +{ + const size_t aSizeArr[] = {1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 0ul}; + const unsigned char* aSizeRef = SizeRef(); + + size_t anInv[10]; + for (int i = 0; i < 10; ++i) + anInv[i] = FSD_BinaryFile::InverseSize(aSizeArr[i]); + + EXPECT_EQ(0, memcmp(anInv, aSizeRef, sizeof(size_t) * 10)); +} diff --git a/src/FoundationClasses/TKernel/GTests/NCollection_DynamicArray_Test.cxx b/src/FoundationClasses/TKernel/GTests/NCollection_DynamicArray_Test.cxx index fce5a63968..696e20f380 100644 --- a/src/FoundationClasses/TKernel/GTests/NCollection_DynamicArray_Test.cxx +++ b/src/FoundationClasses/TKernel/GTests/NCollection_DynamicArray_Test.cxx @@ -910,4 +910,23 @@ TEST(NCollection_DynamicArrayTest, IntAndSizeTOverloadsAgree) { EXPECT_EQ(aVecInt.Value(i), aVecSize.Value(static_cast(i))); } -} \ No newline at end of file +} + +// OCC7639: NCollection_DynamicArray must handle out-of-order SetValue calls +// (sparse / rare data) correctly and preserve all assigned values. +// The draw test called: OCC7639 0 1 2 500 1 2 +// SetValue(0, 1), SetValue(2, 500), SetValue(1, 2) +// Expected iterator output (j, value): 0->1, 1->2, 2->500 + +TEST(NCollection_DynamicArrayTest, SetValue_OutOfOrderIndices_CorrectValues) +{ + NCollection_DynamicArray aVec; + aVec.SetValue(0, 1); + aVec.SetValue(2, 500); + aVec.SetValue(1, 2); + + ASSERT_EQ(aVec.Size(), 3); + EXPECT_EQ(aVec.Value(0), 1); + EXPECT_EQ(aVec.Value(1), 2); + EXPECT_EQ(aVec.Value(2), 500); +} diff --git a/src/FoundationClasses/TKernel/GTests/OSD_Parallel_Test.cxx b/src/FoundationClasses/TKernel/GTests/OSD_Parallel_Test.cxx new file mode 100644 index 0000000000..505d246cb2 --- /dev/null +++ b/src/FoundationClasses/TKernel/GTests/OSD_Parallel_Test.cxx @@ -0,0 +1,240 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include + +#include + +#include +#include + +namespace +{ + +// SAXPY functor: Y[i] = scalar * X[i] + Y[i] +class SaxpyFunctor +{ +public: + SaxpyFunctor(const NCollection_Array1& theX, + NCollection_Array1& theY, + double theScalar) + : myX(theX), + myY(theY), + myScalar(theScalar) + { + } + + int Begin() const { return 0; } + + int End() const { return myX.Length(); } + + void operator()(int theIndex) const { myY(theIndex) = myScalar * myX(theIndex) + myY(theIndex); } + + void operator()(int /*theThreadIndex*/, int theIndex) const { (*this)(theIndex); } + +private: + SaxpyFunctor(const SaxpyFunctor&) = delete; + SaxpyFunctor& operator=(SaxpyFunctor&) = delete; + + const NCollection_Array1& myX; + NCollection_Array1& myY; + double myScalar; +}; + +// Batched SAXPY functor for large vectors +class SaxpyBatchFunctor +{ +public: + static const int THE_BATCH_SIZE = 100000; + + SaxpyBatchFunctor(const NCollection_Array1& theX, + NCollection_Array1& theY, + double theScalar) + : myX(theX), + myY(theY), + myScalar(theScalar), + myNbBatches((int)std::ceil((double)theX.Size() / THE_BATCH_SIZE)) + { + } + + int Begin() const { return 0; } + + int End() const { return myNbBatches; } + + void operator()(int theBatchIndex) const + { + const int aLower = theBatchIndex * THE_BATCH_SIZE; + const int anUpper = std::min(aLower + THE_BATCH_SIZE - 1, myX.Upper()); + for (int i = aLower; i <= anUpper; ++i) + myY(i) = myScalar * myX(i) + myY(i); + } + + void operator()(int /*theThreadIndex*/, int theBatchIndex) const { (*this)(theBatchIndex); } + +private: + SaxpyBatchFunctor(const SaxpyBatchFunctor&) = delete; + SaxpyBatchFunctor& operator=(SaxpyBatchFunctor&) = delete; + + const NCollection_Array1& myX; + NCollection_Array1& myY; + double myScalar; + int myNbBatches; +}; + +// Matrix multiplication functor: result(i,j) = sum_k mat1(i,k)*mat2(k,j) +class MatMultFunctor +{ +public: + MatMultFunctor(const NCollection_Array2& theMat1, + const NCollection_Array2& theMat2, + NCollection_Array2& theResult, + int theSize) + : myMat1(theMat1), + myMat2(theMat2), + myResult(theResult), + mySize(theSize) + { + } + + int Begin() const { return 0; } + + int End() const { return mySize; } + + void operator()(int theIndex) const + { + for (int j = 0; j < mySize; ++j) + { + double aTmp = 0.0; + for (int k = 0; k < mySize; ++k) + aTmp += myMat1(theIndex, k) * myMat2(k, j); + myResult(theIndex, j) = aTmp; + } + } + + void operator()(int /*theThreadIndex*/, int theIndex) const { (*this)(theIndex); } + +private: + MatMultFunctor(const MatMultFunctor&) = delete; + MatMultFunctor& operator=(MatMultFunctor&) = delete; + + const NCollection_Array2& myMat1; + const NCollection_Array2& myMat2; + NCollection_Array2& myResult; + int mySize; +}; + +} // namespace + +// Tests that OSD_Parallel::For and OSD_ThreadPool::Launcher produce the same +// result as sequential SAXPY Y[i] = scalar * X[i] + Y[i] (OCC24826). +TEST(OSD_ParallelTest, OCC24826_SaxpyParallelMatchesSequential) +{ + const int aLength = 500000; + + NCollection_Array1 aX(0, aLength - 1); + NCollection_Array1 anYRef(0, aLength - 1); + for (int i = 0; i < aLength; ++i) + aX(i) = anYRef(i) = static_cast(i); + + // Sequential reference + { + const SaxpyFunctor aFunctor(aX, anYRef, 1e-6); + for (int i = 0; i < aLength; ++i) + aFunctor(i); + } + + // OSD_Parallel::For + { + NCollection_Array1 anY = aX; + for (int i = 0; i < aLength; ++i) + anY(i) = static_cast(i); + SaxpyFunctor aFunctor(aX, anY, 1e-6); + OSD_Parallel::For(aFunctor.Begin(), aFunctor.End(), aFunctor); + for (int i = 0; i < aLength; ++i) + EXPECT_DOUBLE_EQ(anY(i), anYRef(i)) << "Mismatch at index " << i; + } + + // OSD_ThreadPool::Launcher + { + NCollection_Array1 anY = aX; + for (int i = 0; i < aLength; ++i) + anY(i) = static_cast(i); + SaxpyFunctor aFunctor(aX, anY, 1e-6); + OSD_ThreadPool::Launcher aLauncher(*OSD_ThreadPool::DefaultPool()); + aLauncher.Perform(aFunctor.Begin(), aFunctor.End(), aFunctor); + for (int i = 0; i < aLength; ++i) + EXPECT_DOUBLE_EQ(anY(i), anYRef(i)) << "Mismatch at index " << i; + } + + // OSD_Parallel::For with batched functor + { + NCollection_Array1 anY = aX; + for (int i = 0; i < aLength; ++i) + anY(i) = static_cast(i); + SaxpyBatchFunctor aFunctor(aX, anY, 1e-6); + OSD_Parallel::For(aFunctor.Begin(), aFunctor.End(), aFunctor); + for (int i = 0; i < aLength; ++i) + EXPECT_DOUBLE_EQ(anY(i), anYRef(i)) << "Mismatch at index " << i; + } +} + +// Tests that OSD_Parallel::For and OSD_ThreadPool::Launcher produce the same +// result as sequential matrix multiplication (OCC29935). +TEST(OSD_ParallelTest, OCC29935_MatrixMultiplyParallelMatchesSequential) +{ + const int aSize = 50; + + std::mt19937 aGen(42); + NCollection_Array2 aMat1(0, aSize - 1, 0, aSize - 1); + NCollection_Array2 aMat2(0, aSize - 1, 0, aSize - 1); + NCollection_Array2 aMatRef(0, aSize - 1, 0, aSize - 1); + NCollection_Array2 aMatRes(0, aSize - 1, 0, aSize - 1); + + for (int i = 0; i < aSize; ++i) + for (int j = 0; j < aSize; ++j) + { + aMat1(i, j) = static_cast(aGen() % 1000); + aMat2(i, j) = static_cast(aGen() % 1000); + } + + // Sequential reference + { + MatMultFunctor aFunctor(aMat1, aMat2, aMatRef, aSize); + for (int i = aFunctor.Begin(); i < aFunctor.End(); ++i) + aFunctor(i); + } + + // OSD_Parallel::For + { + aMatRes.Init(0.0); + MatMultFunctor aFunctor(aMat1, aMat2, aMatRes, aSize); + OSD_Parallel::For(aFunctor.Begin(), aFunctor.End(), aFunctor); + for (int i = 0; i < aSize; ++i) + for (int j = 0; j < aSize; ++j) + EXPECT_DOUBLE_EQ(aMatRes(i, j), aMatRef(i, j)); + } + + // OSD_ThreadPool::Launcher + { + aMatRes.Init(0.0); + MatMultFunctor aFunctor(aMat1, aMat2, aMatRes, aSize); + OSD_ThreadPool::Launcher aLauncher(*OSD_ThreadPool::DefaultPool()); + aLauncher.Perform(aFunctor.Begin(), aFunctor.End(), aFunctor); + for (int i = 0; i < aSize; ++i) + for (int j = 0; j < aSize; ++j) + EXPECT_DOUBLE_EQ(aMatRes(i, j), aMatRef(i, j)); + } +} diff --git a/src/FoundationClasses/TKernel/GTests/Resource_Manager_Test.cxx b/src/FoundationClasses/TKernel/GTests/Resource_Manager_Test.cxx new file mode 100644 index 0000000000..76d11bb1d7 --- /dev/null +++ b/src/FoundationClasses/TKernel/GTests/Resource_Manager_Test.cxx @@ -0,0 +1,138 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +#include +#include + +namespace +{ +//! Returns a platform-independent temp base directory for tests. +std::filesystem::path getTempBase() +{ + return std::filesystem::temp_directory_path() / "occt_resource_manager_test"; +} + +//! Writes a minimal resource file containing one entry: key : value +void writeResourceFile(const std::filesystem::path& theDir, + const std::string& theFileName, + const std::string& theKey, + const std::string& theValue) +{ + std::filesystem::create_directories(theDir); + std::ofstream aFile(theDir / theFileName); + aFile << theKey << " : " << theValue << "\n"; +} +} // namespace + +class Resource_ManagerTest : public testing::Test +{ +protected: + void SetUp() override { std::filesystem::remove_all(getTempBase()); } + + void TearDown() override { std::filesystem::remove_all(getTempBase()); } +}; + +//! Sets CSF_UserDefaults environment variable to theDir. +static void setUserDefaultsEnv(const std::string& theFileName, const std::filesystem::path& theDir) +{ + const std::string anEnvName = "CSF_" + theFileName + "UserDefaults"; + OSD_Environment anEnv(anEnvName.c_str()); + anEnv.SetValue(TCollection_AsciiString(theDir.string().c_str())); + anEnv.Build(); +} + +// Test OCC27849: Resource_Manager correctly reads resource files located in +// directories whose names contain dots, spaces, or multiple path segments. +TEST_F(Resource_ManagerTest, OCC27849_PathsWithSpecialChars) +{ + const std::string aResourceName = "TestResource"; + const std::string aKey = "test.resource"; + const std::string aExpected = "ok"; + + const std::vector aPaths = { + "path", + "path.with.dots", + "path with spaces", + "nested/dirs/path with spaces", + }; + + for (const std::string& aRelPath : aPaths) + { + std::filesystem::path aDir = getTempBase() / aRelPath; + writeResourceFile(aDir, aResourceName, aKey, aExpected); + + // Point the env variable to the directory containing the resource file + OSD_Environment anEnv("CSF_TestResourceDefaults"); + anEnv.SetValue(TCollection_AsciiString(aDir.string().c_str())); + anEnv.Build(); + + Resource_Manager aManager(aResourceName.c_str()); + + EXPECT_TRUE(aManager.Find(aKey.c_str())) << "Resource key not found in path: " << aDir.string(); + + if (aManager.Find(aKey.c_str())) + { + EXPECT_STREQ(aManager.Value(aKey.c_str()), aExpected.c_str()) + << "Wrong resource value for path: " << aDir.string(); + } + } +} + +// Test OCC181 (case 1): Resource_Manager::Save() succeeds when the target user-defaults +// directory already exists (flat path). +TEST_F(Resource_ManagerTest, OCC181_SaveToExistingDirectory) +{ + const std::string aFileName = "OCC181"; + + const std::filesystem::path aSourceDir = getTempBase() / "source"; + const std::filesystem::path aSaveDir = getTempBase() / "save_flat"; + + writeResourceFile(aSourceDir, aFileName, "test.key", "test_value"); + std::filesystem::create_directories(aSaveDir); + + setUserDefaultsEnv(aFileName, aSourceDir); + Resource_Manager aManager(aFileName.c_str()); + + // Redirect Save() to a different directory + setUserDefaultsEnv(aFileName, aSaveDir); + EXPECT_TRUE(aManager.Save()); + EXPECT_TRUE(std::filesystem::exists(aSaveDir / aFileName)) + << "Saved resource file not found in " << aSaveDir.string(); +} + +// Test OCC181 (case 2): Resource_Manager::Save() succeeds and creates intermediate +// directories when the target user-defaults path does not yet exist (nested path). +TEST_F(Resource_ManagerTest, OCC181_SaveToNestedNonExistentDirectory) +{ + const std::string aFileName = "OCC181"; + + const std::filesystem::path aSourceDir = getTempBase() / "source2"; + const std::filesystem::path aSaveDir = getTempBase() / "nested" / "deep" / "dir"; + + writeResourceFile(aSourceDir, aFileName, "test.key", "test_value"); + + setUserDefaultsEnv(aFileName, aSourceDir); + Resource_Manager aManager(aFileName.c_str()); + + // Redirect Save() to a nested path that does not yet exist + setUserDefaultsEnv(aFileName, aSaveDir); + EXPECT_TRUE(aManager.Save()); + EXPECT_TRUE(std::filesystem::exists(aSaveDir / aFileName)) + << "Saved resource file not found in nested path " << aSaveDir.string(); +} diff --git a/src/FoundationClasses/TKernel/GTests/TCollection_ExtendedString_Test.cxx b/src/FoundationClasses/TKernel/GTests/TCollection_ExtendedString_Test.cxx index 27e0cae0ea..8d89b3bd2e 100644 --- a/src/FoundationClasses/TKernel/GTests/TCollection_ExtendedString_Test.cxx +++ b/src/FoundationClasses/TKernel/GTests/TCollection_ExtendedString_Test.cxx @@ -1086,3 +1086,39 @@ TEST(TCollection_ExtendedStringTest, EndsWith_ZeroLength) // Any string ends with empty string EXPECT_TRUE(aString.EndsWith(nullptr, 0)); } + +// ======================================== +// Tests for StartsWith/EndsWith bug fix (0030536) +// ======================================== + +TEST(TCollection_ExtendedStringTest, StartsWith_NoMatchLongerPrefix) +{ + // "hello" does NOT start with "help" + const TCollection_ExtendedString aStr("hello"); + const TCollection_ExtendedString aPrefix("help"); + EXPECT_FALSE(aStr.StartsWith(aPrefix)); +} + +TEST(TCollection_ExtendedStringTest, StartsWith_Match) +{ + // "hello" DOES start with "he" + const TCollection_ExtendedString aStr("hello"); + const TCollection_ExtendedString aPrefix("he"); + EXPECT_TRUE(aStr.StartsWith(aPrefix)); +} + +TEST(TCollection_ExtendedStringTest, EndsWith_NoMatchMiddlePart) +{ + // "hello" does NOT end with "ll" + const TCollection_ExtendedString aStr("hello"); + const TCollection_ExtendedString aSuffix("ll"); + EXPECT_FALSE(aStr.EndsWith(aSuffix)); +} + +TEST(TCollection_ExtendedStringTest, EndsWith_Match) +{ + // "hello" DOES end with "lo" + const TCollection_ExtendedString aStr("hello"); + const TCollection_ExtendedString aSuffix("lo"); + EXPECT_TRUE(aStr.EndsWith(aSuffix)); +} diff --git a/src/ModelingAlgorithms/TKBool/GTests/BRepAlgoAPI_Cut_Test.cxx b/src/ModelingAlgorithms/TKBool/GTests/BRepAlgoAPI_Cut_Test.cxx new file mode 100644 index 0000000000..2f958ddf45 --- /dev/null +++ b/src/ModelingAlgorithms/TKBool/GTests/BRepAlgoAPI_Cut_Test.cxx @@ -0,0 +1,204 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//! Runs OCC817 test: creates hollow box (30x30x30 outer minus 10x10x10 inner), +//! grids the bounding box into cells of theMeshDelta size, computes +//! BRepAlgoAPI_Common of the solid with each cell, and returns +//! the ratio of accumulated meshed volume to original volume. +//! Returns -1.0 on failure. +static double runHollowBoxMeshTest(double theMeshDelta) +{ + constexpr double aDelt = 5.0 * Precision::Confusion(); + + // Create outer box solid + const TopoDS_Solid aFullSolid = BRepPrimAPI_MakeBox(gp_Pnt(0, 0, 0), 30.0, 30.0, 30.0).Solid(); + + // Create inner box solid + const TopoDS_Solid anInnerSolid = + BRepPrimAPI_MakeBox(gp_Pnt(10, 10, 10), 10.0, 10.0, 10.0).Solid(); + + // Cut inner from outer + BRepAlgoAPI_Cut aCut(aFullSolid, anInnerSolid); + if (!aCut.IsDone()) + return -1.0; + + // Extract the single solid from the cut result + TopoDS_Solid aCutSolid; + int aNbSolids = 0; + TopExp_Explorer anExp; + for (anExp.Init(aCut.Shape(), TopAbs_SOLID); anExp.More(); anExp.Next()) + { + const TopoDS_Solid& aSol = TopoDS::Solid(anExp.Current()); + if (!aSol.IsNull()) + { + aCutSolid = aSol; + aNbSolids++; + } + } + if (aNbSolids != 1) + return -1.0; + + // Calculate original volume + GProp_GProps aVProps; + BRepGProp::VolumeProperties(aCutSolid, aVProps); + const double anOriginalVolume = aVProps.Mass(); + if (anOriginalVolume <= 0.0) + return -1.0; + + // Build bounding box and extend by small delta + Bnd_Box aBndBox; + BRepBndLib::Add(aCutSolid, aBndBox); + double aXmin, aYmin, aZmin, aXmax, aYmax, aZmax; + aBndBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); + aXmin -= aDelt; + aYmin -= aDelt; + aZmin -= aDelt; + aXmax += aDelt; + aYmax += aDelt; + aZmax += aDelt; + + // Grid the bounding box + int aNx = (int)((aXmax - aXmin) / theMeshDelta); + if (aNx <= 0) + aNx = 1; + int aNy = (int)((aYmax - aYmin) / theMeshDelta); + if (aNy <= 0) + aNy = 1; + int aNz = (int)((aZmax - aZmin) / theMeshDelta); + if (aNz <= 0) + aNz = 1; + + const double aStepX = (aXmax - aXmin) / aNx; + const double aStepY = (aYmax - aYmin) / aNy; + const double aStepZ = (aZmax - aZmin) / aNz; + const int aNbSubvols = aNx * aNy * aNz; + + NCollection_Array1 aSubvols(0, aNbSubvols - 1); + NCollection_Array1 aSubvolVols(0, aNbSubvols - 1); + + // Build grid cells + int l = 0; + for (int i = 0; i < aNx; i++) + { + for (int j = 0; j < aNy; j++) + { + for (int k = 0; k < aNz; k++) + { + const gp_Pnt aPnt(aXmin + i * aStepX, aYmin + j * aStepY, aZmin + k * aStepZ); + aSubvols.SetValue(l, BRepPrimAPI_MakeBox(aPnt, aStepX, aStepY, aStepZ).Solid()); + BRepGProp::VolumeProperties(aSubvols(l), aVProps); + aSubvolVols.SetValue(l, aVProps.Mass()); + l++; + } + } + } + + // Compute common of solid with each grid cell, accumulate volumes + double anAccumulated = 0.0; + for (l = 0; l < aNbSubvols; l++) + { + const TopoDS_Shape aCopySolid = BRepBuilderAPI_Copy(aCutSolid).Shape(); + BRepAlgoAPI_Common aCommon(aCopySolid, aSubvols(l)); + if (!aCommon.IsDone()) + continue; + + int aNbCommon = 0; + TopoDS_Shape aFoundSolid; + for (anExp.Init(aCommon.Shape(), TopAbs_SOLID); anExp.More(); anExp.Next()) + { + const TopoDS_Solid& aSol = TopoDS::Solid(anExp.Current()); + if (!aSol.IsNull()) + { + aFoundSolid = aSol; + aNbCommon++; + } + } + if (aNbCommon == 1) + { + BRepGProp::VolumeProperties(aFoundSolid, aVProps); + const double aVol = aVProps.Mass(); + if (aVol > 0.0 && aVol <= aSubvolVols(l)) + anAccumulated += aVol; + } + } + + return anAccumulated / anOriginalVolume; +} + +// OCC817: BRepAlgoAPI_Common result accuracy with hollow box using mesh_delta=10. +TEST(BRepAlgoAPI_CutTest, HollowBox_VolumeAccuracy_Delta10) +{ + const double aRatio = runHollowBoxMeshTest(10.0); + ASSERT_GE(aRatio, 0.0) << "Cut or Common operation failed"; + EXPECT_NEAR(aRatio, 1.0, 0.001) << "Accumulated meshed volume differs from original by > 0.1%"; +} + +// OCC817: BRepAlgoAPI_Common result accuracy with hollow box using mesh_delta=15. +TEST(BRepAlgoAPI_CutTest, HollowBox_VolumeAccuracy_Delta15) +{ + const double aRatio = runHollowBoxMeshTest(15.0); + ASSERT_GE(aRatio, 0.0) << "Cut or Common operation failed"; + EXPECT_NEAR(aRatio, 1.0, 0.001) << "Accumulated meshed volume differs from original by > 0.1%"; +} + +// OCC817: BRepAlgoAPI_Common result accuracy with hollow box using mesh_delta=30. +TEST(BRepAlgoAPI_CutTest, HollowBox_VolumeAccuracy_Delta30) +{ + const double aRatio = runHollowBoxMeshTest(30.0); + ASSERT_GE(aRatio, 0.0) << "Cut or Common operation failed"; + EXPECT_NEAR(aRatio, 1.0, 0.001) << "Accumulated meshed volume differs from original by > 0.1%"; +} + +// OCC817: hollow box has correct surface area and valid shape. +// Outer 30x30x30 has area 6*900=5400; inner 10x10x10 hole adds 6*100=600; total=6000. +TEST(BRepAlgoAPI_CutTest, HollowBox_SurfaceAreaAndValidity) +{ + const TopoDS_Solid aFullSolid = BRepPrimAPI_MakeBox(gp_Pnt(0, 0, 0), 30.0, 30.0, 30.0).Solid(); + const TopoDS_Solid anInnerSolid = + BRepPrimAPI_MakeBox(gp_Pnt(10, 10, 10), 10.0, 10.0, 10.0).Solid(); + + BRepAlgoAPI_Cut aCut(aFullSolid, anInnerSolid); + ASSERT_TRUE(aCut.IsDone()); + + // Extract solid + TopoDS_Solid aCutSolid; + TopExp_Explorer anExp; + for (anExp.Init(aCut.Shape(), TopAbs_SOLID); anExp.More(); anExp.Next()) + aCutSolid = TopoDS::Solid(anExp.Current()); + ASSERT_FALSE(aCutSolid.IsNull()); + + // Surface area: outer box 6*900=5400, inner box adds 6*100=600 => total=6000 + GProp_GProps aSProps; + BRepGProp::SurfaceProperties(aCutSolid, aSProps); + EXPECT_NEAR(aSProps.Mass(), 6000.0, 6.0); // 0.1% tolerance + + BRepCheck_Analyzer aChecker(aCutSolid); + EXPECT_TRUE(aChecker.IsValid()); +} diff --git a/src/ModelingAlgorithms/TKBool/GTests/BRepAlgoAPI_Fuse_Test.cxx b/src/ModelingAlgorithms/TKBool/GTests/BRepAlgoAPI_Fuse_Test.cxx new file mode 100644 index 0000000000..6f7d59c22c --- /dev/null +++ b/src/ModelingAlgorithms/TKBool/GTests/BRepAlgoAPI_Fuse_Test.cxx @@ -0,0 +1,204 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// OCC822_1: BRepMesh_IncrementalMesh correctness test - boolean operations with cylinders and +// cones. Creates two pairs (inner/outer) of cylinders and cones, fuses each pair, then cuts inner +// from outer. +TEST(BRepAlgoAPI_FuseTest, CylinderAndCone_FuseThenCut) +{ + const gp_Ax2 anAxis1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)); + const TopoDS_Shape aCylIn = BRepPrimAPI_MakeCylinder(anAxis1, 40, 110).Shape(); + const TopoDS_Shape aCylOut = BRepPrimAPI_MakeCylinder(anAxis1, 50, 100).Shape(); + + const gp_Ax2 anAxis2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::NZ)); + const TopoDS_Shape aConIn = BRepPrimAPI_MakeCone(anAxis2, 40, 60, 110).Shape(); + const TopoDS_Shape aConOut = BRepPrimAPI_MakeCone(anAxis2, 50, 70, 100).Shape(); + + BRepAlgoAPI_Fuse aFuseIn(aCylIn, aConIn); + ASSERT_TRUE(aFuseIn.IsDone()); + + BRepAlgoAPI_Fuse aFuseOut(aCylOut, aConOut); + ASSERT_TRUE(aFuseOut.IsDone()); + + BRepAlgoAPI_Cut aCut(aFuseOut.Shape(), aFuseIn.Shape()); + ASSERT_TRUE(aCut.IsDone()); + + const TopoDS_Shape aResult = aCut.Shape(); + ASSERT_FALSE(aResult.IsNull()); + + GProp_GProps aSProps; + BRepGProp::SurfaceProperties(aResult, aSProps); + EXPECT_NEAR(aSProps.Mass(), 133931.0, 133.931); // 0.1% tolerance + + BRepCheck_Analyzer aChecker(aResult); + EXPECT_TRUE(aChecker.IsValid()); +} + +// OCC822_2: BRepMesh_IncrementalMesh correctness test - fuse of box and sphere. +TEST(BRepAlgoAPI_FuseTest, BoxAndSphere) +{ + const TopoDS_Shape aBox = BRepPrimAPI_MakeBox(gp_Pnt(0, 0, 0), gp_Pnt(100, 100, 100)).Shape(); + const TopoDS_Shape aSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100, 50, 50), 25.0).Shape(); + + BRepAlgoAPI_Fuse aFuse(aBox, aSphere); + ASSERT_TRUE(aFuse.IsDone()); + + const TopoDS_Shape aResult = aFuse.Shape(); + ASSERT_FALSE(aResult.IsNull()); + + GProp_GProps aSProps; + BRepGProp::SurfaceProperties(aResult, aSProps); + EXPECT_NEAR(aSProps.Mass(), 61963.5, 61.9635); // 0.1% tolerance + + BRepCheck_Analyzer aChecker(aResult); + EXPECT_TRUE(aChecker.IsValid()); +} + +// OCC823: BRepAlgoAPI_Fuse correctness test - fuse of two nearly-parallel cylinders. +TEST(BRepAlgoAPI_FuseTest, TwoCylinders) +{ + const gp_Ax2 anAxis1(gp_Pnt(40, 50, 0), gp_Dir(100, 0, 0)); + const TopoDS_Shape aCyl1 = BRepPrimAPI_MakeCylinder(anAxis1, 20, 100).Shape(); + + constexpr double aSize = 0.001; + const gp_Ax2 anAxis2(gp_Pnt(100, 50, aSize), gp_Dir(0, aSize, 80)); + const TopoDS_Shape aCyl2 = BRepPrimAPI_MakeCylinder(anAxis2, 20, 80).Shape(); + + BRepAlgoAPI_Fuse aFuse(aCyl2, aCyl1); + ASSERT_TRUE(aFuse.IsDone()); + + const TopoDS_Shape aResult = aFuse.Shape(); + ASSERT_FALSE(aResult.IsNull()); + + GProp_GProps aSProps; + BRepGProp::SurfaceProperties(aResult, aSProps); + EXPECT_NEAR(aSProps.Mass(), 23189.5, 23.1895); // 0.1% tolerance + + BRepCheck_Analyzer aChecker(aResult); + EXPECT_TRUE(aChecker.IsValid()); +} + +// OCC824: BRepAlgoAPI_Fuse correctness test - fuse of cylinder and sphere. +TEST(BRepAlgoAPI_FuseTest, CylinderAndSphere) +{ + const gp_Pnt aCenter(100, 0, 0); + const gp_Ax2 anAxis(aCenter, gp_Dir(gp_Dir::D::NX)); + const TopoDS_Shape aCyl = BRepPrimAPI_MakeCylinder(anAxis, 20, 100).Shape(); + const TopoDS_Shape aSphere = BRepPrimAPI_MakeSphere(aCenter, 20.0).Shape(); + + BRepAlgoAPI_Fuse aFuse(aCyl, aSphere); + ASSERT_TRUE(aFuse.IsDone()); + + const TopoDS_Shape aResult = aFuse.Shape(); + ASSERT_FALSE(aResult.IsNull()); + + GProp_GProps aSProps; + BRepGProp::SurfaceProperties(aResult, aSProps); + EXPECT_NEAR(aSProps.Mass(), 16336.3, 16.3363); // 0.1% tolerance + + BRepCheck_Analyzer aChecker(aResult); + EXPECT_TRUE(aChecker.IsValid()); +} + +// OCC826: BRepAlgoAPI_Fuse correctness test - fuse of revolved face and sphere. +// Intersection line passes near the pole of the sphere. +TEST(BRepAlgoAPI_FuseTest, RevolvedFaceAndSphere) +{ + BRepBuilderAPI_MakePolygon aWire; + const double aX1 = 181.82808, aX2 = 202.39390; + const double aY1 = 31.011970, aY2 = 123.06856; + aWire.Add(gp_Pnt(aX1, aY1, 0)); + aWire.Add(gp_Pnt(aX2, aY1, 0)); + aWire.Add(gp_Pnt(aX2, aY2, 0)); + aWire.Add(gp_Pnt(aX1, aY2, 0)); + aWire.Add(gp_Pnt(aX1, aY1, 0)); + + const TopoDS_Face aFace = BRepBuilderAPI_MakeFace(aWire.Wire(), false); + const gp_Ax1 anAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 30, 0)); + const TopoDS_Shape aRevol = BRepPrimAPI_MakeRevol(aFace, anAxis, 2.0 * M_PI).Shape(); + const TopoDS_Shape aSphere = + BRepPrimAPI_MakeSphere(gp_Pnt(166.373, 77.0402, 96.0555), 23.218586).Shape(); + + BRepAlgoAPI_Fuse aFuse(aRevol, aSphere); + ASSERT_TRUE(aFuse.IsDone()); + + const TopoDS_Shape aResult = aFuse.Shape(); + ASSERT_FALSE(aResult.IsNull()); + + GProp_GProps aSProps; + BRepGProp::SurfaceProperties(aResult, aSProps); + EXPECT_NEAR(aSProps.Mass(), 272935.0, 272.935); // 0.1% tolerance + + BRepCheck_Analyzer aChecker(aResult); + EXPECT_TRUE(aChecker.IsValid()); +} + +// OCC827: BRepAlgoAPI_Fuse correctness test - fuse of revolved solid with two tori. +TEST(BRepAlgoAPI_FuseTest, RevolvedSolidAndTwoTori) +{ + BRepBuilderAPI_MakePolygon aWire; + aWire.Add(gp_Pnt(10, 0, 0)); + aWire.Add(gp_Pnt(20, 0, 0)); + aWire.Add(gp_Pnt(20, 0, 50)); + aWire.Add(gp_Pnt(10, 0, 50)); + aWire.Add(gp_Pnt(10, 0, 0)); + + const TopoDS_Face aFace = BRepBuilderAPI_MakeFace(aWire.Wire(), false); + const gp_Ax1 anAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 30)); + const TopoDS_Shape aRevol = BRepPrimAPI_MakeRevol(aFace, anAxis, 2.0 * M_PI).Shape(); + + constexpr double aMajRad = 15.0; + constexpr double aMinRad = 5.0; + + const TopoDS_Shape aTor1 = + BRepPrimAPI_MakeTorus(gp_Ax2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 30)), aMajRad, aMinRad).Shape(); + const TopoDS_Shape aTor2 = + BRepPrimAPI_MakeTorus(gp_Ax2(gp_Pnt(0, 0, 10), gp_Dir(0, 0, 30)), aMajRad, aMinRad).Shape(); + + BRepAlgoAPI_Fuse aFuse1(aTor1, aRevol); + ASSERT_TRUE(aFuse1.IsDone()); + + BRepAlgoAPI_Fuse aFuse2(aTor2, aFuse1.Shape()); + ASSERT_TRUE(aFuse2.IsDone()); + + const TopoDS_Shape aResult = aFuse2.Shape(); + ASSERT_FALSE(aResult.IsNull()); + + GProp_GProps aSProps; + BRepGProp::SurfaceProperties(aResult, aSProps); + EXPECT_NEAR(aSProps.Mass(), 11847.7, 11.8477); // 0.1% tolerance + + BRepCheck_Analyzer aChecker(aResult); + EXPECT_TRUE(aChecker.IsValid()); +} diff --git a/src/ModelingAlgorithms/TKBool/GTests/BRepAlgoAPI_Section_Test.cxx b/src/ModelingAlgorithms/TKBool/GTests/BRepAlgoAPI_Section_Test.cxx new file mode 100644 index 0000000000..7315c3674a --- /dev/null +++ b/src/ModelingAlgorithms/TKBool/GTests/BRepAlgoAPI_Section_Test.cxx @@ -0,0 +1,35 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include + +// Test OCCN2: BRepAlgoAPI_Section of a cylinder intersecting a sphere. +// Migrated from QABugs_17.cxx OCCN2 +TEST(BRepAlgoAPI_SectionTest, OCCN2_CylinderSphereSectionIsDone) +{ + BRepPrimAPI_MakeCylinder aCylMaker(50., 200.); + const TopoDS_Shape& aCylinder = aCylMaker.Shape(); + + BRepPrimAPI_MakeSphere aSphereMaker(gp_Pnt(60., 0., 100.), 50.); + const TopoDS_Shape& aSphere = aSphereMaker.Shape(); + + BRepAlgoAPI_Section aSection(aCylinder, aSphere); + EXPECT_TRUE(aSection.IsDone()); + EXPECT_FALSE(aSection.Shape().IsNull()); +} diff --git a/src/ModelingAlgorithms/TKBool/GTests/FILES.cmake b/src/ModelingAlgorithms/TKBool/GTests/FILES.cmake index 207a8a6fa1..35beaf4fdd 100644 --- a/src/ModelingAlgorithms/TKBool/GTests/FILES.cmake +++ b/src/ModelingAlgorithms/TKBool/GTests/FILES.cmake @@ -2,5 +2,9 @@ set(OCCT_TKBool_GTests_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}") set(OCCT_TKBool_GTests_FILES + BRepAlgoAPI_Cut_Test.cxx + BRepAlgoAPI_Fuse_Test.cxx + BRepAlgoAPI_Section_Test.cxx BRepFill_PipeShell_Test.cxx + IntTools_FaceFace_Test.cxx ) diff --git a/src/ModelingAlgorithms/TKBool/GTests/IntTools_FaceFace_Test.cxx b/src/ModelingAlgorithms/TKBool/GTests/IntTools_FaceFace_Test.cxx new file mode 100644 index 0000000000..ba5e3ff62d --- /dev/null +++ b/src/ModelingAlgorithms/TKBool/GTests/IntTools_FaceFace_Test.cxx @@ -0,0 +1,61 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Test OCC24005: IntTools_FaceFace should complete quickly and correctly when +// intersecting a slightly off-angle plane with a cylinder. Previously took 7+ seconds. +TEST(IntTools_FaceFaceTest, OCC24005_PlaneCylinderIntersection) +{ + // Hardcoded geometry from the original regression test + Handle(Geom_Plane) aPlane = new Geom_Plane( + gp_Ax3(gp_Pnt(-72.948737453424499, 754.30437716359393, 259.52151854671678), + gp_Dir(6.2471473085930200e-007, -0.99999999999980493, 0.00000000000000000), + gp_Dir(0.99999999999980493, 6.2471473085930200e-007, 0.00000000000000000))); + + Handle(Geom_CylindricalSurface) aCylinder = new Geom_CylindricalSurface( + gp_Ax3(gp_Pnt(-6.4812490053250649, 753.39408794522092, 279.16400974257465), + gp_Dir(1.0000000000000000, 0.0, 0.00000000000000000), + gp_Dir(0.0, 1.0000000000000000, 0.00000000000000000)), + 19.712534607908712); + + BRep_Builder aBuilder; + TopoDS_Face aFace1, aFace2; + aBuilder.MakeFace(aFace1, aPlane, Precision::Confusion()); + aBuilder.MakeFace(aFace2, aCylinder, Precision::Confusion()); + + IntTools_FaceFace anInters; + anInters.SetParameters(false, true, true, Precision::Confusion()); + anInters.Perform(aFace1, aFace2); + + ASSERT_TRUE(anInters.IsDone()) << "IntTools_FaceFace::Perform did not complete"; + + // The original test verified that intersection completes without hanging. + // Check that we get at least one intersection curve. + const NCollection_Sequence& aCurves = anInters.Lines(); + EXPECT_GE(aCurves.Length() + anInters.Points().Length(), 1) + << "Expected at least one intersection result (curve or point)"; +} diff --git a/src/ModelingAlgorithms/TKExpress/GTests/Expr_GeneralExpression_Test.cxx b/src/ModelingAlgorithms/TKExpress/GTests/Expr_GeneralExpression_Test.cxx index 5f6d2a2e3d..3bd3878e8d 100644 --- a/src/ModelingAlgorithms/TKExpress/GTests/Expr_GeneralExpression_Test.cxx +++ b/src/ModelingAlgorithms/TKExpress/GTests/Expr_GeneralExpression_Test.cxx @@ -52,3 +52,40 @@ TEST(Expr_GeneralExpression_Test, OCC902_ExpressionDerivative) EXPECT_TRUE(isCorrect) << "Derivative result was: " << aDerivativeStr.ToCString() << ", expected either 'Exp(5*x)*5' or '5*Exp(5*x)'"; } + +// Test OCC31697: Expr_GeneralExpression::Derivative for Exp(2*Sin(x^2)) +// Expected derivative: Exp(2*Sin(x^2))*Cos(x^2)*x*4 +TEST(Expr_GeneralExpression_Test, OCC31697_DerivativeOfComplexExpression) +{ + occ::handle anExprIntrp = ExprIntrp_GenExp::Create(); + anExprIntrp->Process(TCollection_AsciiString("Exp(2*Sin(x^2))")); + + ASSERT_TRUE(anExprIntrp->IsDone()) << "Expression parsing should succeed"; + + occ::handle anExpr = anExprIntrp->Expression(); + ASSERT_FALSE(anExpr.IsNull()) << "Expression should not be null"; + + occ::handle aVar = new Expr_NamedUnknown("x"); + ASSERT_TRUE(anExpr->Contains(aVar)) << "Expression should contain variable x"; + + occ::handle aDer = anExpr->Derivative(aVar); + ASSERT_FALSE(aDer.IsNull()) << "Derivative should not be null"; + + const TCollection_AsciiString aDerStr = aDer->String(); + EXPECT_EQ(aDerStr, TCollection_AsciiString("Exp(2*Sin(x^2))*Cos(x^2)*x*4")) + << "Derivative result was: " << aDerStr.ToCString(); +} + +// Test OCC22611: ExprIntrp_GenExp must not leak and must parse numeric literal correctly. +// Migrated from QABugs_19.cxx OCC22611 +TEST(Expr_GeneralExpression_Test, OCC22611_ParseNumericLiteral) +{ + occ::handle aGen = ExprIntrp_GenExp::Create(); + for (int i = 0; i < 10; ++i) + { + aGen->Process(TCollection_AsciiString("0.1214343")); + ASSERT_TRUE(aGen->IsDone()) << "Parsing should succeed on iteration " << i; + occ::handle aExpr = aGen->Expression(); + EXPECT_FALSE(aExpr.IsNull()) << "Expression should not be null on iteration " << i; + } +} diff --git a/src/ModelingAlgorithms/TKFillet/GTests/BRepFilletAPI_MakeFillet_Test.cxx b/src/ModelingAlgorithms/TKFillet/GTests/BRepFilletAPI_MakeFillet_Test.cxx index fe0e77f192..da076c4807 100644 --- a/src/ModelingAlgorithms/TKFillet/GTests/BRepFilletAPI_MakeFillet_Test.cxx +++ b/src/ModelingAlgorithms/TKFillet/GTests/BRepFilletAPI_MakeFillet_Test.cxx @@ -13,12 +13,16 @@ #include #include +#include #include +#include +#include #include #include #include #include #include +#include #include @@ -99,3 +103,54 @@ TEST(BRepFilletAPI_MakeFilletTest, FilletVariableRadius) BRepCheck_Analyzer anAnalyzer(aResult); EXPECT_TRUE(anAnalyzer.IsValid()); } + +// Test OCC570: BRepFilletAPI_MakeFillet with mixed constant and variable radius. +// Migrated from QABugs_17.cxx OCC570 +TEST(BRepFilletAPI_MakeFilletTest, OCC570_MixedVariableConstantRadius) +{ + BRepPrimAPI_MakeBox aBoxMaker(100., 100., 100.); + const TopoDS_Shape& aBox = aBoxMaker.Shape(); + + // Take the first wire of the box and its 4 edges + TopExp_Explorer aWireExp(aBox, TopAbs_WIRE); + ASSERT_TRUE(aWireExp.More()); + + TopExp_Explorer anEdgeExp(aWireExp.Current(), TopAbs_EDGE); + ASSERT_TRUE(anEdgeExp.More()); + TopoDS_Edge anE1 = TopoDS::Edge(anEdgeExp.Current()); + anEdgeExp.Next(); + ASSERT_TRUE(anEdgeExp.More()); + TopoDS_Edge anE2 = TopoDS::Edge(anEdgeExp.Current()); + anEdgeExp.Next(); + ASSERT_TRUE(anEdgeExp.More()); + TopoDS_Edge anE3 = TopoDS::Edge(anEdgeExp.Current()); + anEdgeExp.Next(); + ASSERT_TRUE(anEdgeExp.More()); + TopoDS_Edge anE4 = TopoDS::Edge(anEdgeExp.Current()); + + // Variable radius law: 4 (parameter, radius) control points + NCollection_Array1 aVarRadius(1, 4); + aVarRadius.SetValue(1, gp_Pnt2d(0.0, 5.0)); + aVarRadius.SetValue(2, gp_Pnt2d(0.3, 15.0)); + aVarRadius.SetValue(3, gp_Pnt2d(0.7, 15.0)); + aVarRadius.SetValue(4, gp_Pnt2d(1.0, 5.0)); + + BRepFilletAPI_MakeFillet aFillet(aBox); + aFillet.SetContinuity(GeomAbs_C1, 0.001); + aFillet.Add(aVarRadius, anE1); + aFillet.Add(5.0, anE2); + aFillet.Add(aVarRadius, anE3); + aFillet.Add(5.0, anE4); + + ASSERT_NO_THROW(aFillet.Build()) << "BRepFilletAPI_MakeFillet::Build should not throw"; + ASSERT_TRUE(aFillet.IsDone()) << "Fillet operation should succeed"; + + const TopoDS_Shape& aResult = aFillet.Shape(); + + BRepCheck_Analyzer anAnalyzer(aResult); + EXPECT_TRUE(anAnalyzer.IsValid()) << "Result shape should be valid"; + + GProp_GProps aProps; + BRepGProp::SurfaceProperties(aResult, aProps); + EXPECT_NEAR(aProps.Mass(), 58500., 58500. * 0.01) << "Surface area should be approximately 58500"; +} diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GTests/FILES.cmake b/src/ModelingAlgorithms/TKGeomAlgo/GTests/FILES.cmake index 53c4ca9f90..08739e7db5 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GTests/FILES.cmake +++ b/src/ModelingAlgorithms/TKGeomAlgo/GTests/FILES.cmake @@ -3,12 +3,17 @@ set(OCCT_TKGeomAlgo_GTests_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}") set(OCCT_TKGeomAlgo_GTests_FILES Geom2dAPI_InterCurveCurve_Test.cxx + Geom2dAPI_Interpolate_Test.cxx Geom2dAPI_PointsToBSpline_Test.cxx + GeomFill_BSplineCurves_Test.cxx + GeomFill_NSections_Test.cxx Geom2dHatch_Elements_Test.cxx Geom2dHatch_Intersector_Test.cxx GeomAPI_PointsToBSplineSurface_Test.cxx GeomAPI_PointsToBSpline_Test.cxx + Geom2dGcc_Circ2d2TanRad_Test.cxx Geom2dGcc_Circ2d3Tan_Test.cxx + Geom2dGcc_Lin2d2Tan_Test.cxx GeomFill_CorrectedFrenet_Test.cxx GeomFill_Gordon_Test.cxx GeomFill_GuideTrihedronAC_Test.cxx @@ -25,5 +30,6 @@ set(OCCT_TKGeomAlgo_GTests_FILES IntPolyh_Point_Test.cxx IntSurf_LineOn2S_Test.cxx IntSurf_Quadric_Test.cxx + GeomAPI_IntSS_Test.cxx TopTrans_SurfaceTransition_Test.cxx ) diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GTests/Geom2dAPI_Interpolate_Test.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GTests/Geom2dAPI_Interpolate_Test.cxx new file mode 100644 index 0000000000..67954b3828 --- /dev/null +++ b/src/ModelingAlgorithms/TKGeomAlgo/GTests/Geom2dAPI_Interpolate_Test.cxx @@ -0,0 +1,80 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include + +#include + +// OCC28594: Geom2dAPI_Interpolate with and without tangent scale produces different curves. +// Tests that interpolation with tangent vectors (with scale and without scale) both produce +// valid B-Spline curves passing through the given points. + +TEST(Geom2dAPI_InterpolateTest, OCC28594_InterpolateWithAndWithoutTangentScale) +{ + occ::handle> aPoints = new NCollection_HArray1(1, 6); + NCollection_Array1& aPointsArray = aPoints->ChangeArray1(); + aPointsArray(1) = gp_Pnt2d(-30.4, 8); + aPointsArray(2) = gp_Pnt2d(-16.689912, 17.498217); + aPointsArray(3) = gp_Pnt2d(-23.803064, 24.748543); + aPointsArray(4) = gp_Pnt2d(-16.907466, 32.919615); + aPointsArray(5) = gp_Pnt2d(-8.543829, 26.549421); + aPointsArray(6) = gp_Pnt2d(0, 39.200000); + + NCollection_Array1 aTangents(1, 6); + aTangents(1) = gp_Vec2d(0.3, 0.4); + aTangents(2) = gp_Vec2d(0, 0); + aTangents(3) = gp_Vec2d(0, 0); + aTangents(4) = gp_Vec2d(0, 0); + aTangents(5) = gp_Vec2d(0, 0); + aTangents(6) = gp_Vec2d(1, 0); + + occ::handle> aTangentFlags = new NCollection_HArray1(1, 6); + NCollection_Array1& aTangentFlagsArray = aTangentFlags->ChangeArray1(); + aTangentFlagsArray(1) = true; + aTangentFlagsArray(2) = false; + aTangentFlagsArray(3) = false; + aTangentFlagsArray(4) = false; + aTangentFlagsArray(5) = false; + aTangentFlagsArray(6) = true; + + // Interpolation with tangent scale + Geom2dAPI_Interpolate anInterpWithScale(aPoints, false, Precision::Confusion()); + anInterpWithScale.Load(aTangents, aTangentFlags); + anInterpWithScale.Perform(); + EXPECT_TRUE(anInterpWithScale.IsDone()); + const occ::handle aCurveWithScale = anInterpWithScale.Curve(); + EXPECT_FALSE(aCurveWithScale.IsNull()); + + // Interpolation without tangent scale + Geom2dAPI_Interpolate anInterpWithoutScale(aPoints, false, Precision::Confusion()); + anInterpWithoutScale.Load(aTangents, aTangentFlags, false); + anInterpWithoutScale.Perform(); + EXPECT_TRUE(anInterpWithoutScale.IsDone()); + const occ::handle aCurveWithoutScale = anInterpWithoutScale.Curve(); + EXPECT_FALSE(aCurveWithoutScale.IsNull()); + + // Both curves must pass through all given points + const double aTol = Precision::Confusion() * 10; + for (int anIndex = 1; anIndex <= aPoints->Length(); ++anIndex) + { + const gp_Pnt2d aPtOnCurveWithScale = aCurveWithScale->EvalD0(aCurveWithScale->Knot(anIndex)); + const gp_Pnt2d& aPt = aPointsArray(anIndex); + EXPECT_NEAR(aPt.X(), aPtOnCurveWithScale.X(), aTol) << " at point index " << anIndex; + EXPECT_NEAR(aPt.Y(), aPtOnCurveWithScale.Y(), aTol) << " at point index " << anIndex; + } +} diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GTests/Geom2dGcc_Circ2d2TanRad_Test.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GTests/Geom2dGcc_Circ2d2TanRad_Test.cxx new file mode 100644 index 0000000000..de6cfbd3a7 --- /dev/null +++ b/src/ModelingAlgorithms/TKGeomAlgo/GTests/Geom2dGcc_Circ2d2TanRad_Test.cxx @@ -0,0 +1,81 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Test BUC60897: Geom2dGcc_Circ2d2TanRad finds circles tangent to a line and +// a Bezier curve. Verifies that each tangency point lies at the circle radius +// from the circle center (within 1% relative tolerance). +TEST(Geom2dGcc_Circ2d2TanRadTest, BUC60897_TangentToLineAndBezier) +{ + // Create a Geom2d_Line from point (100, 0) going in the -X direction + occ::handle aLine = new Geom2d_Line(gp_Pnt2d(100, 0), gp_Dir2d(gp_Dir2d::D::NX)); + + // Create a Geom2d_BezierCurve from three control points + NCollection_Array1 aPoints(1, 3); + aPoints.SetValue(1, gp_Pnt2d(0, 0)); + aPoints.SetValue(2, gp_Pnt2d(50, 50)); + aPoints.SetValue(3, gp_Pnt2d(0, 100)); + occ::handle aCurve = new Geom2d_BezierCurve(aPoints); + + // Build qualified curves (outside tangency) + Geom2dAdaptor_Curve aCLine(aLine); + Geom2dAdaptor_Curve aCCurve(aCurve); + Geom2dGcc_QualifiedCurve aQualifCurve1(aCLine, GccEnt_outside); + Geom2dGcc_QualifiedCurve aQualifCurve2(aCCurve, GccEnt_outside); + + // Find circles with radius 10 tangent to both curves + const double aRadius = 10.0; + const double aTolerance = 1e-7; + Geom2dGcc_Circ2d2TanRad aGccCirc2d(aQualifCurve1, aQualifCurve2, aRadius, aTolerance); + + ASSERT_TRUE(aGccCirc2d.IsDone()) << "Geom2dGcc_Circ2d2TanRad failed to compute"; + ASSERT_GT(aGccCirc2d.NbSolutions(), 0) << "No tangent circles found"; + + // For each solution, verify tangency points are at the circle radius from its center + const double aMaxDeltaPercent = 1.0; // 1% tolerance as used in the original Draw test + for (int i = 1; i <= aGccCirc2d.NbSolutions(); i++) + { + const gp_Circ2d aCirc2d = aGccCirc2d.ThisSolution(i); + const gp_Pnt2d aCenter = aCirc2d.Location(); + const double aR = aCirc2d.Radius(); + + double aParSol1, aParArg1, aParSol2, aParArg2; + gp_Pnt2d aPntSol1, aPntSol2; + aGccCirc2d.Tangency1(i, aParSol1, aParArg1, aPntSol1); + aGccCirc2d.Tangency2(i, aParSol2, aParArg2, aPntSol2); + + // Distance from tangency point 1 to circle center must equal radius within 1% + const double aD1 = aPntSol1.Distance(aCenter); + const double aDelta1 = std::abs(aD1 - aR) / aR * 100.0; + EXPECT_LE(aDelta1, aMaxDeltaPercent) + << "Solution " << i << ": tangency1 distance error " << aDelta1 << "% exceeds 1%"; + + // Distance from tangency point 2 to circle center must equal radius within 1% + const double aD2 = aPntSol2.Distance(aCenter); + const double aDelta2 = std::abs(aD2 - aR) / aR * 100.0; + EXPECT_LE(aDelta2, aMaxDeltaPercent) + << "Solution " << i << ": tangency2 distance error " << aDelta2 << "% exceeds 1%"; + } +} diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GTests/Geom2dGcc_Lin2d2Tan_Test.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GTests/Geom2dGcc_Lin2d2Tan_Test.cxx new file mode 100644 index 0000000000..377bf3490e --- /dev/null +++ b/src/ModelingAlgorithms/TKGeomAlgo/GTests/Geom2dGcc_Lin2d2Tan_Test.cxx @@ -0,0 +1,82 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Test OCC813: Geom2dGcc_Lin2d2Tan - tangent line between a 2D ellipse and a point. +// Migrated from QABugs_17.cxx OCC813 +TEST(Geom2dGcc_Lin2d2TanTest, OCC813_EllipseAndPoint) +{ + // Construct 3D ellipse and projection plane + const gp_Ax2 anAx2(gp_Pnt(1262.224429, 425.040878, 363.609716), + gp_Dir(0.173648, 0.984808, 0.000000), + gp_Dir(-0.932169, 0.164367, -0.322560)); + + Handle(Geom_Ellipse) anEll = new Geom_Ellipse(anAx2, 150, 100); + Handle(Geom_Plane) aPlane = new Geom_Plane(gp_Ax3(anAx2)); + const gp_Pln aPln = aPlane->Pln(); + + // Project ellipse onto the plane and build 2D qualified curve + Handle(Geom2d_Curve) aCurve2d = GeomAPI::To2d(anEll, aPln); + Geom2dAdaptor_Curve anAdapt(aCurve2d); + Geom2dGcc_QualifiedCurve aQCurve(anAdapt, GccEnt_outside); + + // Query tangent line from 2D point to the projected ellipse + const gp_Pnt2d aPnt2d(200.0, 200.0); + Geom2dGcc_Lin2d2Tan aLinTan(aQCurve, aPnt2d, 0.1); + + EXPECT_GT(aLinTan.NbSolutions(), 0) << "Expected at least one tangent line solution"; +} + +// Test OCC814: Geom2dGcc_Lin2d2Tan - tangent line between a 2D circle and a 2D ellipse. +// Migrated from QABugs_17.cxx OCC814 +TEST(Geom2dGcc_Lin2d2TanTest, OCC814_CircleAndEllipse) +{ + const gp_Ax2 anAx2(gp_Pnt(1262.224429, 425.040878, 363.609716), + gp_Dir(0.173648, 0.984808, 0.000000), + gp_Dir(-0.932169, 0.164367, -0.322560)); + + Handle(Geom_Circle) aCir = new Geom_Circle(gp_Ax2(gp_Pnt(823.687192, 502.366825, 478.960440), + gp_Dir(0.173648, 0.984808, 0.000000), + gp_Dir(-0.932169, 0.164367, -0.322560)), + 50); + Handle(Geom_Ellipse) anEll = new Geom_Ellipse(anAx2, 150, 100); + Handle(Geom_Plane) aPlane = new Geom_Plane(gp_Ax3(anAx2)); + const gp_Pln aPln = aPlane->Pln(); + + // Project both curves onto the plane and build qualified curves + Handle(Geom2d_Curve) aCurve2d = GeomAPI::To2d(anEll, aPln); + Handle(Geom2d_Curve) aFromCurve2d = GeomAPI::To2d(aCir, aPln); + Geom2dAdaptor_Curve anAdaptEll(aCurve2d); + Geom2dAdaptor_Curve anAdaptCir(aFromCurve2d); + Geom2dGcc_QualifiedCurve aQEll(anAdaptEll, GccEnt_outside); + Geom2dGcc_QualifiedCurve aQCir(anAdaptCir, GccEnt_outside); + + Geom2dGcc_Lin2d2Tan aLinTan(aQEll, aQCir, 0.1); + + EXPECT_GT(aLinTan.NbSolutions(), 0) << "Expected at least one tangent line solution"; +} diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GTests/GeomAPI_IntSS_Test.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GTests/GeomAPI_IntSS_Test.cxx new file mode 100644 index 0000000000..6fda4fe2cf --- /dev/null +++ b/src/ModelingAlgorithms/TKGeomAlgo/GTests/GeomAPI_IntSS_Test.cxx @@ -0,0 +1,3571 @@ +// Created on: 2026-01-01 +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//! OCC26675: BSplineSurface intersect SurfaceOfLinearExtrusion +//! Verifies that GeomAPI_IntSS finds exactly one intersection curve with a valid (non-degenerate) +//! parameter range. The surface data is generated inline to avoid file I/O +//! (saving/loading would suppress the bug). +TEST(GeomAPI_IntSSTest, OCC26675_IntersectionCurveCount) +{ + const gp_Pnt aCircCenter(-112.93397037070100000000, + +177.52792379072199000000, + +10.63374076104853900000); + const gp_Dir aCircN(+0.00000000000000000000, +1.00000000000000000000, +0.00000000000000000000); + const gp_Dir aCircX(+0.00000000000000000000, -0.00000000000000000000, +1.00000000000000000000); + const gp_Dir anExtrDir(-500.00000000000000000000, + -866.02540378443609000000, + +0.00000000000000000000); + const gp_Ax2 aCircAxes(aCircCenter, aCircN, aCircX); + const occ::handle aCurv = new Geom_Circle(aCircAxes, +50.00000000000000000000); + + const occ::handle aS2 = new Geom_SurfaceOfLinearExtrusion(aCurv, anExtrDir); + + NCollection_Array2 aPoles(1, 7, 1, 81); + NCollection_Array2 aWeights(1, 7, 1, 81); + NCollection_Array1 aUKnots(1, 2), aVKnots(1, 12); + NCollection_Array1 aUMult(1, 2), aVMult(1, 12); + const int aUDegree = 6, aVDegree = 8; + + aUKnots(1) = +0.00000000000000000000; + aUKnots(2) = +1.00000000000000000000; + aVKnots(1) = +0.08911853946147080300; + aVKnots(2) = +0.11779167587451674000; + aVKnots(3) = +0.14583467562325506000; + aVKnots(4) = +0.20255081178503931000; + aVKnots(5) = +0.25926694794682359000; + aVKnots(6) = +0.31598308410860781000; + aVKnots(7) = +0.34262437462234741000; + aVKnots(8) = +0.37067364397889985000; + aVKnots(9) = +0.39731552779654306000; + aVKnots(10) = +0.42536420384919182000; + aVKnots(11) = +0.45200329235672548000; + aVKnots(12) = +0.47802918742799144000; + + aUMult(1) = 7; + aUMult(2) = 7; + aVMult(1) = 9; + aVMult(2) = 7; + aVMult(3) = 7; + aVMult(4) = 7; + aVMult(5) = 7; + aVMult(6) = 7; + aVMult(7) = 7; + aVMult(8) = 7; + aVMult(9) = 7; + aVMult(10) = 8; + aVMult(11) = 8; + aVMult(12) = 9; + + //// + { + aWeights.ChangeValue(1, 1) = +1.02986327036737910000; + aPoles.ChangeValue(1, 1) = + gp_Pnt(+131.75315905495660000000, +2.88570510351864900000, -66.24709307590461500000); + aWeights.ChangeValue(1, 2) = +1.02989244478761060000; + aPoles.ChangeValue(1, 2) = + gp_Pnt(+128.70876344053133000000, +2.88791208181246970000, -67.92914281439198000000); + aWeights.ChangeValue(1, 3) = +1.02991676091113950000; + aPoles.ChangeValue(1, 3) = + gp_Pnt(+125.64133203841195000000, +2.88975018186799830000, -69.56968825975690200000); + aWeights.ChangeValue(1, 4) = +1.02993613450133650000; + aPoles.ChangeValue(1, 4) = + gp_Pnt(+122.55164101294532000000, +2.89121448973680460000, -71.16831921321855200000); + aWeights.ChangeValue(1, 5) = +1.02995970896170810000; + aPoles.ChangeValue(1, 5) = + gp_Pnt(+119.44028474076808000000, +2.89299532863950050000, -72.72471137484106400000); + aWeights.ChangeValue(1, 6) = +1.02998196300928410000; + aPoles.ChangeValue(1, 6) = + gp_Pnt(+116.30796917345266000000, +2.89467567823625730000, -74.23853925439507900000); + aWeights.ChangeValue(1, 7) = +1.02999781361772440000; + aPoles.ChangeValue(1, 7) = + gp_Pnt(+113.15537818476763000000, +2.89587201010380560000, -75.70949847615843000000); + aWeights.ChangeValue(1, 8) = +1.03001626830283270000; + aPoles.ChangeValue(1, 8) = + gp_Pnt(+109.98323502828077000000, +2.89726468512897210000, -77.13723994508107800000); + aWeights.ChangeValue(1, 9) = +1.03004822145815230000; + aPoles.ChangeValue(1, 9) = + gp_Pnt(+103.60126699909762000000, +2.89967510685080440000, -79.90571269046952800000); + aWeights.ChangeValue(1, 10) = +1.03006364818936770000; + aPoles.ChangeValue(1, 10) = + gp_Pnt(+100.39144092265354000000, +2.90083845616186050000, -81.24644132200651800000); + aWeights.ChangeValue(1, 11) = +1.03007725635592000000; + aPoles.ChangeValue(1, 11) = + gp_Pnt(+97.16342330855667300000, +2.90186436688425700000, -82.54338871675531700000); + aWeights.ChangeValue(1, 12) = +1.03009045031501500000; + aPoles.ChangeValue(1, 12) = + gp_Pnt(+93.91790293022438600000, +2.90285879918974650000, -83.79626764915399000000); + aWeights.ChangeValue(1, 13) = +1.03010285398183930000; + aPoles.ChangeValue(1, 13) = + gp_Pnt(+90.65560197798836800000, +2.90379346029782100000, -85.00479786905465600000); + aWeights.ChangeValue(1, 14) = +1.03011393120350900000; + aPoles.ChangeValue(1, 14) = + gp_Pnt(+87.37722618415423900000, +2.90462796925060120000, -86.16871841453435400000); + aWeights.ChangeValue(1, 15) = +1.03012484065787050000; + aPoles.ChangeValue(1, 15) = + gp_Pnt(+84.08346762829417300000, +2.90544970249433290000, -87.28777941880029800000); + aWeights.ChangeValue(1, 16) = +1.03015471267321200000; + aPoles.ChangeValue(1, 16) = + gp_Pnt(+74.15848807058078800000, +2.90769927244280210000, -90.50962423575197100000); + aWeights.ChangeValue(1, 17) = +1.03017194800922400000; + aPoles.ChangeValue(1, 17) = + gp_Pnt(+67.48342008926763900000, +2.90899668032978950000, -92.47701903504494700000); + aWeights.ChangeValue(1, 18) = +1.03018680682765670000; + aPoles.ChangeValue(1, 18) = + gp_Pnt(+60.75515833606132100000, +2.91011480947056490000, -94.26204121664201800000); + aWeights.ChangeValue(1, 19) = +1.03019958109549670000; + aPoles.ChangeValue(1, 19) = + gp_Pnt(+53.97928154760177200000, +2.91107580930771360000, -95.86305268935117900000); + aWeights.ChangeValue(1, 20) = +1.03021050389503350000; + aPoles.ChangeValue(1, 20) = + gp_Pnt(+47.16164692132413400000, +2.91189735380426780000, -97.27865560180262600000); + aWeights.ChangeValue(1, 21) = +1.03021974942385830000; + aPoles.ChangeValue(1, 21) = + gp_Pnt(+40.30838837608569500000, +2.91259264267907050000, -98.50769317562559000000); + aWeights.ChangeValue(1, 22) = +1.03022743299486370000; + aPoles.ChangeValue(1, 22) = + gp_Pnt(+33.42591476110869300000, +2.91317040233699530000, -99.54925039136011800000); + aWeights.ChangeValue(1, 23) = +1.03023979631718900000; + aPoles.ChangeValue(1, 23) = + gp_Pnt(+19.61576136171939000000, +2.91409991934468550000, -101.25602945077115000000); + aWeights.ChangeValue(1, 24) = +1.03024450452679140000; + aPoles.ChangeValue(1, 24) = + gp_Pnt(+12.68754355991407800000, +2.91445385083459700000, -101.92122234436175000000); + aWeights.ChangeValue(1, 25) = +1.03024781840890120000; + aPoles.ChangeValue(1, 25) = + gp_Pnt(+5.74236948737514120000, +2.91470294045230770000, -102.39751844510502000000); + aWeights.ChangeValue(1, 26) = +1.03024979501192000000; + aPoles.ChangeValue(1, 26) = + gp_Pnt(-1.21367831605073050000, +2.91485150371151920000, -102.68442590550356000000); + aWeights.ChangeValue(1, 27) = +1.03025046568879790000; + aPoles.ChangeValue(1, 27) = + gp_Pnt(-8.17455041611474620000, +2.91490191238154670000, -102.78167594353056000000); + aWeights.ChangeValue(1, 28) = +1.03024983609703540000; + aPoles.ChangeValue(1, 28) = + gp_Pnt(-15.13423127055194300000, +2.91485459458572780000, -102.68922293042964000000); + aWeights.ChangeValue(1, 29) = +1.03024788619868260000; + aPoles.ChangeValue(1, 29) = + gp_Pnt(-22.08674002008992700000, +2.91470803482494080000, -102.40724441194320000000); + aWeights.ChangeValue(1, 30) = +1.03024126030624540000; + aPoles.ChangeValue(1, 30) = + gp_Pnt(-35.96556766132121700000, +2.91420996731856930000, -101.46503408514069000000); + aWeights.ChangeValue(1, 31) = +1.03023657011944230000; + aPoles.ChangeValue(1, 31) = + gp_Pnt(-42.89191729472150200000, +2.91385737699769360000, -100.80479886745856000000); + aWeights.ChangeValue(1, 32) = +1.03023047292900880000; + aPoles.ChangeValue(1, 32) = + gp_Pnt(-49.79923779841396900000, +2.91339898565004060000, -99.95583114848535900000); + aWeights.ChangeValue(1, 33) = +1.03022290017099550000; + aPoles.ChangeValue(1, 33) = + gp_Pnt(-56.68161614207340900000, +2.91282960709223810000, -98.91875138839027700000); + aWeights.ChangeValue(1, 34) = +1.03021374148842180000; + aPoles.ChangeValue(1, 34) = + gp_Pnt(-63.53316994906088400000, +2.91214088593828220000, -97.69440448679608800000); + aWeights.ChangeValue(1, 35) = +1.03020284473128080000; + aPoles.ChangeValue(1, 35) = + gp_Pnt(-70.34804877511381000000, +2.91132129711663760000, -96.28385939245710300000); + aWeights.ChangeValue(1, 36) = +1.03019001595653580000; + aPoles.ChangeValue(1, 36) = + gp_Pnt(-77.12043535415037400000, +2.91035614521427500000, -94.68840860671046800000); + aWeights.ChangeValue(1, 37) = +1.03016805964614980000; + aPoles.ChangeValue(1, 37) = + gp_Pnt(-86.96652166958519100000, +2.90870378328618400000, -92.08365976972685000000); + aWeights.ChangeValue(1, 38) = +1.03016062145972500000; + aPoles.ChangeValue(1, 38) = + gp_Pnt(-90.07809790629383400000, +2.90814392820824040000, -91.21821667329717800000); + aWeights.ChangeValue(1, 39) = +1.03015268516758060000; + aPoles.ChangeValue(1, 39) = + gp_Pnt(-93.17869710255469300000, +2.90754650188789080000, -90.31338955501080100000); + aWeights.ChangeValue(1, 40) = +1.03014422393874510000; + aPoles.ChangeValue(1, 40) = + gp_Pnt(-96.26774201507643600000, +2.90690946644790090000, -89.36934028436292000000); + aWeights.ChangeValue(1, 41) = +1.03013520381253840000; + aPoles.ChangeValue(1, 41) = + gp_Pnt(-99.34465666946248100000, +2.90623024256504880000, -88.38624129906430900000); + aWeights.ChangeValue(1, 42) = +1.03012558369857450000; + aPoles.ChangeValue(1, 42) = + gp_Pnt(-102.40886646020824000000, +2.90550570939860810000, -87.36427556081821400000); + aWeights.ChangeValue(1, 43) = +1.03011531537676040000; + aPoles.ChangeValue(1, 43) = + gp_Pnt(-105.45979824903711000000, +2.90473220450791560000, -86.30363650725728100000); + aWeights.ChangeValue(1, 44) = +1.03009266486593140000; + aPoles.ChangeValue(1, 44) = + gp_Pnt(-111.76765655411073000000, +2.90302557752729130000, -84.02084620865503000000); + aWeights.ChangeValue(1, 45) = +1.03007954250893910000; + aPoles.ChangeValue(1, 45) = + gp_Pnt(-115.02237879255169000000, +2.90203661863772000000, -82.79254553120374300000); + aWeights.ChangeValue(1, 46) = +1.03006700046846360000; + aPoles.ChangeValue(1, 46) = + gp_Pnt(-118.26033551796380000000, +2.90109123094133370000, -81.51987347500843800000); + aWeights.ChangeValue(1, 47) = +1.03005153385518430000; + aPoles.ChangeValue(1, 47) = + gp_Pnt(-121.48081153033489000000, +2.89992503429592440000, -80.20310945547186100000); + aWeights.ChangeValue(1, 48) = +1.03003663316288070000; + aPoles.ChangeValue(1, 48) = + gp_Pnt(-124.68310204708784000000, +2.89880123910694910000, -78.84252385592422700000); + aWeights.ChangeValue(1, 49) = +1.03002002524051230000; + aPoles.ChangeValue(1, 49) = + gp_Pnt(-127.86649232671233000000, +2.89754829341323060000, -77.43842231968982000000); + aWeights.ChangeValue(1, 50) = +1.03000192732161230000; + aPoles.ChangeValue(1, 50) = + gp_Pnt(-131.03028254956638000000, +2.89618247462029290000, -75.99111259804850200000); + aWeights.ChangeValue(1, 51) = +1.02996526567113600000; + aPoles.ChangeValue(1, 51) = + gp_Pnt(-137.09281139094972000000, +2.89341459629042360000, -73.11712223836046600000); + aWeights.ChangeValue(1, 52) = +1.02994403451589630000; + aPoles.ChangeValue(1, 52) = + gp_Pnt(-139.99435839258939000000, +2.89181101472158900000, -71.69634981883045600000); + aWeights.ChangeValue(1, 53) = +1.02992866105538440000; + aPoles.ChangeValue(1, 53) = + gp_Pnt(-142.87784656482347000000, +2.89064973421052680000, -70.23882874204873900000); + aWeights.ChangeValue(1, 54) = +1.02989968743283590000; + aPoles.ChangeValue(1, 54) = + gp_Pnt(-145.74271824362268000000, +2.88845983550875030000, -68.74489127449217600000); + aWeights.ChangeValue(1, 55) = +1.02988222474524970000; + aPoles.ChangeValue(1, 55) = + gp_Pnt(-148.58838121276386000000, +2.88713941077432070000, -67.21475112846350400000); + aWeights.ChangeValue(1, 56) = +1.02985386954408620000; + aPoles.ChangeValue(1, 56) = + gp_Pnt(-151.41432118416620000000, +2.88499463682574180000, -65.64875099202183200000); + aWeights.ChangeValue(1, 57) = +1.02982704006090460000; + aPoles.ChangeValue(1, 57) = + gp_Pnt(-154.21993049579214000000, +2.88296397171855910000, -64.04717955157212800000); + aWeights.ChangeValue(1, 58) = +1.02976639514278400000; + aPoles.ChangeValue(1, 58) = + gp_Pnt(-160.00375832753414000000, +2.87837140815595260000, -60.64735416015690100000); + aWeights.ChangeValue(1, 59) = +1.02972545417711370000; + aPoles.ChangeValue(1, 59) = + gp_Pnt(-162.97914403387477000000, +2.87526824819569480000, -58.84445149944087200000); + aWeights.ChangeValue(1, 60) = +1.02970377642253300000; + aPoles.ChangeValue(1, 60) = + gp_Pnt(-165.92810584856278000000, +2.87362619373759860000, -56.99783055334398100000); + aWeights.ChangeValue(1, 61) = +1.02963665582001740000; + aPoles.ChangeValue(1, 61) = + gp_Pnt(-168.85438185317770000000, +2.86853152516479340000, -55.11698298198095400000); + aWeights.ChangeValue(1, 62) = +1.02961756328192160000; + aPoles.ChangeValue(1, 62) = + gp_Pnt(-171.75125340157436000000, +2.86708271055963240000, -53.19057330425229700000); + aWeights.ChangeValue(1, 63) = +1.02954937293527580000; + aPoles.ChangeValue(1, 63) = + gp_Pnt(-174.62251681022158000000, +2.86190007017706360000, -51.22700225930964300000); + aWeights.ChangeValue(1, 64) = +1.02950097342691520000; + aPoles.ChangeValue(1, 64) = + gp_Pnt(-177.46620192435449000000, +2.85821732043423180000, -49.22415777229338100000); + aWeights.ChangeValue(1, 65) = +1.02943612532291810000; + aPoles.ChangeValue(1, 65) = + gp_Pnt(-180.28206426096281000000, +2.85327724467687100000, -47.18300981722491400000); + aWeights.ChangeValue(1, 66) = +1.02937840445786000000; + aPoles.ChangeValue(1, 66) = + gp_Pnt(-182.89713737694305000000, +2.84888100315162470000, -45.28741010449485300000); + aWeights.ChangeValue(1, 67) = +1.02929786839840220000; + aPoles.ChangeValue(1, 67) = + gp_Pnt(-185.48808576506855000000, +2.84272935508061810000, -43.35897595091199000000); + aWeights.ChangeValue(1, 68) = +1.02927785532845030000; + aPoles.ChangeValue(1, 68) = + gp_Pnt(-188.05509745668041000000, +2.84122612975151250000, -41.39706700987362400000); + aWeights.ChangeValue(1, 69) = +1.02909457173363930000; + aPoles.ChangeValue(1, 69) = + gp_Pnt(-190.59634219852757000000, +2.82717082550985440000, -39.40453806610211300000); + aWeights.ChangeValue(1, 70) = +1.02915656102508410000; + aPoles.ChangeValue(1, 70) = + gp_Pnt(-193.11296933822229000000, +2.83195841118334000000, -37.37763511391345600000); + aWeights.ChangeValue(1, 71) = +1.02891246603941110000; + aPoles.ChangeValue(1, 71) = + gp_Pnt(-195.60305999702362000000, +2.81322479805689340000, -35.32107774203857500000); + aWeights.ChangeValue(1, 72) = +1.02884001996307940000; + aPoles.ChangeValue(1, 72) = + gp_Pnt(-198.06589030811097000000, +2.80764438138268390000, -33.23208121127716900000); + aWeights.ChangeValue(1, 73) = +1.02870418206103250000; + aPoles.ChangeValue(1, 73) = + gp_Pnt(-200.50111697620073000000, +2.79717360924099090000, -31.11182660391394400000); + aWeights.ChangeValue(1, 74) = +1.02860417892814660000; + aPoles.ChangeValue(1, 74) = + gp_Pnt(-202.93720652839650000000, +2.78949733525485710000, -28.99085629216911300000); + aWeights.ChangeValue(1, 75) = +1.02826579045547110000; + aPoles.ChangeValue(1, 75) = + gp_Pnt(-205.34394850673777000000, +2.76315604312090550000, -26.83940109433629200000); + aWeights.ChangeValue(1, 76) = +1.02871793966742330000; + aPoles.ChangeValue(1, 76) = + gp_Pnt(-207.72575255584553000000, +2.79855565223875710000, -24.65500081264426800000); + aWeights.ChangeValue(1, 77) = +1.02728787827176630000; + aPoles.ChangeValue(1, 77) = + gp_Pnt(-210.07706367406874000000, +2.68725363743552850000, -22.43634910730148800000); + aWeights.ChangeValue(1, 78) = +1.02767535385809120000; + aPoles.ChangeValue(1, 78) = + gp_Pnt(-212.39605978578481000000, +2.71705476277515070000, -20.20562112100595800000); + aWeights.ChangeValue(1, 79) = +1.02745809923169020000; + aPoles.ChangeValue(1, 79) = + gp_Pnt(-214.68098626410506000000, +2.69985190382785320000, -17.91605900374278100000); + aWeights.ChangeValue(1, 80) = +1.02725110106359850000; + aPoles.ChangeValue(1, 80) = + gp_Pnt(-216.94385389331507000000, +2.68435107488514250000, -15.61289037092123000000); + aWeights.ChangeValue(1, 81) = +1.02619749797986360000; + aPoles.ChangeValue(1, 81) = + gp_Pnt(-219.16685583874414000000, +2.59983520096898510000, -13.28583956380401400000); + aWeights.ChangeValue(2, 1) = +1.00955713824395700000; + aPoles.ChangeValue(2, 1) = + gp_Pnt(+131.76756408216349000000, +2.10451717388867540000, -66.27316135719137000000); + aWeights.ChangeValue(2, 2) = +1.00956608612165600000; + aPoles.ChangeValue(2, 2) = + gp_Pnt(+128.72252404033563000000, +2.10631182699007670000, -67.95492700832653600000); + aWeights.ChangeValue(2, 3) = +1.00957354292813030000; + aPoles.ChangeValue(2, 3) = + gp_Pnt(+125.65455798821807000000, +2.10780700070896730000, -69.59522708152212500000); + aWeights.ChangeValue(2, 4) = +1.00957948395970430000; + aPoles.ChangeValue(2, 4) = + gp_Pnt(+122.56436007131990000000, +2.10899819276768510000, -71.19369911011085600000); + aWeights.ChangeValue(2, 5) = +1.00958671248272140000; + aPoles.ChangeValue(2, 5) = + gp_Pnt(+119.45249930698063000000, +2.11044722765431250000, -72.74983445837314400000); + aWeights.ChangeValue(2, 6) = +1.00959353559448470000; + aPoles.ChangeValue(2, 6) = + gp_Pnt(+116.31971419268339000000, +2.11181476538007030000, -74.26341133748536500000); + aWeights.ChangeValue(2, 7) = +1.00959839503054960000; + aPoles.ChangeValue(2, 7) = + gp_Pnt(+113.16673272248508000000, +2.11278857229853930000, -75.73421464457315700000); + aWeights.ChangeValue(2, 8) = +1.00960405269294800000; + aPoles.ChangeValue(2, 8) = + gp_Pnt(+109.99417142410560000000, +2.11392227976110990000, -77.16175403351917300000); + aWeights.ChangeValue(2, 9) = +1.00961384794963970000; + aPoles.ChangeValue(2, 9) = + gp_Pnt(+103.61137952541701000000, +2.11588481923337430000, -79.92991318438167500000); + aWeights.ChangeValue(2, 10) = +1.00961857675621050000; + aPoles.ChangeValue(2, 10) = + gp_Pnt(+100.40113044627800000000, +2.11683214779396200000, -81.27049552555527600000); + aWeights.ChangeValue(2, 11) = +1.00962274789480260000; + aPoles.ChangeValue(2, 11) = + gp_Pnt(+97.17272090352022900000, +2.11766766635255620000, -82.56731642507010300000); + aWeights.ChangeValue(2, 12) = +1.00962679188946770000; + aPoles.ChangeValue(2, 12) = + gp_Pnt(+93.92682593436140300000, +2.11847763961438810000, -83.82006598438695700000); + aWeights.ChangeValue(2, 13) = +1.00963059350869510000; + aPoles.ChangeValue(2, 13) = + gp_Pnt(+90.66416580726762200000, +2.11923900414192050000, -85.02847304317147300000); + aWeights.ChangeValue(2, 14) = +1.00963398843777610000; + aPoles.ChangeValue(2, 14) = + gp_Pnt(+87.38545325411524800000, +2.11991885797243330000, -86.19228543784532800000); + aWeights.ChangeValue(2, 15) = +1.00963733185346640000; + aPoles.ChangeValue(2, 15) = + gp_Pnt(+84.09136475788710600000, +2.12058835416503610000, -87.31123582184922300000); + aWeights.ChangeValue(2, 16) = +1.00964648640037450000; + aPoles.ChangeValue(2, 16) = + gp_Pnt(+74.16530685267888100000, +2.12242134451684360000, -90.53282418399284400000); + aWeights.ChangeValue(2, 17) = +1.00965176794147850000; + aPoles.ChangeValue(2, 17) = + gp_Pnt(+67.48955141808187400000, +2.12347869023601370000, -92.50007118315201600000); + aWeights.ChangeValue(2, 18) = +1.00965632094816660000; + aPoles.ChangeValue(2, 18) = + gp_Pnt(+60.76066172731987800000, +2.12439006790716880000, -94.28495774595940300000); + aWeights.ChangeValue(2, 19) = +1.00966023501695720000; + aPoles.ChangeValue(2, 19) = + gp_Pnt(+53.98420072674593900000, +2.12517346720689600000, -95.88584819516199800000); + aWeights.ChangeValue(2, 20) = +1.00966358166845400000; + aPoles.ChangeValue(2, 20) = + gp_Pnt(+47.16601123883578600000, +2.12584324589548320000, -97.30134659055448800000); + aWeights.ChangeValue(2, 21) = +1.00966641434734730000; + aPoles.ChangeValue(2, 21) = + gp_Pnt(+40.31221541713015500000, +2.12641013013135180000, -98.53029698991525700000); + aWeights.ChangeValue(2, 22) = +1.00966876842241260000; + aPoles.ChangeValue(2, 22) = + gp_Pnt(+33.42921418500849000000, +2.12688121470786750000, -99.57178366381829400000); + aWeights.ChangeValue(2, 23) = +1.00967255617655650000; + aPoles.ChangeValue(2, 23) = + gp_Pnt(+19.61796125907087400000, +2.12763915883061920000, -101.27845724558523000000); + aWeights.ChangeValue(2, 24) = +1.00967399859793750000; + aPoles.ChangeValue(2, 24) = + gp_Pnt(+12.68919279606528900000, +2.12792777824197280000, -101.94361028295506000000); + aWeights.ChangeValue(2, 25) = +1.00967501382968900000; + aPoles.ChangeValue(2, 25) = + gp_Pnt(+5.74348853231593990000, +2.12813091177048630000, -102.41987704106546000000); + aWeights.ChangeValue(2, 26) = +1.00967561936957820000; + aPoles.ChangeValue(2, 26) = + gp_Pnt(-1.21307744928976070000, +2.12825206894226590000, -102.70676666240287000000); + aWeights.ChangeValue(2, 27) = +1.00967582483410380000; + aPoles.ChangeValue(2, 27) = + gp_Pnt(-8.17446448579617170000, +2.12829317854427910000, -102.80401081431219000000); + aWeights.ChangeValue(2, 28) = +1.00967563195849760000; + aPoles.ChangeValue(2, 28) = + gp_Pnt(-15.13466558037753100000, +2.12825458864942170000, -102.71156371647888000000); + aWeights.ChangeValue(2, 29) = +1.00967503459672270000; + aPoles.ChangeValue(2, 29) = + gp_Pnt(-22.08770764998126900000, +2.12813506662251010000, -102.42960214757312000000); + aWeights.ChangeValue(2, 30) = +1.00967300468446490000; + aPoles.ChangeValue(2, 30) = + gp_Pnt(-35.96760988752987500000, +2.12772890088942160000, -101.48744752427969000000); + aWeights.ChangeValue(2, 31) = +1.00967156777535580000; + aPoles.ChangeValue(2, 31) = + gp_Pnt(-42.89448004815705000000, +2.12744138030294440000, -100.82725372327035000000); + aWeights.ChangeValue(2, 32) = +1.00966969979090780000; + aPoles.ChangeValue(2, 32) = + gp_Pnt(-49.80232400744441900000, +2.12706759457740000000, -99.97834162579670200000); + aWeights.ChangeValue(2, 33) = +1.00966737970297200000; + aPoles.ChangeValue(2, 33) = + gp_Pnt(-56.68523628384353000000, +2.12660332632729520000, -98.94133225857957800000); + aWeights.ChangeValue(2, 34) = +1.00966457365849260000; + aPoles.ChangeValue(2, 34) = + gp_Pnt(-63.53734456971785200000, +2.12604178346724470000, -97.71706998895581400000); + aWeights.ChangeValue(2, 35) = +1.00966123497950600000; + aPoles.ChangeValue(2, 35) = + gp_Pnt(-70.35281013187348300000, +2.12537359908900880000, -96.30662240267085400000); + aWeights.ChangeValue(2, 36) = +1.00965730416314050000; + aPoles.ChangeValue(2, 36) = + gp_Pnt(-77.12582820180557500000, +2.12458683129447450000, -94.71128014840769500000); + aWeights.ChangeValue(2, 37) = +1.00965057624220010000; + aPoles.ChangeValue(2, 37) = + gp_Pnt(-86.97287762202962800000, +2.12324005462031540000, -92.10671540000876700000); + aWeights.ChangeValue(2, 38) = +1.00964829695753690000; + aPoles.ChangeValue(2, 38) = + gp_Pnt(-90.08473551349412400000, +2.12278376932639290000, -91.24134329153459100000); + aWeights.ChangeValue(2, 39) = +1.00964586498084840000; + aPoles.ChangeValue(2, 39) = + gp_Pnt(-93.18562459494498300000, +2.12229689243319890000, -90.33659169532975900000); + aWeights.ChangeValue(2, 40) = +1.00964327207694590000; + aPoles.ChangeValue(2, 40) = + gp_Pnt(-96.27496896689456200000, +2.12177776971417840000, -89.39262240039663300000); + aWeights.ChangeValue(2, 41) = +1.00964050782222770000; + aPoles.ChangeValue(2, 41) = + gp_Pnt(-99.35219429474524600000, +2.12122430736176200000, -88.40960770124299000000); + aWeights.ChangeValue(2, 42) = +1.00963755960468140000; + aPoles.ChangeValue(2, 42) = + gp_Pnt(-102.41672784011750000000, +2.12063397196916760000, -87.38773038403248000000); + aWeights.ChangeValue(2, 43) = +1.00963441262388320000; + aPoles.ChangeValue(2, 43) = + gp_Pnt(-105.46799849165807000000, +2.12000379050942020000, -86.32718371153289600000); + aWeights.ChangeValue(2, 44) = +1.00962747055142050000; + aPoles.ChangeValue(2, 44) = + gp_Pnt(-111.77654530973133000000, +2.11861352771318150000, -84.04460889409097000000); + aWeights.ChangeValue(2, 45) = +1.00962344856326270000; + aPoles.ChangeValue(2, 45) = + gp_Pnt(-115.03162075269803000000, +2.11780798556167320000, -82.81644583890866300000); + aWeights.ChangeValue(2, 46) = +1.00961960432211730000; + aPoles.ChangeValue(2, 46) = + gp_Pnt(-118.26993104545312000000, +2.11703799459344700000, -81.54389579486141300000); + aWeights.ChangeValue(2, 47) = +1.00961486342011010000; + aPoles.ChangeValue(2, 47) = + gp_Pnt(-121.49080060905077000000, +2.11608829135299810000, -80.22729418526657200000); + aWeights.ChangeValue(2, 48) = +1.00961029578343630000; + aPoles.ChangeValue(2, 48) = + gp_Pnt(-124.69348951442340000000, +2.11517321690879800000, -78.86685283462101400000); + aWeights.ChangeValue(2, 49) = +1.00960520454014850000; + aPoles.ChangeValue(2, 49) = + gp_Pnt(-127.87731027004676000000, +2.11415312105035590000, -77.46291256687052900000); + aWeights.ChangeValue(2, 50) = +1.00959965618773250000; + aPoles.ChangeValue(2, 50) = + gp_Pnt(-131.04156234039974000000, +2.11304129636208420000, -76.01577573259778800000); + aWeights.ChangeValue(2, 51) = +1.00958841592243690000; + aPoles.ChangeValue(2, 51) = + gp_Pnt(-137.10496896782513000000, +2.11078854745601690000, -73.14215015354327000000); + aWeights.ChangeValue(2, 52) = +1.00958190609540830000; + aPoles.ChangeValue(2, 52) = + gp_Pnt(-140.00695092509352000000, +2.10948365684345340000, -71.72161996530125800000); + aWeights.ChangeValue(2, 53) = +1.00957719225994170000; + aPoles.ChangeValue(2, 53) = + gp_Pnt(-142.89082065884315000000, +2.10853873486620720000, -70.26423921243410600000); + aWeights.ChangeValue(2, 54) = +1.00956830737110970000; + aPoles.ChangeValue(2, 54) = + gp_Pnt(-145.75622246387837000000, +2.10675729535240960000, -68.77065477701791000000); + aWeights.ChangeValue(2, 55) = +1.00956295195561060000; + aPoles.ChangeValue(2, 55) = + gp_Pnt(-148.60233584192389000000, +2.10568335609513650000, -67.24065593702246700000); + aWeights.ChangeValue(2, 56) = +1.00955425555818930000; + aPoles.ChangeValue(2, 56) = + gp_Pnt(-151.42883073983140000000, +2.10393921590561070000, -65.67497260857376800000); + aWeights.ChangeValue(2, 57) = +1.00954602613011150000; + aPoles.ChangeValue(2, 57) = + gp_Pnt(-154.23502547473331000000, +2.10228833319884910000, -64.07366145615235100000); + aWeights.ChangeValue(2, 58) = +1.00952742278729300000; + aPoles.ChangeValue(2, 58) = + gp_Pnt(-160.02004322449872000000, +2.09855561509982950000, -60.67448614970191300000); + aWeights.ChangeValue(2, 59) = +1.00951486183164940000; + aPoles.ChangeValue(2, 59) = + gp_Pnt(-162.99613088380306000000, +2.09603444654779600000, -58.87207545484513800000); + aWeights.ChangeValue(2, 60) = +1.00950821186194630000; + aPoles.ChangeValue(2, 60) = + gp_Pnt(-165.94554723216726000000, +2.09470002788322150000, -57.02566663092176900000); + aWeights.ChangeValue(2, 61) = +1.00948761363819010000; + aPoles.ChangeValue(2, 61) = + gp_Pnt(-168.87287521283019000000, +2.09056345777511910000, -55.14566924440539700000); + aWeights.ChangeValue(2, 62) = +1.00948175483840210000; + aPoles.ChangeValue(2, 62) = + gp_Pnt(-171.77025983587509000000, +2.08938700649796160000, -53.21936605947655600000); + aWeights.ChangeValue(2, 63) = +1.00946082358399410000; + aPoles.ChangeValue(2, 63) = + gp_Pnt(-174.64262250370552000000, +2.08518149324171190000, -51.25662423685646700000); + aWeights.ChangeValue(2, 64) = +1.00944596410269540000; + aPoles.ChangeValue(2, 64) = + gp_Pnt(-177.48726621628353000000, +2.08219461660139650000, -49.25423871740036900000); + aWeights.ChangeValue(2, 65) = +1.00942605045267530000; + aPoles.ChangeValue(2, 65) = + gp_Pnt(-180.30433731845508000000, +2.07819005191471670000, -47.21374002625280800000); + aWeights.ChangeValue(2, 66) = +1.00940832657289500000; + aPoles.ChangeValue(2, 66) = + gp_Pnt(-182.92026834009920000000, +2.07462614892136180000, -45.31887901738367200000); + aWeights.ChangeValue(2, 67) = +1.00938358350026620000; + aPoles.ChangeValue(2, 67) = + gp_Pnt(-185.51252638985017000000, +2.06964535925843180000, -43.39137009339865600000); + aWeights.ChangeValue(2, 68) = +1.00937745534293180000; + aPoles.ChangeValue(2, 68) = + gp_Pnt(-188.07970214515959000000, +2.06841969296490240000, -41.42984981640538000000); + aWeights.ChangeValue(2, 69) = +1.00932110415642830000; + aPoles.ChangeValue(2, 69) = + gp_Pnt(-190.62397551723822000000, +2.05705915800362950000, -39.43932945784815300000); + aWeights.ChangeValue(2, 70) = +1.00934018958961060000; + aPoles.ChangeValue(2, 70) = + gp_Pnt(-193.13969442040633000000, +2.06091733419064350000, -37.41169132931209200000); + aWeights.ChangeValue(2, 71) = +1.00926513417552190000; + aPoles.ChangeValue(2, 71) = + gp_Pnt(-195.63329272671066000000, +2.04578165519120160000, -35.35822241980492500000); + aWeights.ChangeValue(2, 72) = +1.00924284324010150000; + aPoles.ChangeValue(2, 72) = + gp_Pnt(-198.09761820165846000000, +2.04128022217386820000, -33.26975126412686700000); + aWeights.ChangeValue(2, 73) = +1.00920104311988150000; + aPoles.ChangeValue(2, 73) = + gp_Pnt(-200.53514329838038000000, +2.03283693524956680000, -31.15087616958502200000); + aWeights.ChangeValue(2, 74) = +1.00917029694372660000; + aPoles.ChangeValue(2, 74) = + gp_Pnt(-202.97255799662608000000, +2.02663657044316060000, -29.03126127135719200000); + aWeights.ChangeValue(2, 75) = +1.00906597799637380000; + aPoles.ChangeValue(2, 75) = + gp_Pnt(-205.38430250588374000000, +2.00548607046822540000, -26.88375382824776200000); + aWeights.ChangeValue(2, 76) = +1.00920552993214340000; + aPoles.ChangeValue(2, 76) = + gp_Pnt(-207.76049754988114000000, +2.03384304897263670000, -24.69318019977189100000); + aWeights.ChangeValue(2, 77) = +1.00876475817298510000; + aPoles.ChangeValue(2, 77) = + gp_Pnt(-210.12674832523484000000, +1.94448851661030540000, -22.49703905023471500000); + aWeights.ChangeValue(2, 78) = +1.00888387250469380000; + aPoles.ChangeValue(2, 78) = + gp_Pnt(-212.44800842772909000000, +1.96852329008748410000, -20.25405344977475500000); + aWeights.ChangeValue(2, 79) = +1.00881670070680670000; + aPoles.ChangeValue(2, 79) = + gp_Pnt(-214.73260668420895000000, +1.95481624964232450000, -17.97008076073228700000); + aWeights.ChangeValue(2, 80) = +1.00875338528797620000; + aPoles.ChangeValue(2, 80) = + gp_Pnt(-216.99878954601004000000, +1.94217039944868790000, -15.66960286452947800000); + aWeights.ChangeValue(2, 81) = +1.00842683370719490000; + aPoles.ChangeValue(2, 81) = + gp_Pnt(-219.23765241170187000000, +1.87520469423183880000, -13.35291936652889800000); + aWeights.ChangeValue(3, 1) = +0.99802424639217791000; + aPoles.ChangeValue(3, 1) = + gp_Pnt(+131.89876890515018000000, +1.35189067474276530000, -66.51059820355672500000); + aWeights.ChangeValue(3, 2) = +0.99802234515929278000; + aPoles.ChangeValue(3, 2) = + gp_Pnt(+128.85071311608803000000, +1.35313353595059940000, -68.19368716153405800000); + aWeights.ChangeValue(3, 3) = +0.99802076064203826000; + aPoles.ChangeValue(3, 3) = + gp_Pnt(+125.77977143028471000000, +1.35416922698475650000, -69.83529373030198400000); + aWeights.ChangeValue(3, 4) = +0.99801949820651126000; + aPoles.ChangeValue(3, 4) = + gp_Pnt(+122.68659332837821000000, +1.35499438550965670000, -71.43508181423516100000); + aWeights.ChangeValue(3, 5) = +0.99801796211084914000; + aPoles.ChangeValue(3, 5) = + gp_Pnt(+119.57173533591266000000, +1.35599832254451200000, -72.99244308799212900000); + aWeights.ChangeValue(3, 6) = +0.99801651211145281000; + aPoles.ChangeValue(3, 6) = + gp_Pnt(+116.43595392098000000000, +1.35694592285710100000, -74.50721127326711700000); + aWeights.ChangeValue(3, 7) = +0.99801547938002733000; + aPoles.ChangeValue(3, 7) = + gp_Pnt(+113.28000153804584000000, +1.35762078417993900000, -75.97921900496575600000); + aWeights.ChangeValue(3, 8) = +0.99801427699595313000; + aPoles.ChangeValue(3, 8) = + gp_Pnt(+110.10443724854701000000, +1.35840649430771500000, -77.40790012997213400000); + aWeights.ChangeValue(3, 9) = +0.99801219521191387000; + aPoles.ChangeValue(3, 9) = + gp_Pnt(+103.71561277285424000000, +1.35976677896647580000, -80.17831514578958300000); + aWeights.ChangeValue(3, 10) = +0.99801119017200446000; + aPoles.ChangeValue(3, 10) = + gp_Pnt(+100.50232486897988000000, +1.36042346207845170000, -81.51999289835789900000); + aWeights.ChangeValue(3, 11) = +0.99801030363459775000; + aPoles.ChangeValue(3, 11) = + gp_Pnt(+97.27087733082035500000, +1.36100269005924380000, -82.81788136334564900000); + aWeights.ChangeValue(3, 12) = +0.99800944410125381000; + aPoles.ChangeValue(3, 12) = + gp_Pnt(+94.02193936655145000000, +1.36156425167614130000, -84.07165794609035500000); + aWeights.ChangeValue(3, 13) = +0.99800863606857426000; + aPoles.ChangeValue(3, 13) = + gp_Pnt(+90.75622955795523700000, +1.36209214789795310000, -85.28105659074749700000); + aWeights.ChangeValue(3, 14) = +0.99800791446328430000; + aPoles.ChangeValue(3, 14) = + gp_Pnt(+87.47446474935537700000, +1.36256356235759690000, -86.44582972368263500000); + aWeights.ChangeValue(3, 15) = +0.99800720379689600000; + aPoles.ChangeValue(3, 15) = + gp_Pnt(+84.17731596959211500000, +1.36302781837419680000, -87.56569962027794000000); + aWeights.ChangeValue(3, 16) = +0.99800525790220496000; + aPoles.ChangeValue(3, 16) = + gp_Pnt(+74.24198734063921300000, +1.36429897306986340000, -90.78996991844945800000); + aWeights.ChangeValue(3, 17) = +0.99800413521623321000; + aPoles.ChangeValue(3, 17) = + gp_Pnt(+67.56001809965197000000, +1.36503231983535440000, -92.75885901427626800000); + aWeights.ChangeValue(3, 18) = +0.99800316736440942000; + aPoles.ChangeValue(3, 18) = + gp_Pnt(+60.82490109578901600000, +1.36566449260567850000, -94.54523441794054900000); + aWeights.ChangeValue(3, 19) = +0.99800233531441818000; + aPoles.ChangeValue(3, 19) = + gp_Pnt(+54.04219505707111900000, +1.36620793936844790000, -96.14746061467829500000); + aWeights.ChangeValue(3, 20) = +0.99800162387306934000; + aPoles.ChangeValue(3, 20) = + gp_Pnt(+47.21773986109732800000, +1.36667259642912180000, -97.56414160157402200000); + aWeights.ChangeValue(3, 21) = +0.99800102168630012000; + aPoles.ChangeValue(3, 21) = + gp_Pnt(+40.35765665228271400000, +1.36706588836418840000, -98.79412083143951400000); + aWeights.ChangeValue(3, 22) = +0.99800052123917371000; + aPoles.ChangeValue(3, 22) = + gp_Pnt(+33.46834796257081700000, +1.36739272798589770000, -99.83648116661171900000); + aWeights.ChangeValue(3, 23) = +0.99799971600020576000; + aPoles.ChangeValue(3, 23) = + gp_Pnt(+19.64441706716387900000, +1.36791861440644060000, -101.54459131896159000000); + aWeights.ChangeValue(3, 24) = +0.99799940935225717000; + aPoles.ChangeValue(3, 24) = + gp_Pnt(+12.70928858254282900000, +1.36811887624638580000, -102.21030492597274000000); + aWeights.ChangeValue(3, 25) = +0.99799919351964705000; + aPoles.ChangeValue(3, 25) = + gp_Pnt(+5.75722078489831280000, +1.36825982711689180000, -102.68697252648171000000); + aWeights.ChangeValue(3, 26) = +0.99799906478455291000; + aPoles.ChangeValue(3, 26) = + gp_Pnt(-1.20571159764999210000, +1.36834389755229970000, -102.97410341218257000000); + aWeights.ChangeValue(3, 27) = +0.99799902110371730000; + aPoles.ChangeValue(3, 27) = + gp_Pnt(-8.17346746041202720000, +1.36837242333404090000, -103.07142929357101000000); + aWeights.ChangeValue(3, 28) = +0.99799906210844536000; + aPoles.ChangeValue(3, 28) = + gp_Pnt(-15.14003926915473600000, +1.36834564548690430000, -102.97890429403182000000); + aWeights.ChangeValue(3, 29) = +0.99799918910460783000; + aPoles.ChangeValue(3, 29) = + gp_Pnt(-22.09945300681867100000, +1.36826271027814080000, -102.69670494840925000000); + aWeights.ChangeValue(3, 30) = +0.99799962065035785000; + aPoles.ChangeValue(3, 30) = + gp_Pnt(-35.99208002634647800000, +1.36798088374117890000, -101.75375562004130000000); + aWeights.ChangeValue(3, 31) = +0.99799992612548816000; + aPoles.ChangeValue(3, 31) = + gp_Pnt(-42.92529183965938000000, +1.36778138671521220000, -101.09300634269859000000); + aWeights.ChangeValue(3, 32) = +0.99800032324181509000; + aPoles.ChangeValue(3, 32) = + gp_Pnt(-49.83946240643516700000, +1.36752203923507090000, -100.24338136864999000000); + aWeights.ChangeValue(3, 33) = +0.99800081646744487000; + aPoles.ChangeValue(3, 33) = + gp_Pnt(-56.72868525600537000000, +1.36719992054037180000, -99.20550257416397200000); + aWeights.ChangeValue(3, 34) = +0.99800141299480705000; + aPoles.ChangeValue(3, 34) = + gp_Pnt(-63.58708851299418500000, +1.36681032802942060000, -97.98021473616272200000); + aWeights.ChangeValue(3, 35) = +0.99800212274065336000; + aPoles.ChangeValue(3, 35) = + gp_Pnt(-70.40883481115771800000, +1.36634677727753220000, -96.56858555851044900000); + aWeights.ChangeValue(3, 36) = +0.99800295834605834000; + aPoles.ChangeValue(3, 36) = + gp_Pnt(-77.18812120943384500000, +1.36580100206191160000, -94.97190570545618000000); + aWeights.ChangeValue(3, 37) = +0.99800438851666018000; + aPoles.ChangeValue(3, 37) = + gp_Pnt(-87.04430869357409500000, +1.36486684103840930000, -92.36516064771883800000); + aWeights.ChangeValue(3, 38) = +0.99800487302440710000; + aPoles.ChangeValue(3, 38) = + gp_Pnt(-90.15904180478642600000, +1.36455036334574700000, -91.49906951050012100000); + aWeights.ChangeValue(3, 39) = +0.99800538998403165000; + aPoles.ChangeValue(3, 39) = + gp_Pnt(-93.26280104894121300000, +1.36421268117563340000, -90.59356682763008500000); + aWeights.ChangeValue(3, 40) = +0.99800594114472085000; + aPoles.ChangeValue(3, 40) = + gp_Pnt(-96.35501076566437500000, +1.36385265030680070000, -89.64881447076304300000); + aWeights.ChangeValue(3, 41) = +0.99800652872047668000; + aPoles.ChangeValue(3, 41) = + gp_Pnt(-99.43509702281136200000, +1.36346882243976730000, -88.66498478868943800000); + aWeights.ChangeValue(3, 42) = +0.99800715539011531000; + aPoles.ChangeValue(3, 42) = + gp_Pnt(-102.50248760972849000000, +1.36305944519955100000, -87.64226061031386900000); + aWeights.ChangeValue(3, 43) = +0.99800782429726853000; + aPoles.ChangeValue(3, 43) = + gp_Pnt(-105.55661203062589000000, +1.36262246213878830000, -86.58083524789229600000); + aWeights.ChangeValue(3, 44) = +0.99800929984388531000; + aPoles.ChangeValue(3, 44) = + gp_Pnt(-111.87105232543304000000, +1.36165848631400000000, -84.29637819122412200000); + aWeights.ChangeValue(3, 45) = +0.99801015470554688000; + aPoles.ChangeValue(3, 45) = + gp_Pnt(-115.12916723990907000000, +1.36109998387148300000, -83.06721412498791300000); + aWeights.ChangeValue(3, 46) = +0.99801097177629106000; + aPoles.ChangeValue(3, 46) = + gp_Pnt(-118.37050305702043000000, +1.36056615831231790000, -81.79361556056927900000); + aWeights.ChangeValue(3, 47) = +0.99801197939908182000; + aPoles.ChangeValue(3, 47) = + gp_Pnt(-121.59440429164877000000, +1.35990780214188640000, -80.47594855348815200000); + aWeights.ChangeValue(3, 48) = +0.99801295017732938000; + aPoles.ChangeValue(3, 48) = + gp_Pnt(-124.80011198391350000000, +1.35927349774917520000, -79.11439339164216700000); + aWeights.ChangeValue(3, 49) = +0.99801403220993246000; + aPoles.ChangeValue(3, 49) = + gp_Pnt(-127.98695272451793000000, +1.35856646260703170000, -77.70931006235629500000); + aWeights.ChangeValue(3, 50) = +0.99801521135673477000; + aPoles.ChangeValue(3, 50) = + gp_Pnt(-131.15422466608416000000, +1.35779592883408770000, -76.26099835790641600000); + aWeights.ChangeValue(3, 51) = +0.99801760008173268000; + aPoles.ChangeValue(3, 51) = + gp_Pnt(-137.22341426940562000000, +1.35623488186342090000, -73.38505097675174200000); + aWeights.ChangeValue(3, 52) = +0.99801898347031770000; + aPoles.ChangeValue(3, 52) = + gp_Pnt(-140.12817143218851000000, +1.35533077140178190000, -71.96340636458091900000); + aWeights.ChangeValue(3, 53) = +0.99801998518653323000; + aPoles.ChangeValue(3, 53) = + gp_Pnt(-143.01477271081365000000, +1.35467609324036100000, -70.50482384325539400000); + aWeights.ChangeValue(3, 54) = +0.99802187318341851000; + aPoles.ChangeValue(3, 54) = + gp_Pnt(-145.88296929650440000000, +1.35344206211285110000, -69.01011970904052400000); + aWeights.ChangeValue(3, 55) = +0.99802301113749214000; + aPoles.ChangeValue(3, 55) = + gp_Pnt(-148.73181832948791000000, +1.35269822187277230000, -67.47885556090747600000); + aWeights.ChangeValue(3, 56) = +0.99802485896116799000; + aPoles.ChangeValue(3, 56) = + gp_Pnt(-151.56108889838526000000, +1.35149030610332030000, -65.91196867904423600000); + aWeights.ChangeValue(3, 57) = +0.99802660746081140000; + aPoles.ChangeValue(3, 57) = + gp_Pnt(-154.37005843077941000000, +1.35034719652907540000, -64.30939181125272300000); + aWeights.ChangeValue(3, 58) = +0.99803055992501810000; + aPoles.ChangeValue(3, 58) = + gp_Pnt(-160.16078498432634000000, +1.34776300585323040000, -60.90758294114521500000); + aWeights.ChangeValue(3, 59) = +0.99803322842151521000; + aPoles.ChangeValue(3, 59) = + gp_Pnt(-163.13986451909619000000, +1.34601805132734250000, -59.10384793755353900000); + aWeights.ChangeValue(3, 60) = +0.99803464125751229000; + aPoles.ChangeValue(3, 60) = + gp_Pnt(-166.09208359425281000000, +1.34509430571165490000, -57.25595351707911400000); + aWeights.ChangeValue(3, 61) = +0.99803901668572381000; + aPoles.ChangeValue(3, 61) = + gp_Pnt(-169.02259847263389000000, +1.34223252516315280000, -55.37471701865561600000); + aWeights.ChangeValue(3, 62) = +0.99804026123487555000; + aPoles.ChangeValue(3, 62) = + gp_Pnt(-171.92274649713781000000, +1.34141857200850120000, -53.44681670722970100000); + aWeights.ChangeValue(3, 63) = +0.99804470691034153000; + aPoles.ChangeValue(3, 63) = + gp_Pnt(-174.79824691248783000000, +1.33851025764084610000, -51.48277226031661500000); + aWeights.ChangeValue(3, 64) = +0.99804786265209489000; + aPoles.ChangeValue(3, 64) = + gp_Pnt(-177.64589658566118000000, +1.33644541377468110000, -49.47887210970986900000); + aWeights.ChangeValue(3, 65) = +0.99805209132461004000; + aPoles.ChangeValue(3, 65) = + gp_Pnt(-180.46609411219177000000, +1.33367801102763010000, -47.43691639460438100000); + aWeights.ChangeValue(3, 66) = +0.99805585511720041000; + aPoles.ChangeValue(3, 66) = + gp_Pnt(-183.08478109176986000000, +1.33121501172845690000, -45.54077967192022000000); + aWeights.ChangeValue(3, 67) = +0.99806110806405779000; + aPoles.ChangeValue(3, 67) = + gp_Pnt(-185.68001727848417000000, +1.32777577033982250000, -43.61205685047624300000); + aWeights.ChangeValue(3, 68) = +0.99806241123000117000; + aPoles.ChangeValue(3, 68) = + gp_Pnt(-188.24953622256075000000, +1.32692526187276720000, -41.64902509374122300000); + aWeights.ChangeValue(3, 69) = +0.99807437025077705000; + aPoles.ChangeValue(3, 69) = + gp_Pnt(-190.79766796840426000000, +1.31909012471800140000, -39.65777616520052400000); + aWeights.ChangeValue(3, 70) = +0.99807032269259688000; + aPoles.ChangeValue(3, 70) = + gp_Pnt(-193.31511620328166000000, +1.32174544077043810000, -37.62798636408343400000); + aWeights.ChangeValue(3, 71) = +0.99808625039380772000; + aPoles.ChangeValue(3, 71) = + gp_Pnt(-195.81278252670535000000, +1.31130937814640340000, -35.57429171163009600000); + aWeights.ChangeValue(3, 72) = +0.99809097922828749000; + aPoles.ChangeValue(3, 72) = + gp_Pnt(-198.28008499427182000000, +1.30820906528388470000, -33.48422839734306700000); + aWeights.ChangeValue(3, 73) = +0.99809984631895698000; + aPoles.ChangeValue(3, 73) = + gp_Pnt(-200.72099421295775000000, +1.30239515227575060000, -31.36416391357070300000); + aWeights.ChangeValue(3, 74) = +0.99810637147759285000; + aPoles.ChangeValue(3, 74) = + gp_Pnt(-203.16127009409345000000, +1.29812048781277520000, -29.24337154392900800000); + aWeights.ChangeValue(3, 75) = +0.99812847998895315000; + aPoles.ChangeValue(3, 75) = + gp_Pnt(-205.57777363915829000000, +1.28359951668439790000, -27.09591401257074100000); + aWeights.ChangeValue(3, 76) = +0.99809892249848597000; + aPoles.ChangeValue(3, 76) = + gp_Pnt(-207.95321979211485000000, +1.30303533816127510000, -24.90029856221717000000); + aWeights.ChangeValue(3, 77) = +0.99819234539248169000; + aPoles.ChangeValue(3, 77) = + gp_Pnt(-210.32920376311637000000, +1.24168994973372330000, -22.71372419603407900000); + aWeights.ChangeValue(3, 78) = +0.99816706733577565000; + aPoles.ChangeValue(3, 78) = + gp_Pnt(-212.65404345030839000000, +1.25824740351837460000, -20.46200135460381000000); + aWeights.ChangeValue(3, 79) = +0.99818127776964660000; + aPoles.ChangeValue(3, 79) = + gp_Pnt(-214.94032188963598000000, +1.24888524402456480000, -18.17894168737611000000); + aWeights.ChangeValue(3, 80) = +0.99819475509197664000; + aPoles.ChangeValue(3, 80) = + gp_Pnt(-217.21049138159862000000, +1.24010538580557930000, -15.87773552075580100000); + aWeights.ChangeValue(3, 81) = +0.99826376750414003000; + aPoles.ChangeValue(3, 81) = + gp_Pnt(-219.45963474898130000000, +1.19454909379966280000, -13.56324778739743800000); + aWeights.ChangeValue(4, 1) = +0.99424302042862245000; + aPoles.ChangeValue(4, 1) = + gp_Pnt(+132.13618409480023000000, +0.70840889522526063000, -66.94024029007874800000); + aWeights.ChangeValue(4, 2) = +0.99423758610938695000; + aPoles.ChangeValue(4, 2) = + gp_Pnt(+129.08297406972278000000, +0.70909252303575865000, -68.62615176496952100000); + aWeights.ChangeValue(4, 3) = +0.99423305718875432000; + aPoles.ChangeValue(4, 3) = + gp_Pnt(+126.00685240811242000000, +0.70966228194967051000, -70.27050713058781600000); + aWeights.ChangeValue(4, 4) = +0.99422944886444642000; + aPoles.ChangeValue(4, 4) = + gp_Pnt(+122.90845587213282000000, +0.71011623149435366000, -71.87297804945868100000); + aWeights.ChangeValue(4, 5) = +0.99422505844796127000; + aPoles.ChangeValue(4, 5) = + gp_Pnt(+119.78834767262531000000, +0.71066859395963999000, -73.43294438704307900000); + aWeights.ChangeValue(4, 6) = +0.99422091417503022000; + aPoles.ChangeValue(4, 6) = + gp_Pnt(+116.64728496160824000000, +0.71119000548737488000, -74.95024473036627900000); + aWeights.ChangeValue(4, 7) = +0.99421796254996875000; + aPoles.ChangeValue(4, 7) = + gp_Pnt(+113.48602386120655000000, +0.71156137519735096000, -76.42471498016054500000); + aWeights.ChangeValue(4, 8) = +0.99421452605999638000; + aPoles.ChangeValue(4, 8) = + gp_Pnt(+110.30511547520040000000, +0.71199375553590705000, -77.85578472764748900000); + aWeights.ChangeValue(4, 9) = +0.99420857626658776000; + aPoles.ChangeValue(4, 9) = + gp_Pnt(+103.90553506044348000000, +0.71274238201017392000, -80.63083668700706100000); + aWeights.ChangeValue(4, 10) = +0.99420570386914531000; + aPoles.ChangeValue(4, 10) = + gp_Pnt(+100.68683453164211000000, +0.71310380757531833000, -81.97476109354066400000); + aWeights.ChangeValue(4, 11) = +0.99420317017586146000; + aPoles.ChangeValue(4, 11) = + gp_Pnt(+97.44994659335081600000, +0.71342262156961334000, -83.27482261755635300000); + aWeights.ChangeValue(4, 12) = +0.99420071368291341000; + aPoles.ChangeValue(4, 12) = + gp_Pnt(+94.19554253170841200000, +0.71373172711717636000, -84.53069694549194000000); + aWeights.ChangeValue(4, 13) = +0.99419840439350793000; + aPoles.ChangeValue(4, 13) = + gp_Pnt(+90.92433917217061900000, +0.71402231445757036000, -85.74211902365664200000); + aWeights.ChangeValue(4, 14) = +0.99419634212229768000; + aPoles.ChangeValue(4, 14) = + gp_Pnt(+87.63705473050230000000, +0.71428182289044062000, -86.90884124933938900000); + aWeights.ChangeValue(4, 15) = +0.99419431112670464000; + aPoles.ChangeValue(4, 15) = + gp_Pnt(+84.33436439436984200000, +0.71453739893908408000, -88.03058362353205300000); + aWeights.ChangeValue(4, 16) = +0.99418875003915341000; + aPoles.ChangeValue(4, 16) = + gp_Pnt(+74.38231313217285400000, +0.71523720648163680000, -91.26025430410756200000); + aWeights.ChangeValue(4, 17) = +0.99418554160984429000; + aPoles.ChangeValue(4, 17) = + gp_Pnt(+67.68910051798944500000, +0.71564096751482986000, -93.23244050128337800000); + aWeights.ChangeValue(4, 18) = +0.99418277570171931000; + aPoles.ChangeValue(4, 18) = + gp_Pnt(+60.94265918181897500000, +0.71598904839509359000, -95.02180567308657500000); + aWeights.ChangeValue(4, 19) = +0.99418039790864621000; + aPoles.ChangeValue(4, 19) = + gp_Pnt(+54.14855416044807900000, +0.71628829211206946000, -96.62671289123449000000); + aWeights.ChangeValue(4, 20) = +0.99417836479981814000; + aPoles.ChangeValue(4, 20) = + gp_Pnt(+47.31263275511362600000, +0.71654416141740851000, -98.04576467050098600000); + aWeights.ChangeValue(4, 21) = +0.99417664391975691000; + aPoles.ChangeValue(4, 21) = + gp_Pnt(+40.44102486854357200000, +0.71676073875086976000, -99.27780280738555500000); + aWeights.ChangeValue(4, 22) = +0.99417521378830997000; + aPoles.ChangeValue(4, 22) = + gp_Pnt(+33.54014335198198900000, +0.71694072618465221000, -100.32190824729783000000); + aWeights.ChangeValue(4, 23) = +0.99417291266204433000; + aPoles.ChangeValue(4, 23) = + gp_Pnt(+19.69298272358705000000, +0.71723033475882103000, -102.03287833894613000000); + aWeights.ChangeValue(4, 24) = +0.99417203636017570000; + aPoles.ChangeValue(4, 24) = + gp_Pnt(+12.74619890889187300000, +0.71734062296661449000, -102.69970663658552000000); + aWeights.ChangeValue(4, 25) = +0.99417141958182476000; + aPoles.ChangeValue(4, 25) = + gp_Pnt(+5.78245043030823250000, +0.71741824902277995000, -103.17717197796689000000); + aWeights.ChangeValue(4, 26) = +0.99417105170022846000; + aPoles.ChangeValue(4, 26) = + gp_Pnt(-1.19217909208406270000, +0.71746454980293017000, -103.46478315098152000000); + aWeights.ChangeValue(4, 27) = +0.99417092687508068000; + aPoles.ChangeValue(4, 27) = + gp_Pnt(-8.17163978203099180000, +0.71748026003105458000, -103.56227159755184000000); + aWeights.ChangeValue(4, 28) = +0.99417104405253187000; + aPoles.ChangeValue(4, 28) = + gp_Pnt(-15.14991535484593800000, +0.71746551227361877000, -103.46959139663633000000); + aWeights.ChangeValue(4, 29) = +0.99417140696519068000; + aPoles.ChangeValue(4, 29) = + gp_Pnt(-22.12102296425817400000, +0.71741983693815459000, -103.18691926012113000000); + aWeights.ChangeValue(4, 30) = +0.99417264018315676000; + aPoles.ChangeValue(4, 30) = + gp_Pnt(-36.03699423807252300000, +0.71726462804712465000, -102.24239043165372000000); + aWeights.ChangeValue(4, 31) = +0.99417351313460955000; + aPoles.ChangeValue(4, 31) = + gp_Pnt(-42.98185258768797500000, +0.71715476185170723000, -101.58053487832193000000); + aWeights.ChangeValue(4, 32) = +0.99417464796983568000; + aPoles.ChangeValue(4, 32) = + gp_Pnt(-49.90763755490115700000, +0.71701193671091712000, -100.72948788576410000000); + aWeights.ChangeValue(4, 33) = +0.99417605745995530000; + aPoles.ChangeValue(4, 33) = + gp_Pnt(-56.80843390632649900000, +0.71683454604177377000, -99.68987236817491700000); + aWeights.ChangeValue(4, 34) = +0.99417776216385467000; + aPoles.ChangeValue(4, 34) = + gp_Pnt(-63.67836146608049600000, +0.71662000367742562000, -98.46253420440308400000); + aWeights.ChangeValue(4, 35) = +0.99417979042818705000; + aPoles.ChangeValue(4, 35) = + gp_Pnt(-70.51157486810592400000, +0.71636474389607163000, -97.04854231351581000000); + aWeights.ChangeValue(4, 36) = +0.99418217838737100000; + aPoles.ChangeValue(4, 36) = + gp_Pnt(-77.30226331485057800000, +0.71606422146024096000, -95.44918875092946600000); + aWeights.ChangeValue(4, 37) = +0.99418626551507883000; + aPoles.ChangeValue(4, 37) = + gp_Pnt(-87.17503156127875700000, +0.71554987190288122000, -92.83807781738744300000); + aWeights.ChangeValue(4, 38) = +0.99418765014289556000; + aPoles.ChangeValue(4, 38) = + gp_Pnt(-90.29499963358738100000, +0.71537562386381059000, -91.97053762881716900000); + aWeights.ChangeValue(4, 39) = +0.99418912751868260000; + aPoles.ChangeValue(4, 39) = + gp_Pnt(-93.40397633478176000000, +0.71518970580821706000, -91.06351986664817800000); + aWeights.ChangeValue(4, 40) = +0.99419070264287346000; + aPoles.ChangeValue(4, 40) = + gp_Pnt(-96.50138523104767800000, +0.71499148886670094000, -90.11718659777564300000); + aWeights.ChangeValue(4, 41) = +0.99419238184469383000; + aPoles.ChangeValue(4, 41) = + gp_Pnt(-99.58665166110419900000, +0.71478017704711161000, -89.13171035602891800000); + aWeights.ChangeValue(4, 42) = +0.99419417278216393000; + aPoles.ChangeValue(4, 42) = + gp_Pnt(-102.65920271683186000000, +0.71455480723882170000, -88.10727415073346000000); + aWeights.ChangeValue(4, 43) = +0.99419608444209617000; + aPoles.ChangeValue(4, 43) = + gp_Pnt(-105.71846722422283000000, +0.71431424921765596000, -87.04407147601585800000); + aWeights.ChangeValue(4, 44) = +0.99420030141669824000; + aPoles.ChangeValue(4, 44) = + gp_Pnt(-112.04353021881408000000, +0.71378360593609291000, -84.75579106017932000000); + aWeights.ChangeValue(4, 45) = +0.99420274455295243000; + aPoles.ChangeValue(4, 45) = + gp_Pnt(-115.30712351688430000000, +0.71347617951477893000, -83.52457168950516600000); + aWeights.ChangeValue(4, 46) = +0.99420507969516914000; + aPoles.ChangeValue(4, 46) = + gp_Pnt(-118.55391065270935000000, +0.71318234625457844000, -82.24884224143599500000); + aWeights.ChangeValue(4, 47) = +0.99420795946419460000; + aPoles.ChangeValue(4, 47) = + gp_Pnt(-121.78323693095153000000, +0.71281998990170370000, -80.92897147787398600000); + aWeights.ChangeValue(4, 48) = +0.99421073394729520000; + aPoles.ChangeValue(4, 48) = + gp_Pnt(-124.99434061394447000000, +0.71247088780699119000, -79.56513754354314500000); + aWeights.ChangeValue(4, 49) = +0.99421382643715051000; + aPoles.ChangeValue(4, 49) = + gp_Pnt(-128.18654935306802000000, +0.71208178090166396000, -78.15770189412481300000); + aWeights.ChangeValue(4, 50) = +0.99421719652005114000; + aPoles.ChangeValue(4, 50) = + gp_Pnt(-131.35915951555538000000, +0.71165775668839981000, -76.70696466864815500000); + aWeights.ChangeValue(4, 51) = +0.99422402375653052000; + aPoles.ChangeValue(4, 51) = + gp_Pnt(-137.43857370930490000000, +0.71079877890710363000, -73.82620311743470200000); + aWeights.ChangeValue(4, 52) = +0.99422797768691740000; + aPoles.ChangeValue(4, 52) = + gp_Pnt(-140.34822128390073000000, +0.71030132584778982000, -72.40218284379008700000); + aWeights.ChangeValue(4, 53) = +0.99423084075610579000; + aPoles.ChangeValue(4, 53) = + gp_Pnt(-143.23968120103163000000, +0.70994112075449667000, -70.94115847846593700000); + aWeights.ChangeValue(4, 54) = +0.99423623706224973000; + aPoles.ChangeValue(4, 54) = + gp_Pnt(-146.11271315064005000000, +0.70926223398833632000, -69.44395856663618400000); + aWeights.ChangeValue(4, 55) = +0.99423948964319253000; + aPoles.ChangeValue(4, 55) = + gp_Pnt(-148.96636467875118000000, +0.70885305306993507000, -67.91012785943519200000); + aWeights.ChangeValue(4, 56) = +0.99424477127021760000; + aPoles.ChangeValue(4, 56) = + gp_Pnt(-151.80041102174371000000, +0.70818863107582075000, -66.34061951491401000000); + aWeights.ChangeValue(4, 57) = +0.99424976912431906000; + aPoles.ChangeValue(4, 57) = + gp_Pnt(-154.61412826195317000000, +0.70755993553172780000, -64.73535576374381200000); + aWeights.ChangeValue(4, 58) = +0.99426106692542415000; + aPoles.ChangeValue(4, 58) = + gp_Pnt(-160.41462700323274000000, +0.70613881146866808000, -61.32785485541679500000); + aWeights.ChangeValue(4, 59) = +0.99426869485276259000; + aPoles.ChangeValue(4, 59) = + gp_Pnt(-163.39874797129167000000, +0.70517937516238605000, -59.52109641918814000000); + aWeights.ChangeValue(4, 60) = +0.99427273335051769000; + aPoles.ChangeValue(4, 60) = + gp_Pnt(-166.35588428707737000000, +0.70467140031138198000, -57.67014968010805400000); + aWeights.ChangeValue(4, 61) = +0.99428524121150996000; + aPoles.ChangeValue(4, 61) = + gp_Pnt(-169.29147402675417000000, +0.70309833118760823000, -55.78569706052214600000); + aWeights.ChangeValue(4, 62) = +0.99428879891231192000; + aPoles.ChangeValue(4, 62) = + gp_Pnt(-172.19641321622018000000, +0.70265088960130029000, -53.85463096447261900000); + aWeights.ChangeValue(4, 63) = +0.99430150819260854000; + aPoles.ChangeValue(4, 63) = + gp_Pnt(-175.07684836851479000000, +0.70105264832187786000, -51.88726956537038900000); + aWeights.ChangeValue(4, 64) = +0.99431053021705873000; + aPoles.ChangeValue(4, 64) = + gp_Pnt(-177.92932492963632000000, +0.69991818857623234000, -49.88000737868681300000); + aWeights.ChangeValue(4, 65) = +0.99432262020918794000; + aPoles.ChangeValue(4, 65) = + gp_Pnt(-180.75433885652521000000, +0.69839807993520564000, -47.83460859504128800000); + aWeights.ChangeValue(4, 66) = +0.99433338093448842000; + aPoles.ChangeValue(4, 66) = + gp_Pnt(-183.37745173242254000000, +0.69704510882650861000, -45.93530736698277700000); + aWeights.ChangeValue(4, 67) = +0.99434840096468768000; + aPoles.ChangeValue(4, 67) = + gp_Pnt(-185.97711214268182000000, +0.69515696483250133000, -44.00334265992864100000); + aWeights.ChangeValue(4, 68) = +0.99435212441487342000; + aPoles.ChangeValue(4, 68) = + gp_Pnt(-188.55092060214918000000, +0.69468843290184534000, -42.03706245316480100000); + aWeights.ChangeValue(4, 69) = +0.99438632495837886000; + aPoles.ChangeValue(4, 69) = + gp_Pnt(-191.10351948864678000000, +0.69039032514405918000, -40.04240176159244400000); + aWeights.ChangeValue(4, 70) = +0.99437474610357146000; + aPoles.ChangeValue(4, 70) = + gp_Pnt(-193.62512272227769000000, +0.69184483548244469000, -38.00925246210125900000); + aWeights.ChangeValue(4, 71) = +0.99442029730057158000; + aPoles.ChangeValue(4, 71) = + gp_Pnt(-196.12715745709386000000, +0.68612074693666814000, -35.95207510226987300000); + aWeights.ChangeValue(4, 72) = +0.99443382321708784000; + aPoles.ChangeValue(4, 72) = + gp_Pnt(-198.59871781224271000000, +0.68442148883790921000, -33.85842837168388500000); + aWeights.ChangeValue(4, 73) = +0.99445918644353237000; + aPoles.ChangeValue(4, 73) = + gp_Pnt(-201.04387700918369000000, +0.68123533540985159000, -31.73471330438436400000); + aWeights.ChangeValue(4, 74) = +0.99447784672499884000; + aPoles.ChangeValue(4, 74) = + gp_Pnt(-203.48830197003542000000, +0.67889067518118906000, -29.61036197082074800000); + aWeights.ChangeValue(4, 75) = +0.99454111417144087000; + aPoles.ChangeValue(4, 75) = + gp_Pnt(-205.90905874701556000000, +0.67094847421818948000, -27.45911353863423800000); + aWeights.ChangeValue(4, 76) = +0.99445650432969468000; + aPoles.ChangeValue(4, 76) = + gp_Pnt(-208.28851122415659000000, +0.68156618053615436000, -25.25989914496455000000); + aWeights.ChangeValue(4, 77) = +0.99472383917628937000; + aPoles.ChangeValue(4, 77) = + gp_Pnt(-210.66819860636727000000, +0.64801004101885640000, -23.06997485052475800000); + aWeights.ChangeValue(4, 78) = +0.99465154011060308000; + aPoles.ChangeValue(4, 78) = + gp_Pnt(-212.99829629837927000000, +0.65709020698928045000, -20.81293704958459000000); + aWeights.ChangeValue(4, 79) = +0.99469225299704522000; + aPoles.ChangeValue(4, 79) = + gp_Pnt(-215.28778722004142000000, +0.65198647566642243000, -18.52648999480212300000); + aWeights.ChangeValue(4, 80) = +0.99473072608314816000; + aPoles.ChangeValue(4, 80) = + gp_Pnt(-217.56233176434088000000, +0.64714607636795729000, -16.22125679272672700000); + aWeights.ChangeValue(4, 81) = +0.99492849872148770000; + aPoles.ChangeValue(4, 81) = + gp_Pnt(-219.81591407133737000000, +0.62237708094437050000, -13.90082269618381800000); + aWeights.ChangeValue(5, 1) = +0.99802424639217535000; + aPoles.ChangeValue(5, 1) = + gp_Pnt(+132.45622778603641000000, +0.24240580374773624000, -67.51941232824347600000); + aWeights.ChangeValue(5, 2) = +0.99802234515930366000; + aPoles.ChangeValue(5, 2) = + gp_Pnt(+129.39621499227619000000, +0.24264599956164210000, -69.20932849809996400000); + aWeights.ChangeValue(5, 3) = +0.99802076064199163000; + aPoles.ChangeValue(5, 3) = + gp_Pnt(+126.31320722587012000000, +0.24284620475411531000, -70.85757023346207000000); + aWeights.ChangeValue(5, 4) = +0.99801949820656444000; + aPoles.ChangeValue(5, 4) = + gp_Pnt(+123.20785947444472000000, +0.24300571706284735000, -72.46379895615213200000); + aWeights.ChangeValue(5, 5) = +0.99801796211084626000; + aPoles.ChangeValue(5, 5) = + gp_Pnt(+120.08075545981777000000, +0.24319982314295371000, -74.02745916652884300000); + aWeights.ChangeValue(5, 6) = +0.99801651211139986000; + aPoles.ChangeValue(5, 6) = + gp_Pnt(+116.93263892914923000000, +0.24338306180645181000, -75.54835063375608700000); + aWeights.ChangeValue(5, 7) = +0.99801547938007906000; + aPoles.ChangeValue(5, 7) = + gp_Pnt(+113.76425167349765000000, +0.24351357797625062000, -77.02627451676777100000); + aWeights.ChangeValue(5, 8) = +0.99801427699593348000; + aPoles.ChangeValue(5, 8) = + gp_Pnt(+110.57618061475338000000, +0.24366553774363486000, -78.46071663606139200000); + aWeights.ChangeValue(5, 9) = +0.99801219521177365000; + aPoles.ChangeValue(5, 9) = + gp_Pnt(+104.16217613984874000000, +0.24392865233284403000, -81.24228081548614000000); + aWeights.ChangeValue(5, 10) = +0.99801119017243534000; + aPoles.ChangeValue(5, 10) = + gp_Pnt(+100.93622072836907000000, +0.24405568433254640000, -82.58935804874866400000); + aWeights.ChangeValue(5, 11) = +0.99801030363411136000; + aPoles.ChangeValue(5, 11) = + gp_Pnt(+97.69202612265307600000, +0.24416774311013159000, -83.89246252379766100000); + aWeights.ChangeValue(5, 12) = +0.99800944410126124000; + aPoles.ChangeValue(5, 12) = + gp_Pnt(+94.43027249107268500000, +0.24427639255629080000, -85.15127753548810600000); + aWeights.ChangeValue(5, 13) = +0.99800863606905588000; + aPoles.ChangeValue(5, 13) = + gp_Pnt(+91.15167507122404800000, +0.24437853537532742000, -86.36553541507953500000); + aWeights.ChangeValue(5, 14) = +0.99800791446282866000; + aPoles.ChangeValue(5, 14) = + gp_Pnt(+87.85695090009397700000, +0.24446975628264125000, -87.53498464352057300000); + aWeights.ChangeValue(5, 15) = +0.99800720379704511000; + aPoles.ChangeValue(5, 15) = + gp_Pnt(+84.54678770958248900000, +0.24455959646371978000, -88.65934979276558200000); + aWeights.ChangeValue(5, 16) = +0.99800525790220262000; + aPoles.ChangeValue(5, 16) = + gp_Pnt(+74.57222162875666500000, +0.24480559775636487000, -91.89655746079053200000); + aWeights.ChangeValue(5, 17) = +0.99800413521623044000; + aPoles.ChangeValue(5, 17) = + gp_Pnt(+67.86385477996348900000, +0.24494753702776123000, -93.87334138726605200000); + aWeights.ChangeValue(5, 18) = +0.99800316736440708000; + aPoles.ChangeValue(5, 18) = + gp_Pnt(+61.10212188651380700000, +0.24506990714535715000, -95.66687639706128700000); + aWeights.ChangeValue(5, 19) = +0.99800233531441618000; + aPoles.ChangeValue(5, 19) = + gp_Pnt(+54.29260355218377000000, +0.24517511152453569000, -97.27552257290322800000); + aWeights.ChangeValue(5, 20) = +0.99800162387306812000; + aPoles.ChangeValue(5, 20) = + gp_Pnt(+47.44116356008504500000, +0.24526506890417449000, -98.69787956398771200000); + aWeights.ChangeValue(5, 21) = +0.99800102168629923000; + aPoles.ChangeValue(5, 21) = + gp_Pnt(+40.55394899036769400000, +0.24534121333759545000, -99.93278652962781900000); + aWeights.ChangeValue(5, 22) = +0.99800052123917249000; + aPoles.ChangeValue(5, 22) = + gp_Pnt(+33.63739034141031700000, +0.24540449418574758000, -100.97932209286283000000); + aWeights.ChangeValue(5, 23) = +0.99799971600020576000; + aPoles.ChangeValue(5, 23) = + gp_Pnt(+19.75877904385457000000, +0.24550631764576064000, -102.69427034587730000000); + aWeights.ChangeValue(5, 24) = +0.99799940935225595000; + aPoles.ChangeValue(5, 24) = + gp_Pnt(+12.79621461719473900000, +0.24554509442498113000, -103.36264862290150000000); + aWeights.ChangeValue(5, 25) = +0.99799919351964361000; + aPoles.ChangeValue(5, 25) = + gp_Pnt(+5.81664173483571470000, +0.24557238768930081000, -103.84122357926364000000); + aWeights.ChangeValue(5, 26) = +0.99799906478454914000; + aPoles.ChangeValue(5, 26) = + gp_Pnt(-1.17384006705611750000, +0.24558866712534574000, -104.12950288114470000000); + aWeights.ChangeValue(5, 27) = +0.99799902110371452000; + aPoles.ChangeValue(5, 27) = + gp_Pnt(-8.16916502467035950000, +0.24559419086566145000, -104.22721740658889000000); + aWeights.ChangeValue(5, 28) = +0.99799906210844525000; + aPoles.ChangeValue(5, 28) = + gp_Pnt(-15.16330109337111900000, +0.24558900548798951000, -104.13432123956672000000); + aWeights.ChangeValue(5, 29) = +0.99799918910460916000; + aPoles.ChangeValue(5, 29) = + gp_Pnt(-22.15024989420349800000, +0.24557294601509544000, -103.85099166853988000000); + aWeights.ChangeValue(5, 30) = +0.99799962065035952000; + aPoles.ChangeValue(5, 30) = + gp_Pnt(-36.09784025928350100000, +0.24551837507724711000, -102.90426687944763000000); + aWeights.ChangeValue(5, 31) = +0.99799992612548860000; + aPoles.ChangeValue(5, 31) = + gp_Pnt(-43.05848024708384300000, +0.24547974681812620000, -102.24087223758063000000); + aWeights.ChangeValue(5, 32) = +0.99800032324181287000; + aPoles.ChangeValue(5, 32) = + gp_Pnt(-50.00000136683811300000, +0.24542953068576923000, -101.38784584473753000000); + aWeights.ChangeValue(5, 33) = +0.99800081646744143000; + aPoles.ChangeValue(5, 33) = + gp_Pnt(-56.91647304260395400000, +0.24536716218422927000, -100.34581179308852000000); + aWeights.ChangeValue(5, 34) = +0.99800141299480460000; + aPoles.ChangeValue(5, 34) = + gp_Pnt(-63.80199929133657100000, +0.24529173277606747000, -99.11561770524215800000); + aWeights.ChangeValue(5, 35) = +0.99800212274065292000; + aPoles.ChangeValue(5, 35) = + gp_Pnt(-70.65071863638867500000, +0.24520198988589620000, -97.69833476064030700000); + aWeights.ChangeValue(5, 36) = +0.99800295834605834000; + aPoles.ChangeValue(5, 36) = + gp_Pnt(-77.45680402323041800000, +0.24509633690518939000, -96.09525772913629300000); + aWeights.ChangeValue(5, 37) = +0.99800438851665707000; + aPoles.ChangeValue(5, 37) = + gp_Pnt(-87.35194268844766400000, +0.24491551610541196000, -93.47806376363495000000); + aWeights.ChangeValue(5, 38) = +0.99800487302440644000; + aPoles.ChangeValue(5, 38) = + gp_Pnt(-90.47898339307414500000, +0.24485425955861742000, -92.60850028621504700000); + aWeights.ChangeValue(5, 39) = +0.99800538998403221000; + aPoles.ChangeValue(5, 39) = + gp_Pnt(-93.59500505694055100000, +0.24478890139349116000, -91.69936647202810300000); + aWeights.ChangeValue(5, 40) = +0.99800594114472096000; + aPoles.ChangeValue(5, 40) = + gp_Pnt(-96.69942959625443300000, +0.24471922075774133000, -90.75082469114758500000); + aWeights.ChangeValue(5, 41) = +0.99800652872047502000; + aPoles.ChangeValue(5, 41) = + gp_Pnt(-99.79168063143930600000, +0.24464493811196314000, -89.76304779373697300000); + aWeights.ChangeValue(5, 42) = +0.99800715539011187000; + aPoles.ChangeValue(5, 42) = + gp_Pnt(-102.87118348036965000000, +0.24456571523016235000, -88.73621911304020700000); + aWeights.ChangeValue(5, 43) = +0.99800782429726465000; + aPoles.ChangeValue(5, 43) = + gp_Pnt(-105.93736515171811000000, +0.24448115520035879000, -87.67053246863201800000); + aWeights.ChangeValue(5, 44) = +0.99800929984371112000; + aPoles.ChangeValue(5, 44) = + gp_Pnt(-112.27672847568951000000, +0.24429462970498794000, -85.37690123862388700000); + aWeights.ChangeValue(5, 45) = +0.99801015470633669000; + aPoles.ChangeValue(5, 45) = + gp_Pnt(-115.54769755356581000000, +0.24418656943131900000, -84.14279592325505100000); + aWeights.ChangeValue(5, 46) = +0.99801097177455889000; + aPoles.ChangeValue(5, 46) = + gp_Pnt(-118.80182311076892000000, +0.24408328894344730000, -82.86408351153079400000); + aWeights.ChangeValue(5, 47) = +0.99801197940129383000; + aPoles.ChangeValue(5, 47) = + gp_Pnt(-122.03843417449148000000, +0.24395592759703674000, -81.54111184389478200000); + aWeights.ChangeValue(5, 48) = +0.99801295017559344000; + aPoles.ChangeValue(5, 48) = + gp_Pnt(-125.25678060282321000000, +0.24383322797751039000, -80.17408187890907800000); + aWeights.ChangeValue(5, 49) = +0.99801403221073270000; + aPoles.ChangeValue(5, 49) = + gp_Pnt(-128.45617956663568000000, +0.24369647262362162000, -78.76334161483092100000); + aWeights.ChangeValue(5, 50) = +0.99801521135655380000; + aPoles.ChangeValue(5, 50) = + gp_Pnt(-131.63592529803751000000, +0.24354745092247693000, -77.30919404502431300000); + aWeights.ChangeValue(5, 51) = +0.99801760008187401000; + aPoles.ChangeValue(5, 51) = + gp_Pnt(-137.72900951211963000000, +0.24324557860805471000, -74.42165429070698200000); + aWeights.ChangeValue(5, 52) = +0.99801898346970708000; + aPoles.ChangeValue(5, 52) = + gp_Pnt(-140.64518873661288000000, +0.24307076523393223000, -72.99426192178911800000); + aWeights.ChangeValue(5, 53) = +0.99801998518786039000; + aPoles.ChangeValue(5, 53) = + gp_Pnt(-143.54316005505726000000, +0.24294418386170585000, -71.52981926220020600000); + aWeights.ChangeValue(5, 54) = +0.99802187318168345000; + aPoles.ChangeValue(5, 54) = + gp_Pnt(-146.42260629144496000000, +0.24270562978064991000, -70.02903356238938700000); + aWeights.ChangeValue(5, 55) = +0.99802301113888081000; + aPoles.ChangeValue(5, 55) = + gp_Pnt(-149.28266198929455000000, +0.24256185427332766000, -68.49161271016626500000); + aWeights.ChangeValue(5, 56) = +0.99802485896051119000; + aPoles.ChangeValue(5, 56) = + gp_Pnt(-152.12302992679020000000, +0.24232840183433180000, -66.91836178765569800000); + aWeights.ChangeValue(5, 57) = +0.99802660746095961000; + aPoles.ChangeValue(5, 57) = + gp_Pnt(-154.94301695331424000000, +0.24210751871096883000, -65.30929034698890200000); + aWeights.ChangeValue(5, 58) = +0.99803055992501044000; + aPoles.ChangeValue(5, 58) = + gp_Pnt(-160.75642720778953000000, +0.24160825342055195000, -61.89368007550259400000); + aWeights.ChangeValue(5, 59) = +0.99803322842160846000; + aPoles.ChangeValue(5, 59) = + gp_Pnt(-163.74717060555361000000, +0.24127121961594802000, -60.08255013672670200000); + aWeights.ChangeValue(5, 60) = +0.99803464125717123000; + aPoles.ChangeValue(5, 60) = + gp_Pnt(-166.71086689375946000000, +0.24109275824918924000, -58.22731479955884700000); + aWeights.ChangeValue(5, 61) = +0.99803901668628470000; + aPoles.ChangeValue(5, 61) = + gp_Pnt(-169.65297207222594000000, +0.24054025241076704000, -56.33806928337021700000); + aWeights.ChangeValue(5, 62) = +0.99804026123435818000; + aPoles.ChangeValue(5, 62) = + gp_Pnt(-172.56427255537395000000, +0.24038308942389072000, -54.40260496408483000000); + aWeights.ChangeValue(5, 63) = +0.99804470691060532000; + aPoles.ChangeValue(5, 63) = + gp_Pnt(-175.45101016300779000000, +0.23982181928534163000, -52.43032166263763100000); + aWeights.ChangeValue(5, 64) = +0.99804786265202527000; + aPoles.ChangeValue(5, 64) = + gp_Pnt(-178.30970270493245000000, +0.23942347201733374000, -50.41823769283568900000); + aWeights.ChangeValue(5, 65) = +0.99805209132460959000; + aPoles.ChangeValue(5, 65) = + gp_Pnt(-181.14080917168710000000, +0.23888978094458979000, -48.36782293133622100000); + aWeights.ChangeValue(5, 66) = +0.99805585511722006000; + aPoles.ChangeValue(5, 66) = + gp_Pnt(-183.76963089028271000000, +0.23841474156011525000, -46.46384963887197700000); + aWeights.ChangeValue(5, 67) = +0.99806110806389992000; + aPoles.ChangeValue(5, 67) = + gp_Pnt(-186.37480135254410000000, +0.23775204017864099000, -44.52702607060874100000); + aWeights.ChangeValue(5, 68) = +0.99806241123039841000; + aPoles.ChangeValue(5, 68) = + gp_Pnt(-188.95443339023049000000, +0.23758721013871806000, -42.55611011320790700000); + aWeights.ChangeValue(5, 69) = +0.99807437025022461000; + aPoles.ChangeValue(5, 69) = + gp_Pnt(-191.51185439080101000000, +0.23607937004601673000, -40.55588840407725800000); + aWeights.ChangeValue(5, 70) = +0.99807032269304363000; + aPoles.ChangeValue(5, 70) = + gp_Pnt(-194.03956238778505000000, +0.23658914396266717000, -38.51843887702921200000); + aWeights.ChangeValue(5, 71) = +0.99808625039358922000; + aPoles.ChangeValue(5, 71) = + gp_Pnt(-196.54607703546344000000, +0.23458111537982981000, -36.45513422497234800000); + aWeights.ChangeValue(5, 72) = +0.99809097922833689000; + aPoles.ChangeValue(5, 72) = + gp_Pnt(-199.02284030117690000000, +0.23398526561785285000, -34.35633603568415100000); + aWeights.ChangeValue(5, 73) = +0.99809984631895676000; + aPoles.ChangeValue(5, 73) = + gp_Pnt(-201.47284391020807000000, +0.23286808083306546000, -32.22700780168109700000); + aWeights.ChangeValue(5, 74) = +0.99810637147739267000; + aPoles.ChangeValue(5, 74) = + gp_Pnt(-203.92239692899503000000, +0.23204542949601353000, -30.09717639714928000000); + aWeights.ChangeValue(5, 75) = +0.99812847998973830000; + aPoles.ChangeValue(5, 75) = + gp_Pnt(-206.34684289021220000000, +0.22926391512904498000, -27.93902362306789300000); + aWeights.ChangeValue(5, 76) = +0.99809892249694432000; + aPoles.ChangeValue(5, 76) = + gp_Pnt(-208.73420674519565000000, +0.23297935369059405000, -25.73750919512989600000); + aWeights.ChangeValue(5, 77) = +0.99819234539430379000; + aPoles.ChangeValue(5, 77) = + gp_Pnt(-211.11258262007470000000, +0.22122441504945897000, -23.53328220960779800000); + aWeights.ChangeValue(5, 78) = +0.99816706733442118000; + aPoles.ChangeValue(5, 78) = + gp_Pnt(-213.44890831521380000000, +0.22441150695403267000, -21.27426418813643800000); + aWeights.ChangeValue(5, 79) = +0.99818127777024523000; + aPoles.ChangeValue(5, 79) = + gp_Pnt(-215.74298068197336000000, +0.22262736656649654000, -18.98075706196405200000); + aWeights.ChangeValue(5, 80) = +0.99819475509184485000; + aPoles.ChangeValue(5, 80) = + gp_Pnt(-218.02209738817496000000, +0.22092240555297402000, -16.66880151580776100000); + aWeights.ChangeValue(5, 81) = +0.99826376750413803000; + aPoles.ChangeValue(5, 81) = + gp_Pnt(-220.27506837008727000000, +0.21227676902692139000, -14.33587171753685400000); + aWeights.ChangeValue(6, 1) = +1.00955713824395920000; + aPoles.ChangeValue(6, 1) = + gp_Pnt(+132.82497533600920000000, -0.00000000000000355271, -68.18672206105269100000); + aWeights.ChangeValue(6, 2) = +1.00956608612165510000; + aPoles.ChangeValue(6, 2) = + gp_Pnt(+129.75720107675980000000, -0.00000000000001501048, -69.88134023490506800000); + aWeights.ChangeValue(6, 3) = +1.00957354292813720000; + aPoles.ChangeValue(6, 3) = + gp_Pnt(+126.66630562875893000000, +0.00000000000001468880, -71.53414324810810900000); + aWeights.ChangeValue(6, 4) = +1.00957948395969920000; + aPoles.ChangeValue(6, 4) = + gp_Pnt(+123.55299204973852000000, -0.00000000000002420214, -73.14476521965842400000); + aWeights.ChangeValue(6, 5) = +1.00958671248272540000; + aPoles.ChangeValue(6, 5) = + gp_Pnt(+120.41786571412476000000, +0.00000000000000774289, -74.71276629883676900000); + aWeights.ChangeValue(6, 6) = +1.00959353559449030000; + aPoles.ChangeValue(6, 6) = + gp_Pnt(+117.26165038381876000000, +0.00000000000002827238, -76.23787924846354300000); + aWeights.ChangeValue(6, 7) = +1.00959839503053540000; + aPoles.ChangeValue(6, 7) = + gp_Pnt(+114.08506189168672000000, -0.00000000000002567399, -77.71984701658058700000); + aWeights.ChangeValue(6, 8) = +1.00960405269295440000; + aPoles.ChangeValue(6, 8) = + gp_Pnt(+110.88875430250306000000, +0.00000000000001531652, -79.15824703626482500000); + aWeights.ChangeValue(6, 9) = +1.00961384794965610000; + aPoles.ChangeValue(6, 9) = + gp_Pnt(+104.45816547225203000000, +0.00000000000002372811, -81.94743615023858800000); + aWeights.ChangeValue(6, 10) = +1.00961857675613920000; + aPoles.ChangeValue(6, 10) = + gp_Pnt(+101.22387341781818000000, -0.00000000000003253030, -83.29820264563102200000); + aWeights.ChangeValue(6, 11) = +1.00962274789490230000; + aPoles.ChangeValue(6, 11) = + gp_Pnt(+97.97127406275538400000, +0.00000000000002165813, -84.60486564781918200000); + aWeights.ChangeValue(6, 12) = +1.00962679188945900000; + aPoles.ChangeValue(6, 12) = + gp_Pnt(+94.70106106239124700000, +0.00000000000003307844, -85.86712155505158300000); + aWeights.ChangeValue(6, 13) = +1.00963059350859920000; + aPoles.ChangeValue(6, 13) = + gp_Pnt(+91.41394873512904000000, -0.00000000000001002370, -87.08469757155246800000); + aWeights.ChangeValue(6, 14) = +1.00963398843787310000; + aPoles.ChangeValue(6, 14) = + gp_Pnt(+88.11065082060795800000, -0.00000000000001620026, -88.25733602781997400000); + aWeights.ChangeValue(6, 15) = +1.00963733185343440000; + aPoles.ChangeValue(6, 15) = + gp_Pnt(+84.79187377942922400000, +0.00000000000001387836, -89.38476986722990600000); + aWeights.ChangeValue(6, 16) = +1.00964648640037490000; + aPoles.ChangeValue(6, 16) = + gp_Pnt(+74.79138897281484300000, +0.00000000000001147648, -92.63077806554609600000); + aWeights.ChangeValue(6, 17) = +1.00965176794147980000; + aPoles.ChangeValue(6, 17) = + gp_Pnt(+68.06556894151637500000, +0.00000000000001348105, -94.61292925638954900000); + aWeights.ChangeValue(6, 18) = +1.00965632094816880000; + aPoles.ChangeValue(6, 18) = + gp_Pnt(+61.28620656548358900000, +0.00000000000001132208, -96.41133393799678700000); + aWeights.ChangeValue(6, 19) = +1.00966023501695920000; + aPoles.ChangeValue(6, 19) = + gp_Pnt(+54.45890525472331200000, +0.00000000000000779610, -98.02434736777235000000); + aWeights.ChangeValue(6, 20) = +1.00966358166845540000; + aPoles.ChangeValue(6, 20) = + gp_Pnt(+47.58955228763309700000, +0.00000000000000496426, -99.45056478986435900000); + aWeights.ChangeValue(6, 21) = +1.00966641434734750000; + aPoles.ChangeValue(6, 21) = + gp_Pnt(+40.68431826182812500000, +0.00000000000000415229, -100.68882169811890000000); + aWeights.ChangeValue(6, 22) = +1.00966876842241240000; + aPoles.ChangeValue(6, 22) = + gp_Pnt(+33.74965652868991100000, +0.00000000000000595055, -101.73819405254569000000); + aWeights.ChangeValue(6, 23) = +1.00967255617655690000; + aPoles.ChangeValue(6, 23) = + gp_Pnt(+19.83474481990451800000, +0.00000000000000626687, -103.45778313292877000000); + aWeights.ChangeValue(6, 24) = +1.00967399859793900000; + aPoles.ChangeValue(6, 24) = + gp_Pnt(+12.85396744583563800000, +0.00000000000000961706, -104.12796934503771000000); + aWeights.ChangeValue(6, 25) = +1.00967501382969150000; + aPoles.ChangeValue(6, 25) = + gp_Pnt(+5.85612456199985140000, +0.00000000000001451316, -104.60783896197547000000); + aWeights.ChangeValue(6, 26) = +1.00967561936958040000; + aPoles.ChangeValue(6, 26) = + gp_Pnt(-1.15266320632332260000, +0.00000000000001739414, -104.89689790453474000000); + aWeights.ChangeValue(6, 27) = +1.00967582483410530000; + aPoles.ChangeValue(6, 27) = + gp_Pnt(-8.16630892272242730000, +0.00000000000001688939, -104.99487618531697000000); + aWeights.ChangeValue(6, 28) = +1.00967563195849790000; + aPoles.ChangeValue(6, 28) = + gp_Pnt(-15.17875958769639600000, +0.00000000000001381871, -104.90172793642448000000); + aWeights.ChangeValue(6, 29) = +1.00967503459672230000; + aPoles.ChangeValue(6, 29) = + gp_Pnt(-22.18399638815323600000, +0.00000000000001119232, -104.61763141615558000000); + aWeights.ChangeValue(6, 30) = +1.00967300468446440000; + aPoles.ChangeValue(6, 30) = + gp_Pnt(-36.16808769247344200000, +0.00000000000001926896, -103.66834538209933000000); + aWeights.ChangeValue(6, 31) = +1.00967156777535520000; + aPoles.ChangeValue(6, 31) = + gp_Pnt(-43.14695215605046700000, +0.00000000000002086710, -103.00315490229345000000); + aWeights.ChangeValue(6, 32) = +1.00966969979090850000; + aPoles.ChangeValue(6, 32) = + gp_Pnt(-50.10664482445217500000, +0.00000000000002115378, -102.14781821392242000000); + aWeights.ChangeValue(6, 33) = +1.00966737970297340000; + aPoles.ChangeValue(6, 33) = + gp_Pnt(-57.04121502398449900000, +0.00000000000002158031, -101.10296070558179000000); + aWeights.ChangeValue(6, 34) = +1.00966457365849420000; + aPoles.ChangeValue(6, 34) = + gp_Pnt(-63.94474533155499800000, +0.00000000000002290082, -99.86943240681669900000); + aWeights.ChangeValue(6, 35) = +1.00966123497950670000; + aPoles.ChangeValue(6, 35) = + gp_Pnt(-70.81135197820185600000, +0.00000000000002517228, -98.44830786498150100000); + aWeights.ChangeValue(6, 36) = +1.00965730416314160000; + aPoles.ChangeValue(6, 36) = + gp_Pnt(-77.63518524225725100000, +0.00000000000002775445, -96.84088598857995600000); + aWeights.ChangeValue(6, 37) = +1.00965057624219750000; + aPoles.ChangeValue(6, 37) = + gp_Pnt(-87.55609990295042200000, +0.00000000000002423047, -94.21659328767886200000); + aWeights.ChangeValue(6, 38) = +1.00964829695753600000; + aPoles.ChangeValue(6, 38) = + gp_Pnt(-90.69129861847109500000, +0.00000000000002587407, -93.34466557470412300000); + aWeights.ChangeValue(6, 39) = +1.00964586498085130000; + aPoles.ChangeValue(6, 39) = + gp_Pnt(-93.81544408055053500000, +0.00000000000003006614, -92.43305897005754400000); + aWeights.ChangeValue(6, 40) = +1.00964327207695040000; + aPoles.ChangeValue(6, 40) = + gp_Pnt(-96.92795589621758300000, +0.00000000000003388207, -91.48193626907418300000); + aWeights.ChangeValue(6, 41) = +1.00964050782223150000; + aPoles.ChangeValue(6, 41) = + gp_Pnt(-100.02825520717420000000, +0.00000000000003564727, -90.49147079864104600000); + aWeights.ChangeValue(6, 42) = +1.00963755960468200000; + aPoles.ChangeValue(6, 42) = + gp_Pnt(-103.11576472135789000000, +0.00000000000003493709, -89.46184640324143800000); + aWeights.ChangeValue(6, 43) = +1.00963441262388120000; + aPoles.ChangeValue(6, 43) = + gp_Pnt(-106.18990874397944000000, +0.00000000000003257692, -88.39325742978746800000); + aWeights.ChangeValue(6, 44) = +1.00962747055172470000; + aPoles.ChangeValue(6, 44) = + gp_Pnt(-112.54574015681582000000, +0.00000000000006160655, -86.09336936272072200000); + aWeights.ChangeValue(6, 45) = +1.00962344856191890000; + aPoles.ChangeValue(6, 45) = + gp_Pnt(-115.82520602454126000000, -0.00000000000003931317, -84.85588414554271700000); + aWeights.ChangeValue(6, 46) = +1.00961960432502520000; + aPoles.ChangeValue(6, 46) = + gp_Pnt(-119.08778487668772000000, +0.00000000000016494845, -83.57368219250022900000); + aWeights.ChangeValue(6, 47) = +1.00961486341637220000; + aPoles.ChangeValue(6, 47) = + gp_Pnt(-122.33277704237545000000, -0.00000000000006102663, -82.24707666574315100000); + aWeights.ChangeValue(6, 48) = +1.00961029578642010000; + aPoles.ChangeValue(6, 48) = + gp_Pnt(-125.55945424028559000000, +0.00000000000005443726, -80.87630621413205700000); + aWeights.ChangeValue(6, 49) = +1.00960520453872830000; + aPoles.ChangeValue(6, 49) = + gp_Pnt(-128.76711471386264000000, +0.00000000000006731284, -79.46169679871513800000); + aWeights.ChangeValue(6, 50) = +1.00959965618806670000; + aPoles.ChangeValue(6, 50) = + gp_Pnt(-131.95505034236234000000, +0.00000000000001744703, -78.00355594499717400000); + aWeights.ChangeValue(6, 51) = +1.00958841592259230000; + aPoles.ChangeValue(6, 51) = + gp_Pnt(-138.06383173526737000000, +0.00000000000005091738, -75.10807262033468100000); + aWeights.ChangeValue(6, 52) = +1.00958190609477040000; + aPoles.ChangeValue(6, 52) = + gp_Pnt(-140.98751167669514000000, +0.00000000000001249767, -73.67671445695528100000); + aWeights.ChangeValue(6, 53) = +1.00957719226123470000; + aPoles.ChangeValue(6, 53) = + gp_Pnt(-143.89297197091258000000, +0.00000000000004304958, -72.20827197874005800000); + aWeights.ChangeValue(6, 54) = +1.00956830736954160000; + aPoles.ChangeValue(6, 54) = + gp_Pnt(-146.77976177895343000000, +0.00000000000014315600, -70.70325097869228200000); + aWeights.ChangeValue(6, 55) = +1.00956295195680430000; + aPoles.ChangeValue(6, 55) = + gp_Pnt(-149.64716302220674000000, -0.00000000000013374459, -69.16163316263994400000); + aWeights.ChangeValue(6, 56) = +1.00955425555763600000; + aPoles.ChangeValue(6, 56) = + gp_Pnt(-152.49476001470052000000, +0.00000000000014982315, -67.58397318476696100000); + aWeights.ChangeValue(6, 57) = +1.00954602613024340000; + aPoles.ChangeValue(6, 57) = + gp_Pnt(-155.32190503332637000000, -0.00000000000000021066, -65.97043121899140800000); + aWeights.ChangeValue(6, 58) = +1.00952742278739690000; + aPoles.ChangeValue(6, 58) = + gp_Pnt(-161.15007234465017000000, -0.00000000000001992904, -62.54527347940126700000); + aWeights.ChangeValue(6, 59) = +1.00951486183122910000; + aPoles.ChangeValue(6, 59) = + gp_Pnt(-164.14837014605524000000, +0.00000000000023572067, -60.72896647597298900000); + aWeights.ChangeValue(6, 60) = +1.00950821186278380000; + aPoles.ChangeValue(6, 60) = + gp_Pnt(-167.11960531963629000000, -0.00000000000028988207, -58.86870049528032900000); + aWeights.ChangeValue(6, 61) = +1.00948761363721440000; + aPoles.ChangeValue(6, 61) = + gp_Pnt(-170.06906478280905000000, +0.00000000000040689923, -56.97372124744497800000); + aWeights.ChangeValue(6, 62) = +1.00948175483910860000; + aPoles.ChangeValue(6, 62) = + gp_Pnt(-172.98765254825670000000, -0.00000000000024250881, -55.03312548926784600000); + aWeights.ChangeValue(6, 63) = +1.00946082358368820000; + aPoles.ChangeValue(6, 63) = + gp_Pnt(-175.88148729884773000000, +0.00000000000015443744, -53.05496328096450000000); + aWeights.ChangeValue(6, 64) = +1.00944596410276510000; + aPoles.ChangeValue(6, 64) = + gp_Pnt(-178.74719668858941000000, +0.00000000000002184305, -51.03719587787818300000); + aWeights.ChangeValue(6, 65) = +1.00942605045267690000; + aPoles.ChangeValue(6, 65) = + gp_Pnt(-181.58512029181043000000, +0.00000000000003863576, -48.98084041218928800000); + aWeights.ChangeValue(6, 66) = +1.00940832657292460000; + aPoles.ChangeValue(6, 66) = + gp_Pnt(-184.22041885135505000000, +0.00000000000012642202, -47.07128183802177500000); + aWeights.ChangeValue(6, 67) = +1.00938358350016230000; + aPoles.ChangeValue(6, 67) = + gp_Pnt(-186.83172267077580000000, -0.00000000000026075896, -45.12863792869809700000); + aWeights.ChangeValue(6, 68) = +1.00937745534316470000; + aPoles.ChangeValue(6, 68) = + gp_Pnt(-189.41814135962036000000, +0.00000000000050815389, -43.15221363464823400000); + aWeights.ChangeValue(6, 69) = +1.00932110415609880000; + aPoles.ChangeValue(6, 69) = + gp_Pnt(-191.98049421722968000000, -0.00000000000036869153, -41.14519558079494000000); + aWeights.ChangeValue(6, 70) = +1.00934018958992230000; + aPoles.ChangeValue(6, 70) = + gp_Pnt(-194.51554398045388000000, +0.00000000000024701945, -39.10283303403318900000); + aWeights.ChangeValue(6, 71) = +1.00926513417534820000; + aPoles.ChangeValue(6, 71) = + gp_Pnt(-197.02654362639632000000, +0.00000000000002378284, -37.03182458375535900000); + aWeights.ChangeValue(6, 72) = +1.00924284324015100000; + aPoles.ChangeValue(6, 72) = + gp_Pnt(-199.50902604112426000000, +0.00000000000001468063, -34.92696457232537500000); + aWeights.ChangeValue(6, 73) = +1.00920104311988210000; + aPoles.ChangeValue(6, 73) = + gp_Pnt(-201.96417476016930000000, +0.00000000000004485301, -32.79087292323346500000); + aWeights.ChangeValue(6, 74) = +1.00917029694376930000; + aPoles.ChangeValue(6, 74) = + gp_Pnt(-204.41947086956830000000, +0.00000000000007013856, -30.65436716589900700000); + aWeights.ChangeValue(6, 75) = +1.00906597799622610000; + aPoles.ChangeValue(6, 75) = + gp_Pnt(-206.84718146821811000000, -0.00000000000006381675, -28.48746943619916600000); + aWeights.ChangeValue(6, 76) = +1.00920552993238920000; + aPoles.ChangeValue(6, 76) = + gp_Pnt(-209.24487385523256000000, +0.00000000000020688933, -26.28443183778934900000); + aWeights.ChangeValue(6, 77) = +1.00876475817276390000; + aPoles.ChangeValue(6, 77) = + gp_Pnt(-211.61934752962611000000, -0.00000000000012087895, -24.05869960942788700000); + aWeights.ChangeValue(6, 78) = +1.00888387250480620000; + aPoles.ChangeValue(6, 78) = + gp_Pnt(-213.96155431166437000000, +0.00000000000019025578, -21.80066237623914200000); + aWeights.ChangeValue(6, 79) = +1.00881670070678450000; + aPoles.ChangeValue(6, 79) = + gp_Pnt(-216.26151615033589000000, -0.00000000000009572292, -19.49741392382435400000); + aWeights.ChangeValue(6, 80) = +1.00875338528797620000; + aPoles.ChangeValue(6, 80) = + gp_Pnt(-218.54531424806936000000, +0.00000000000008182630, -17.17704407009146500000); + aWeights.ChangeValue(6, 81) = +1.00842683370719580000; + aPoles.ChangeValue(6, 81) = + gp_Pnt(-220.79435406720884000000, +0.00000000000004973799, -14.82789528118522200000); + aWeights.ChangeValue(7, 1) = +1.02986327036737910000; + aPoles.ChangeValue(7, 1) = + gp_Pnt(+133.20307692191452000000, -0.00000000000000177636, -68.87095947031473000000); + aWeights.ChangeValue(7, 2) = +1.02989244478762340000; + aPoles.ChangeValue(7, 2) = + gp_Pnt(+130.12738123407763000000, -0.00000000000000516390, -70.57040146390383500000); + aWeights.ChangeValue(7, 3) = +1.02991676091110000000; + aPoles.ChangeValue(7, 3) = + gp_Pnt(+127.02840986317391000000, +0.00000000000000554535, -72.22789464235242500000); + aWeights.ChangeValue(7, 4) = +1.02993613450137910000; + aPoles.ChangeValue(7, 4) = + gp_Pnt(+123.90694758506712000000, -0.00000000000000702621, -73.84302715009133100000); + aWeights.ChangeValue(7, 5) = +1.02995970896171030000; + aPoles.ChangeValue(7, 5) = + gp_Pnt(+120.76360256847768000000, -0.00000000000000047370, -75.41549467632542300000); + aWeights.ChangeValue(7, 6) = +1.02998196300924330000; + aPoles.ChangeValue(7, 6) = + gp_Pnt(+117.59908279457284000000, +0.00000000000000772901, -76.94495426059752700000); + aWeights.ChangeValue(7, 7) = +1.02999781361776170000; + aPoles.ChangeValue(7, 7) = + gp_Pnt(+114.41407453952652000000, -0.00000000000000327310, -78.43108601253017300000); + aWeights.ChangeValue(7, 8) = +1.03001626830282000000; + aPoles.ChangeValue(7, 8) = + gp_Pnt(+111.20931631680004000000, +0.00000000000000421483, -79.87356087705671800000); + aWeights.ChangeValue(7, 9) = +1.03004822145821140000; + aPoles.ChangeValue(7, 9) = + gp_Pnt(+104.76172782897289000000, +0.00000000000000259283, -82.67059011797552200000); + aWeights.ChangeValue(7, 10) = +1.03006364818919470000; + aPoles.ChangeValue(7, 10) = + gp_Pnt(+101.51889932580750000000, +0.00000000000000793496, -84.02514647707548100000); + aWeights.ChangeValue(7, 11) = +1.03007725635610380000; + aPoles.ChangeValue(7, 11) = + gp_Pnt(+98.25768758130365700000, +0.00000000000000127608, -85.33546669488836800000); + aWeights.ChangeValue(7, 12) = +1.03009045031501540000; + aPoles.ChangeValue(7, 12) = + gp_Pnt(+94.97880175952953200000, +0.00000000000000289709, -86.60126064632369500000); + aWeights.ChangeValue(7, 13) = +1.03010285398165520000; + aPoles.ChangeValue(7, 13) = + gp_Pnt(+91.68295682468645700000, +0.00000000000000548904, -87.82224920548925700000); + aWeights.ChangeValue(7, 14) = +1.03011393120368040000; + aPoles.ChangeValue(7, 14) = + gp_Pnt(+88.37086140882031800000, -0.00000000000000004450, -88.99816853898946100000); + aWeights.ChangeValue(7, 15) = +1.03012484065781210000; + aPoles.ChangeValue(7, 15) = + gp_Pnt(+85.04324466385365600000, +0.00000000000000407116, -90.12875955698966400000); + aWeights.ChangeValue(7, 16) = +1.03015471267321310000; + aPoles.ChangeValue(7, 16) = + gp_Pnt(+75.01621211174902700000, +0.00000000000001208092, -93.38380423550353300000); + aWeights.ChangeValue(7, 17) = +1.03017194800922480000; + aPoles.ChangeValue(7, 17) = + gp_Pnt(+68.27251352067813200000, +0.00000000000001147779, -95.37146758037383200000); + aWeights.ChangeValue(7, 18) = +1.03018680682765580000; + aPoles.ChangeValue(7, 18) = + gp_Pnt(+61.47507566136914600000, +0.00000000000000851456, -97.17487791831784700000); + aWeights.ChangeValue(7, 19) = +1.03019958109549560000; + aPoles.ChangeValue(7, 19) = + gp_Pnt(+54.62953031922813800000, +0.00000000000000645560, -98.79238303220959900000); + aWeights.ChangeValue(7, 20) = +1.03021050389503310000; + aPoles.ChangeValue(7, 20) = + gp_Pnt(+47.74179355100338300000, +0.00000000000000683493, -100.22257163394704000000); + aWeights.ChangeValue(7, 21) = +1.03021974942385920000; + aPoles.ChangeValue(7, 21) = + gp_Pnt(+40.81806392732334400000, +0.00000000000000945638, -101.46427420633951000000); + aWeights.ChangeValue(7, 22) = +1.03022743299486530000; + aPoles.ChangeValue(7, 22) = + gp_Pnt(+33.86482072309787100000, +0.00000000000001239365, -102.51656369616552000000); + aWeights.ChangeValue(7, 23) = +1.03023979631718960000; + aPoles.ChangeValue(7, 23) = + gp_Pnt(+19.91267581058432200000, +0.00000000000001269021, -104.24092170462040000000); + aWeights.ChangeValue(7, 24) = +1.03024450452679180000; + aPoles.ChangeValue(7, 24) = + gp_Pnt(+12.91322103073442500000, +0.00000000000001310657, -104.91296575233191000000); + aWeights.ChangeValue(7, 25) = +1.03024781840890150000; + aPoles.ChangeValue(7, 25) = + gp_Pnt(+5.89663552968925500000, +0.00000000000001362222, -105.39416639705574000000); + aWeights.ChangeValue(7, 26) = +1.03024979501191980000; + aPoles.ChangeValue(7, 26) = + gp_Pnt(-1.13093554742009240000, +0.00000000000001442955, -105.68402704533355000000); + aWeights.ChangeValue(7, 27) = +1.03025046568879810000; + aPoles.ChangeValue(7, 27) = + gp_Pnt(-8.16338049757019310000, +0.00000000000001553070, -105.78227646648484000000); + aWeights.ChangeValue(7, 28) = +1.03024983609703620000; + aPoles.ChangeValue(7, 28) = + gp_Pnt(-15.19462185431612500000, +0.00000000000001673746, -105.68886888131540000000); + aWeights.ChangeValue(7, 29) = +1.03024788619868390000; + aPoles.ChangeValue(7, 29) = + gp_Pnt(-22.21861718693262200000, +0.00000000000001767135, -105.40398398356824000000); + aWeights.ChangeValue(7, 30) = +1.03024126030624560000; + aPoles.ChangeValue(7, 30) = + gp_Pnt(-36.24014829916134100000, +0.00000000000002019891, -104.45206611492652000000); + aWeights.ChangeValue(7, 31) = +1.03023657011944200000; + aPoles.ChangeValue(7, 31) = + gp_Pnt(-43.23771519136024500000, +0.00000000000002161068, -103.78502949380328000000); + aWeights.ChangeValue(7, 32) = +1.03023047292900840000; + aPoles.ChangeValue(7, 32) = + gp_Pnt(-50.21605719916001900000, +0.00000000000002249329, -102.92731708926736000000); + aWeights.ChangeValue(7, 33) = +1.03022290017099440000; + aPoles.ChangeValue(7, 33) = + gp_Pnt(-57.16920057960702200000, +0.00000000000002320995, -101.87955571848956000000); + aWeights.ChangeValue(7, 34) = +1.03021374148842140000; + aPoles.ChangeValue(7, 34) = + gp_Pnt(-64.09120253994868200000, +0.00000000000002399266, -100.64259867222304000000); + aWeights.ChangeValue(7, 35) = +1.03020284473128120000; + aPoles.ChangeValue(7, 35) = + gp_Pnt(-70.97615252947152000000, +0.00000000000002494226, -99.21752532044712300000); + aWeights.ChangeValue(7, 36) = +1.03019001595653670000; + aPoles.ChangeValue(7, 36) = + gp_Pnt(-77.81817349811507300000, +0.00000000000002602838, -97.60564061068184600000); + aWeights.ChangeValue(7, 37) = +1.03016805964614980000; + aPoles.ChangeValue(7, 37) = + gp_Pnt(-87.76549855749630100000, +0.00000000000002703745, -94.97405836608523100000); + aWeights.ChangeValue(7, 38) = +1.03016062145972500000; + aPoles.ChangeValue(7, 38) = + gp_Pnt(-90.90906843451735100000, +0.00000000000002735353, -94.09969925934423400000); + aWeights.ChangeValue(7, 39) = +1.03015268516758060000; + aPoles.ChangeValue(7, 39) = + gp_Pnt(-94.04154842308000200000, +0.00000000000002795160, -93.18554984223239000000); + aWeights.ChangeValue(7, 40) = +1.03014422393874510000; + aPoles.ChangeValue(7, 40) = + gp_Pnt(-97.16235536263198500000, +0.00000000000002873660, -92.23177350871787900000); + aWeights.ChangeValue(7, 41) = +1.03013520381253840000; + aPoles.ChangeValue(7, 41) = + gp_Pnt(-100.27090735629974000000, +0.00000000000002960449, -91.23854430518403500000); + aWeights.ChangeValue(7, 42) = +1.03012558369857450000; + aPoles.ChangeValue(7, 42) = + gp_Pnt(-103.36662387191370000000, +0.00000000000003044224, -90.20604688574815100000); + aWeights.ChangeValue(7, 43) = +1.03011531537676040000; + aPoles.ChangeValue(7, 43) = + gp_Pnt(-106.44892584135401000000, +0.00000000000003112785, -89.13447646370049400000); + aWeights.ChangeValue(7, 44) = +1.03009266486582220000; + aPoles.ChangeValue(7, 44) = + gp_Pnt(-112.82164316087234000000, +0.00000000000002877514, -86.82815610446842000000); + aWeights.ChangeValue(7, 45) = +1.03007954250937140000; + aPoles.ChangeValue(7, 45) = + gp_Pnt(-116.10982863064515000000, +0.00000000000005217709, -85.58719260568324200000); + aWeights.ChangeValue(7, 46) = +1.03006700046765860000; + aPoles.ChangeValue(7, 46) = + gp_Pnt(-119.38108228759732000000, -0.00000000000000364635, -84.30140001571530200000); + aWeights.ChangeValue(7, 47) = +1.03005153385603830000; + aPoles.ChangeValue(7, 47) = + gp_Pnt(-122.63466837574235000000, +0.00000000000007773224, -82.97105629274108200000); + aWeights.ChangeValue(7, 48) = +1.03003663316235050000; + aPoles.ChangeValue(7, 48) = + gp_Pnt(-125.86988610286646000000, +0.00000000000000501775, -81.59643931580511400000); + aWeights.ChangeValue(7, 49) = +1.03002002524069390000; + aPoles.ChangeValue(7, 49) = + gp_Pnt(-129.08600965998806000000, +0.00000000000004872530, -80.17785297868806500000); + aWeights.ChangeValue(7, 50) = +1.03000192732158440000; + aPoles.ChangeValue(7, 50) = + gp_Pnt(-132.28232849510800000000, +0.00000000000003627431, -78.71561001568775900000); + aWeights.ChangeValue(7, 51) = +1.02996526567106140000; + aPoles.ChangeValue(7, 51) = + gp_Pnt(-138.40719443250111000000, +0.00000000000004030865, -75.81195871455292900000); + aWeights.ChangeValue(7, 52) = +1.02994403451619650000; + aPoles.ChangeValue(7, 52) = + gp_Pnt(-141.33856968181306000000, +0.00000000000003444592, -74.37651555974527200000); + aWeights.ChangeValue(7, 53) = +1.02992866105480000000; + aPoles.ChangeValue(7, 53) = + gp_Pnt(-144.25171811139330000000, +0.00000000000003429445, -72.90395453557894700000); + aWeights.ChangeValue(7, 54) = +1.02989968743351530000; + aPoles.ChangeValue(7, 54) = + gp_Pnt(-147.14603336223070000000, +0.00000000000004355038, -71.39457006641885100000); + aWeights.ChangeValue(7, 55) = +1.02988222474475720000; + aPoles.ChangeValue(7, 55) = + gp_Pnt(-150.02095857157173000000, +0.00000000000003217269, -69.84863841933133700000); + aWeights.ChangeValue(7, 56) = +1.02985386954430420000; + aPoles.ChangeValue(7, 56) = + gp_Pnt(-152.87595706513403000000, +0.00000000000003648661, -68.26644064265008200000); + aWeights.ChangeValue(7, 57) = +1.02982704006085530000; + aPoles.ChangeValue(7, 57) = + gp_Pnt(-155.71041601974636000000, +0.00000000000003591181, -66.64830754728993200000); + aWeights.ChangeValue(7, 58) = +1.02976639514271140000; + aPoles.ChangeValue(7, 58) = + gp_Pnt(-161.55369960091491000000, +0.00000000000003646415, -63.21332070345936700000); + aWeights.ChangeValue(7, 59) = +1.02972545417744080000; + aPoles.ChangeValue(7, 59) = + gp_Pnt(-164.55974256681068000000, +0.00000000000003294676, -61.39167299907511900000); + aWeights.ChangeValue(7, 60) = +1.02970377642180270000; + aPoles.ChangeValue(7, 60) = + gp_Pnt(-167.53873683551103000000, +0.00000000000002190344, -59.52621075357659900000); + aWeights.ChangeValue(7, 61) = +1.02963665582099750000; + aPoles.ChangeValue(7, 61) = + gp_Pnt(-170.49570646978711000000, +0.00000000000009010479, -57.62531748377598000000); + aWeights.ChangeValue(7, 62) = +1.02961756328110620000; + aPoles.ChangeValue(7, 62) = + gp_Pnt(-173.42176702363508000000, -0.00000000000003499440, -55.67944052993496500000); + aWeights.ChangeValue(7, 63) = +1.02954937293567860000; + aPoles.ChangeValue(7, 63) = + gp_Pnt(-176.32284460610933000000, +0.00000000000007636921, -53.69521656711459900000); + aWeights.ChangeValue(7, 64) = +1.02950097342681770000; + aPoles.ChangeValue(7, 64) = + gp_Pnt(-179.19569709355173000000, +0.00000000000003273955, -51.67161593723249500000); + aWeights.ChangeValue(7, 65) = +1.02943612532291810000; + aPoles.ChangeValue(7, 65) = + gp_Pnt(-182.04053139917158000000, +0.00000000000003996803, -49.60917258111981500000); + aWeights.ChangeValue(7, 66) = +1.02937840445762090000; + aPoles.ChangeValue(7, 66) = + gp_Pnt(-184.68250151172640000000, +0.00000000000004112926, -47.69381589112448700000); + aWeights.ChangeValue(7, 67) = +1.02929786839945800000; + aPoles.ChangeValue(7, 67) = + gp_Pnt(-187.30004443981446000000, +0.00000000000003629801, -45.74517623046489900000); + aWeights.ChangeValue(7, 68) = +1.02927785532615720000; + aPoles.ChangeValue(7, 68) = + gp_Pnt(-189.89358418563035000000, +0.00000000000003708012, -43.76295173174737800000); + aWeights.ChangeValue(7, 69) = +1.02909457173661250000; + aPoles.ChangeValue(7, 69) = + gp_Pnt(-192.46070903458983000000, +0.00000000000005500515, -41.74904085552218200000); + aWeights.ChangeValue(7, 70) = +1.02915656102268340000; + aPoles.ChangeValue(7, 70) = + gp_Pnt(-195.00353322314638000000, +0.00000000000002645256, -39.70148425813464900000); + aWeights.ChangeValue(7, 71) = +1.02891246604057510000; + aPoles.ChangeValue(7, 71) = + gp_Pnt(-197.51895024482548000000, +0.00000000000005006422, -37.62251287581096900000); + aWeights.ChangeValue(7, 72) = +1.02884001996279940000; + aPoles.ChangeValue(7, 72) = + gp_Pnt(-200.00717902020989000000, +0.00000000000003866246, -35.51147139839754600000); + aWeights.ChangeValue(7, 73) = +1.02870418206103280000; + aPoles.ChangeValue(7, 73) = + gp_Pnt(-202.46745722827831000000, +0.00000000000003996803, -33.36845405838467800000); + aWeights.ChangeValue(7, 74) = +1.02860417892808040000; + aPoles.ChangeValue(7, 74) = + gp_Pnt(-204.92874075079348000000, +0.00000000000003952569, -31.22492832365916000000); + aWeights.ChangeValue(7, 75) = +1.02826579045574770000; + aPoles.ChangeValue(7, 75) = + gp_Pnt(-207.35951843182116000000, +0.00000000000002864861, -29.04902036970887700000); + aWeights.ChangeValue(7, 76) = +1.02871793966685040000; + aPoles.ChangeValue(7, 76) = + gp_Pnt(-209.76815931164757000000, +0.00000000000007786791, -26.84449461829588300000); + aWeights.ChangeValue(7, 77) = +1.02728787827248790000; + aPoles.ChangeValue(7, 77) = + gp_Pnt(-212.13952611955784000000, -0.00000000000002645359, -24.59453985262025100000); + aWeights.ChangeValue(7, 78) = +1.02767535385751650000; + aPoles.ChangeValue(7, 78) = + gp_Pnt(-214.48523983715771000000, +0.00000000000011316462, -22.34028621398329100000); + aWeights.ChangeValue(7, 79) = +1.02745809923196680000; + aPoles.ChangeValue(7, 79) = + gp_Pnt(-216.79261871005519000000, -0.00000000000002978790, -20.02558452892611700000); + aWeights.ChangeValue(7, 80) = +1.02725110106353260000; + aPoles.ChangeValue(7, 80) = + gp_Pnt(-219.08116944862113000000, +0.00000000000005732296, -17.69632354506026700000); + aWeights.ChangeValue(7, 81) = +1.02619749797986360000; + aPoles.ChangeValue(7, 81) = + gp_Pnt(-221.32510969435936000000, +0.00000000000004618528, -15.33078661161192400000); + } + //// + + const occ::handle aS1 = + new Geom_BSplineSurface(aPoles, aWeights, aUKnots, aVKnots, aUMult, aVMult, aUDegree, aVDegree); + + GeomAPI_IntSS anIntersection(aS1, aS2, Precision::Confusion()); + ASSERT_TRUE(anIntersection.IsDone()) << "Intersection failed"; + + const int aNbLines = anIntersection.NbLines(); + EXPECT_EQ(aNbLines, 1) << "Expected exactly 1 intersection curve, got " << aNbLines; +} + +TEST(GeomAPI_IntSSTest, OCC26675_IntersectionCurveRangeNonDegenerate) +{ + const gp_Pnt aCircCenter(-112.93397037070100000000, + +177.52792379072199000000, + +10.63374076104853900000); + const gp_Dir aCircN(+0.00000000000000000000, +1.00000000000000000000, +0.00000000000000000000); + const gp_Dir aCircX(+0.00000000000000000000, -0.00000000000000000000, +1.00000000000000000000); + const gp_Dir anExtrDir(-500.00000000000000000000, + -866.02540378443609000000, + +0.00000000000000000000); + const gp_Ax2 aCircAxes(aCircCenter, aCircN, aCircX); + const occ::handle aCurv = new Geom_Circle(aCircAxes, +50.00000000000000000000); + + const occ::handle aS2 = new Geom_SurfaceOfLinearExtrusion(aCurv, anExtrDir); + + NCollection_Array2 aPoles(1, 7, 1, 81); + NCollection_Array2 aWeights(1, 7, 1, 81); + NCollection_Array1 aUKnots(1, 2), aVKnots(1, 12); + NCollection_Array1 aUMult(1, 2), aVMult(1, 12); + const int aUDegree = 6, aVDegree = 8; + + aUKnots(1) = +0.00000000000000000000; + aUKnots(2) = +1.00000000000000000000; + aVKnots(1) = +0.08911853946147080300; + aVKnots(2) = +0.11779167587451674000; + aVKnots(3) = +0.14583467562325506000; + aVKnots(4) = +0.20255081178503931000; + aVKnots(5) = +0.25926694794682359000; + aVKnots(6) = +0.31598308410860781000; + aVKnots(7) = +0.34262437462234741000; + aVKnots(8) = +0.37067364397889985000; + aVKnots(9) = +0.39731552779654306000; + aVKnots(10) = +0.42536420384919182000; + aVKnots(11) = +0.45200329235672548000; + aVKnots(12) = +0.47802918742799144000; + + aUMult(1) = 7; + aUMult(2) = 7; + aVMult(1) = 9; + aVMult(2) = 7; + aVMult(3) = 7; + aVMult(4) = 7; + aVMult(5) = 7; + aVMult(6) = 7; + aVMult(7) = 7; + aVMult(8) = 7; + aVMult(9) = 7; + aVMult(10) = 8; + aVMult(11) = 8; + aVMult(12) = 9; + + //// + { + aWeights.ChangeValue(1, 1) = +1.02986327036737910000; + aPoles.ChangeValue(1, 1) = + gp_Pnt(+131.75315905495660000000, +2.88570510351864900000, -66.24709307590461500000); + aWeights.ChangeValue(1, 2) = +1.02989244478761060000; + aPoles.ChangeValue(1, 2) = + gp_Pnt(+128.70876344053133000000, +2.88791208181246970000, -67.92914281439198000000); + aWeights.ChangeValue(1, 3) = +1.02991676091113950000; + aPoles.ChangeValue(1, 3) = + gp_Pnt(+125.64133203841195000000, +2.88975018186799830000, -69.56968825975690200000); + aWeights.ChangeValue(1, 4) = +1.02993613450133650000; + aPoles.ChangeValue(1, 4) = + gp_Pnt(+122.55164101294532000000, +2.89121448973680460000, -71.16831921321855200000); + aWeights.ChangeValue(1, 5) = +1.02995970896170810000; + aPoles.ChangeValue(1, 5) = + gp_Pnt(+119.44028474076808000000, +2.89299532863950050000, -72.72471137484106400000); + aWeights.ChangeValue(1, 6) = +1.02998196300928410000; + aPoles.ChangeValue(1, 6) = + gp_Pnt(+116.30796917345266000000, +2.89467567823625730000, -74.23853925439507900000); + aWeights.ChangeValue(1, 7) = +1.02999781361772440000; + aPoles.ChangeValue(1, 7) = + gp_Pnt(+113.15537818476763000000, +2.89587201010380560000, -75.70949847615843000000); + aWeights.ChangeValue(1, 8) = +1.03001626830283270000; + aPoles.ChangeValue(1, 8) = + gp_Pnt(+109.98323502828077000000, +2.89726468512897210000, -77.13723994508107800000); + aWeights.ChangeValue(1, 9) = +1.03004822145815230000; + aPoles.ChangeValue(1, 9) = + gp_Pnt(+103.60126699909762000000, +2.89967510685080440000, -79.90571269046952800000); + aWeights.ChangeValue(1, 10) = +1.03006364818936770000; + aPoles.ChangeValue(1, 10) = + gp_Pnt(+100.39144092265354000000, +2.90083845616186050000, -81.24644132200651800000); + aWeights.ChangeValue(1, 11) = +1.03007725635592000000; + aPoles.ChangeValue(1, 11) = + gp_Pnt(+97.16342330855667300000, +2.90186436688425700000, -82.54338871675531700000); + aWeights.ChangeValue(1, 12) = +1.03009045031501500000; + aPoles.ChangeValue(1, 12) = + gp_Pnt(+93.91790293022438600000, +2.90285879918974650000, -83.79626764915399000000); + aWeights.ChangeValue(1, 13) = +1.03010285398183930000; + aPoles.ChangeValue(1, 13) = + gp_Pnt(+90.65560197798836800000, +2.90379346029782100000, -85.00479786905465600000); + aWeights.ChangeValue(1, 14) = +1.03011393120350900000; + aPoles.ChangeValue(1, 14) = + gp_Pnt(+87.37722618415423900000, +2.90462796925060120000, -86.16871841453435400000); + aWeights.ChangeValue(1, 15) = +1.03012484065787050000; + aPoles.ChangeValue(1, 15) = + gp_Pnt(+84.08346762829417300000, +2.90544970249433290000, -87.28777941880029800000); + aWeights.ChangeValue(1, 16) = +1.03015471267321200000; + aPoles.ChangeValue(1, 16) = + gp_Pnt(+74.15848807058078800000, +2.90769927244280210000, -90.50962423575197100000); + aWeights.ChangeValue(1, 17) = +1.03017194800922400000; + aPoles.ChangeValue(1, 17) = + gp_Pnt(+67.48342008926763900000, +2.90899668032978950000, -92.47701903504494700000); + aWeights.ChangeValue(1, 18) = +1.03018680682765670000; + aPoles.ChangeValue(1, 18) = + gp_Pnt(+60.75515833606132100000, +2.91011480947056490000, -94.26204121664201800000); + aWeights.ChangeValue(1, 19) = +1.03019958109549670000; + aPoles.ChangeValue(1, 19) = + gp_Pnt(+53.97928154760177200000, +2.91107580930771360000, -95.86305268935117900000); + aWeights.ChangeValue(1, 20) = +1.03021050389503350000; + aPoles.ChangeValue(1, 20) = + gp_Pnt(+47.16164692132413400000, +2.91189735380426780000, -97.27865560180262600000); + aWeights.ChangeValue(1, 21) = +1.03021974942385830000; + aPoles.ChangeValue(1, 21) = + gp_Pnt(+40.30838837608569500000, +2.91259264267907050000, -98.50769317562559000000); + aWeights.ChangeValue(1, 22) = +1.03022743299486370000; + aPoles.ChangeValue(1, 22) = + gp_Pnt(+33.42591476110869300000, +2.91317040233699530000, -99.54925039136011800000); + aWeights.ChangeValue(1, 23) = +1.03023979631718900000; + aPoles.ChangeValue(1, 23) = + gp_Pnt(+19.61576136171939000000, +2.91409991934468550000, -101.25602945077115000000); + aWeights.ChangeValue(1, 24) = +1.03024450452679140000; + aPoles.ChangeValue(1, 24) = + gp_Pnt(+12.68754355991407800000, +2.91445385083459700000, -101.92122234436175000000); + aWeights.ChangeValue(1, 25) = +1.03024781840890120000; + aPoles.ChangeValue(1, 25) = + gp_Pnt(+5.74236948737514120000, +2.91470294045230770000, -102.39751844510502000000); + aWeights.ChangeValue(1, 26) = +1.03024979501192000000; + aPoles.ChangeValue(1, 26) = + gp_Pnt(-1.21367831605073050000, +2.91485150371151920000, -102.68442590550356000000); + aWeights.ChangeValue(1, 27) = +1.03025046568879790000; + aPoles.ChangeValue(1, 27) = + gp_Pnt(-8.17455041611474620000, +2.91490191238154670000, -102.78167594353056000000); + aWeights.ChangeValue(1, 28) = +1.03024983609703540000; + aPoles.ChangeValue(1, 28) = + gp_Pnt(-15.13423127055194300000, +2.91485459458572780000, -102.68922293042964000000); + aWeights.ChangeValue(1, 29) = +1.03024788619868260000; + aPoles.ChangeValue(1, 29) = + gp_Pnt(-22.08674002008992700000, +2.91470803482494080000, -102.40724441194320000000); + aWeights.ChangeValue(1, 30) = +1.03024126030624540000; + aPoles.ChangeValue(1, 30) = + gp_Pnt(-35.96556766132121700000, +2.91420996731856930000, -101.46503408514069000000); + aWeights.ChangeValue(1, 31) = +1.03023657011944230000; + aPoles.ChangeValue(1, 31) = + gp_Pnt(-42.89191729472150200000, +2.91385737699769360000, -100.80479886745856000000); + aWeights.ChangeValue(1, 32) = +1.03023047292900880000; + aPoles.ChangeValue(1, 32) = + gp_Pnt(-49.79923779841396900000, +2.91339898565004060000, -99.95583114848535900000); + aWeights.ChangeValue(1, 33) = +1.03022290017099550000; + aPoles.ChangeValue(1, 33) = + gp_Pnt(-56.68161614207340900000, +2.91282960709223810000, -98.91875138839027700000); + aWeights.ChangeValue(1, 34) = +1.03021374148842180000; + aPoles.ChangeValue(1, 34) = + gp_Pnt(-63.53316994906088400000, +2.91214088593828220000, -97.69440448679608800000); + aWeights.ChangeValue(1, 35) = +1.03020284473128080000; + aPoles.ChangeValue(1, 35) = + gp_Pnt(-70.34804877511381000000, +2.91132129711663760000, -96.28385939245710300000); + aWeights.ChangeValue(1, 36) = +1.03019001595653580000; + aPoles.ChangeValue(1, 36) = + gp_Pnt(-77.12043535415037400000, +2.91035614521427500000, -94.68840860671046800000); + aWeights.ChangeValue(1, 37) = +1.03016805964614980000; + aPoles.ChangeValue(1, 37) = + gp_Pnt(-86.96652166958519100000, +2.90870378328618400000, -92.08365976972685000000); + aWeights.ChangeValue(1, 38) = +1.03016062145972500000; + aPoles.ChangeValue(1, 38) = + gp_Pnt(-90.07809790629383400000, +2.90814392820824040000, -91.21821667329717800000); + aWeights.ChangeValue(1, 39) = +1.03015268516758060000; + aPoles.ChangeValue(1, 39) = + gp_Pnt(-93.17869710255469300000, +2.90754650188789080000, -90.31338955501080100000); + aWeights.ChangeValue(1, 40) = +1.03014422393874510000; + aPoles.ChangeValue(1, 40) = + gp_Pnt(-96.26774201507643600000, +2.90690946644790090000, -89.36934028436292000000); + aWeights.ChangeValue(1, 41) = +1.03013520381253840000; + aPoles.ChangeValue(1, 41) = + gp_Pnt(-99.34465666946248100000, +2.90623024256504880000, -88.38624129906430900000); + aWeights.ChangeValue(1, 42) = +1.03012558369857450000; + aPoles.ChangeValue(1, 42) = + gp_Pnt(-102.40886646020824000000, +2.90550570939860810000, -87.36427556081821400000); + aWeights.ChangeValue(1, 43) = +1.03011531537676040000; + aPoles.ChangeValue(1, 43) = + gp_Pnt(-105.45979824903711000000, +2.90473220450791560000, -86.30363650725728100000); + aWeights.ChangeValue(1, 44) = +1.03009266486593140000; + aPoles.ChangeValue(1, 44) = + gp_Pnt(-111.76765655411073000000, +2.90302557752729130000, -84.02084620865503000000); + aWeights.ChangeValue(1, 45) = +1.03007954250893910000; + aPoles.ChangeValue(1, 45) = + gp_Pnt(-115.02237879255169000000, +2.90203661863772000000, -82.79254553120374300000); + aWeights.ChangeValue(1, 46) = +1.03006700046846360000; + aPoles.ChangeValue(1, 46) = + gp_Pnt(-118.26033551796380000000, +2.90109123094133370000, -81.51987347500843800000); + aWeights.ChangeValue(1, 47) = +1.03005153385518430000; + aPoles.ChangeValue(1, 47) = + gp_Pnt(-121.48081153033489000000, +2.89992503429592440000, -80.20310945547186100000); + aWeights.ChangeValue(1, 48) = +1.03003663316288070000; + aPoles.ChangeValue(1, 48) = + gp_Pnt(-124.68310204708784000000, +2.89880123910694910000, -78.84252385592422700000); + aWeights.ChangeValue(1, 49) = +1.03002002524051230000; + aPoles.ChangeValue(1, 49) = + gp_Pnt(-127.86649232671233000000, +2.89754829341323060000, -77.43842231968982000000); + aWeights.ChangeValue(1, 50) = +1.03000192732161230000; + aPoles.ChangeValue(1, 50) = + gp_Pnt(-131.03028254956638000000, +2.89618247462029290000, -75.99111259804850200000); + aWeights.ChangeValue(1, 51) = +1.02996526567113600000; + aPoles.ChangeValue(1, 51) = + gp_Pnt(-137.09281139094972000000, +2.89341459629042360000, -73.11712223836046600000); + aWeights.ChangeValue(1, 52) = +1.02994403451589630000; + aPoles.ChangeValue(1, 52) = + gp_Pnt(-139.99435839258939000000, +2.89181101472158900000, -71.69634981883045600000); + aWeights.ChangeValue(1, 53) = +1.02992866105538440000; + aPoles.ChangeValue(1, 53) = + gp_Pnt(-142.87784656482347000000, +2.89064973421052680000, -70.23882874204873900000); + aWeights.ChangeValue(1, 54) = +1.02989968743283590000; + aPoles.ChangeValue(1, 54) = + gp_Pnt(-145.74271824362268000000, +2.88845983550875030000, -68.74489127449217600000); + aWeights.ChangeValue(1, 55) = +1.02988222474524970000; + aPoles.ChangeValue(1, 55) = + gp_Pnt(-148.58838121276386000000, +2.88713941077432070000, -67.21475112846350400000); + aWeights.ChangeValue(1, 56) = +1.02985386954408620000; + aPoles.ChangeValue(1, 56) = + gp_Pnt(-151.41432118416620000000, +2.88499463682574180000, -65.64875099202183200000); + aWeights.ChangeValue(1, 57) = +1.02982704006090460000; + aPoles.ChangeValue(1, 57) = + gp_Pnt(-154.21993049579214000000, +2.88296397171855910000, -64.04717955157212800000); + aWeights.ChangeValue(1, 58) = +1.02976639514278400000; + aPoles.ChangeValue(1, 58) = + gp_Pnt(-160.00375832753414000000, +2.87837140815595260000, -60.64735416015690100000); + aWeights.ChangeValue(1, 59) = +1.02972545417711370000; + aPoles.ChangeValue(1, 59) = + gp_Pnt(-162.97914403387477000000, +2.87526824819569480000, -58.84445149944087200000); + aWeights.ChangeValue(1, 60) = +1.02970377642253300000; + aPoles.ChangeValue(1, 60) = + gp_Pnt(-165.92810584856278000000, +2.87362619373759860000, -56.99783055334398100000); + aWeights.ChangeValue(1, 61) = +1.02963665582001740000; + aPoles.ChangeValue(1, 61) = + gp_Pnt(-168.85438185317770000000, +2.86853152516479340000, -55.11698298198095400000); + aWeights.ChangeValue(1, 62) = +1.02961756328192160000; + aPoles.ChangeValue(1, 62) = + gp_Pnt(-171.75125340157436000000, +2.86708271055963240000, -53.19057330425229700000); + aWeights.ChangeValue(1, 63) = +1.02954937293527580000; + aPoles.ChangeValue(1, 63) = + gp_Pnt(-174.62251681022158000000, +2.86190007017706360000, -51.22700225930964300000); + aWeights.ChangeValue(1, 64) = +1.02950097342691520000; + aPoles.ChangeValue(1, 64) = + gp_Pnt(-177.46620192435449000000, +2.85821732043423180000, -49.22415777229338100000); + aWeights.ChangeValue(1, 65) = +1.02943612532291810000; + aPoles.ChangeValue(1, 65) = + gp_Pnt(-180.28206426096281000000, +2.85327724467687100000, -47.18300981722491400000); + aWeights.ChangeValue(1, 66) = +1.02937840445786000000; + aPoles.ChangeValue(1, 66) = + gp_Pnt(-182.89713737694305000000, +2.84888100315162470000, -45.28741010449485300000); + aWeights.ChangeValue(1, 67) = +1.02929786839840220000; + aPoles.ChangeValue(1, 67) = + gp_Pnt(-185.48808576506855000000, +2.84272935508061810000, -43.35897595091199000000); + aWeights.ChangeValue(1, 68) = +1.02927785532845030000; + aPoles.ChangeValue(1, 68) = + gp_Pnt(-188.05509745668041000000, +2.84122612975151250000, -41.39706700987362400000); + aWeights.ChangeValue(1, 69) = +1.02909457173363930000; + aPoles.ChangeValue(1, 69) = + gp_Pnt(-190.59634219852757000000, +2.82717082550985440000, -39.40453806610211300000); + aWeights.ChangeValue(1, 70) = +1.02915656102508410000; + aPoles.ChangeValue(1, 70) = + gp_Pnt(-193.11296933822229000000, +2.83195841118334000000, -37.37763511391345600000); + aWeights.ChangeValue(1, 71) = +1.02891246603941110000; + aPoles.ChangeValue(1, 71) = + gp_Pnt(-195.60305999702362000000, +2.81322479805689340000, -35.32107774203857500000); + aWeights.ChangeValue(1, 72) = +1.02884001996307940000; + aPoles.ChangeValue(1, 72) = + gp_Pnt(-198.06589030811097000000, +2.80764438138268390000, -33.23208121127716900000); + aWeights.ChangeValue(1, 73) = +1.02870418206103250000; + aPoles.ChangeValue(1, 73) = + gp_Pnt(-200.50111697620073000000, +2.79717360924099090000, -31.11182660391394400000); + aWeights.ChangeValue(1, 74) = +1.02860417892814660000; + aPoles.ChangeValue(1, 74) = + gp_Pnt(-202.93720652839650000000, +2.78949733525485710000, -28.99085629216911300000); + aWeights.ChangeValue(1, 75) = +1.02826579045547110000; + aPoles.ChangeValue(1, 75) = + gp_Pnt(-205.34394850673777000000, +2.76315604312090550000, -26.83940109433629200000); + aWeights.ChangeValue(1, 76) = +1.02871793966742330000; + aPoles.ChangeValue(1, 76) = + gp_Pnt(-207.72575255584553000000, +2.79855565223875710000, -24.65500081264426800000); + aWeights.ChangeValue(1, 77) = +1.02728787827176630000; + aPoles.ChangeValue(1, 77) = + gp_Pnt(-210.07706367406874000000, +2.68725363743552850000, -22.43634910730148800000); + aWeights.ChangeValue(1, 78) = +1.02767535385809120000; + aPoles.ChangeValue(1, 78) = + gp_Pnt(-212.39605978578481000000, +2.71705476277515070000, -20.20562112100595800000); + aWeights.ChangeValue(1, 79) = +1.02745809923169020000; + aPoles.ChangeValue(1, 79) = + gp_Pnt(-214.68098626410506000000, +2.69985190382785320000, -17.91605900374278100000); + aWeights.ChangeValue(1, 80) = +1.02725110106359850000; + aPoles.ChangeValue(1, 80) = + gp_Pnt(-216.94385389331507000000, +2.68435107488514250000, -15.61289037092123000000); + aWeights.ChangeValue(1, 81) = +1.02619749797986360000; + aPoles.ChangeValue(1, 81) = + gp_Pnt(-219.16685583874414000000, +2.59983520096898510000, -13.28583956380401400000); + aWeights.ChangeValue(2, 1) = +1.00955713824395700000; + aPoles.ChangeValue(2, 1) = + gp_Pnt(+131.76756408216349000000, +2.10451717388867540000, -66.27316135719137000000); + aWeights.ChangeValue(2, 2) = +1.00956608612165600000; + aPoles.ChangeValue(2, 2) = + gp_Pnt(+128.72252404033563000000, +2.10631182699007670000, -67.95492700832653600000); + aWeights.ChangeValue(2, 3) = +1.00957354292813030000; + aPoles.ChangeValue(2, 3) = + gp_Pnt(+125.65455798821807000000, +2.10780700070896730000, -69.59522708152212500000); + aWeights.ChangeValue(2, 4) = +1.00957948395970430000; + aPoles.ChangeValue(2, 4) = + gp_Pnt(+122.56436007131990000000, +2.10899819276768510000, -71.19369911011085600000); + aWeights.ChangeValue(2, 5) = +1.00958671248272140000; + aPoles.ChangeValue(2, 5) = + gp_Pnt(+119.45249930698063000000, +2.11044722765431250000, -72.74983445837314400000); + aWeights.ChangeValue(2, 6) = +1.00959353559448470000; + aPoles.ChangeValue(2, 6) = + gp_Pnt(+116.31971419268339000000, +2.11181476538007030000, -74.26341133748536500000); + aWeights.ChangeValue(2, 7) = +1.00959839503054960000; + aPoles.ChangeValue(2, 7) = + gp_Pnt(+113.16673272248508000000, +2.11278857229853930000, -75.73421464457315700000); + aWeights.ChangeValue(2, 8) = +1.00960405269294800000; + aPoles.ChangeValue(2, 8) = + gp_Pnt(+109.99417142410560000000, +2.11392227976110990000, -77.16175403351917300000); + aWeights.ChangeValue(2, 9) = +1.00961384794963970000; + aPoles.ChangeValue(2, 9) = + gp_Pnt(+103.61137952541701000000, +2.11588481923337430000, -79.92991318438167500000); + aWeights.ChangeValue(2, 10) = +1.00961857675621050000; + aPoles.ChangeValue(2, 10) = + gp_Pnt(+100.40113044627800000000, +2.11683214779396200000, -81.27049552555527600000); + aWeights.ChangeValue(2, 11) = +1.00962274789480260000; + aPoles.ChangeValue(2, 11) = + gp_Pnt(+97.17272090352022900000, +2.11766766635255620000, -82.56731642507010300000); + aWeights.ChangeValue(2, 12) = +1.00962679188946770000; + aPoles.ChangeValue(2, 12) = + gp_Pnt(+93.92682593436140300000, +2.11847763961438810000, -83.82006598438695700000); + aWeights.ChangeValue(2, 13) = +1.00963059350869510000; + aPoles.ChangeValue(2, 13) = + gp_Pnt(+90.66416580726762200000, +2.11923900414192050000, -85.02847304317147300000); + aWeights.ChangeValue(2, 14) = +1.00963398843777610000; + aPoles.ChangeValue(2, 14) = + gp_Pnt(+87.38545325411524800000, +2.11991885797243330000, -86.19228543784532800000); + aWeights.ChangeValue(2, 15) = +1.00963733185346640000; + aPoles.ChangeValue(2, 15) = + gp_Pnt(+84.09136475788710600000, +2.12058835416503610000, -87.31123582184922300000); + aWeights.ChangeValue(2, 16) = +1.00964648640037450000; + aPoles.ChangeValue(2, 16) = + gp_Pnt(+74.16530685267888100000, +2.12242134451684360000, -90.53282418399284400000); + aWeights.ChangeValue(2, 17) = +1.00965176794147850000; + aPoles.ChangeValue(2, 17) = + gp_Pnt(+67.48955141808187400000, +2.12347869023601370000, -92.50007118315201600000); + aWeights.ChangeValue(2, 18) = +1.00965632094816660000; + aPoles.ChangeValue(2, 18) = + gp_Pnt(+60.76066172731987800000, +2.12439006790716880000, -94.28495774595940300000); + aWeights.ChangeValue(2, 19) = +1.00966023501695720000; + aPoles.ChangeValue(2, 19) = + gp_Pnt(+53.98420072674593900000, +2.12517346720689600000, -95.88584819516199800000); + aWeights.ChangeValue(2, 20) = +1.00966358166845400000; + aPoles.ChangeValue(2, 20) = + gp_Pnt(+47.16601123883578600000, +2.12584324589548320000, -97.30134659055448800000); + aWeights.ChangeValue(2, 21) = +1.00966641434734730000; + aPoles.ChangeValue(2, 21) = + gp_Pnt(+40.31221541713015500000, +2.12641013013135180000, -98.53029698991525700000); + aWeights.ChangeValue(2, 22) = +1.00966876842241260000; + aPoles.ChangeValue(2, 22) = + gp_Pnt(+33.42921418500849000000, +2.12688121470786750000, -99.57178366381829400000); + aWeights.ChangeValue(2, 23) = +1.00967255617655650000; + aPoles.ChangeValue(2, 23) = + gp_Pnt(+19.61796125907087400000, +2.12763915883061920000, -101.27845724558523000000); + aWeights.ChangeValue(2, 24) = +1.00967399859793750000; + aPoles.ChangeValue(2, 24) = + gp_Pnt(+12.68919279606528900000, +2.12792777824197280000, -101.94361028295506000000); + aWeights.ChangeValue(2, 25) = +1.00967501382968900000; + aPoles.ChangeValue(2, 25) = + gp_Pnt(+5.74348853231593990000, +2.12813091177048630000, -102.41987704106546000000); + aWeights.ChangeValue(2, 26) = +1.00967561936957820000; + aPoles.ChangeValue(2, 26) = + gp_Pnt(-1.21307744928976070000, +2.12825206894226590000, -102.70676666240287000000); + aWeights.ChangeValue(2, 27) = +1.00967582483410380000; + aPoles.ChangeValue(2, 27) = + gp_Pnt(-8.17446448579617170000, +2.12829317854427910000, -102.80401081431219000000); + aWeights.ChangeValue(2, 28) = +1.00967563195849760000; + aPoles.ChangeValue(2, 28) = + gp_Pnt(-15.13466558037753100000, +2.12825458864942170000, -102.71156371647888000000); + aWeights.ChangeValue(2, 29) = +1.00967503459672270000; + aPoles.ChangeValue(2, 29) = + gp_Pnt(-22.08770764998126900000, +2.12813506662251010000, -102.42960214757312000000); + aWeights.ChangeValue(2, 30) = +1.00967300468446490000; + aPoles.ChangeValue(2, 30) = + gp_Pnt(-35.96760988752987500000, +2.12772890088942160000, -101.48744752427969000000); + aWeights.ChangeValue(2, 31) = +1.00967156777535580000; + aPoles.ChangeValue(2, 31) = + gp_Pnt(-42.89448004815705000000, +2.12744138030294440000, -100.82725372327035000000); + aWeights.ChangeValue(2, 32) = +1.00966969979090780000; + aPoles.ChangeValue(2, 32) = + gp_Pnt(-49.80232400744441900000, +2.12706759457740000000, -99.97834162579670200000); + aWeights.ChangeValue(2, 33) = +1.00966737970297200000; + aPoles.ChangeValue(2, 33) = + gp_Pnt(-56.68523628384353000000, +2.12660332632729520000, -98.94133225857957800000); + aWeights.ChangeValue(2, 34) = +1.00966457365849260000; + aPoles.ChangeValue(2, 34) = + gp_Pnt(-63.53734456971785200000, +2.12604178346724470000, -97.71706998895581400000); + aWeights.ChangeValue(2, 35) = +1.00966123497950600000; + aPoles.ChangeValue(2, 35) = + gp_Pnt(-70.35281013187348300000, +2.12537359908900880000, -96.30662240267085400000); + aWeights.ChangeValue(2, 36) = +1.00965730416314050000; + aPoles.ChangeValue(2, 36) = + gp_Pnt(-77.12582820180557500000, +2.12458683129447450000, -94.71128014840769500000); + aWeights.ChangeValue(2, 37) = +1.00965057624220010000; + aPoles.ChangeValue(2, 37) = + gp_Pnt(-86.97287762202962800000, +2.12324005462031540000, -92.10671540000876700000); + aWeights.ChangeValue(2, 38) = +1.00964829695753690000; + aPoles.ChangeValue(2, 38) = + gp_Pnt(-90.08473551349412400000, +2.12278376932639290000, -91.24134329153459100000); + aWeights.ChangeValue(2, 39) = +1.00964586498084840000; + aPoles.ChangeValue(2, 39) = + gp_Pnt(-93.18562459494498300000, +2.12229689243319890000, -90.33659169532975900000); + aWeights.ChangeValue(2, 40) = +1.00964327207694590000; + aPoles.ChangeValue(2, 40) = + gp_Pnt(-96.27496896689456200000, +2.12177776971417840000, -89.39262240039663300000); + aWeights.ChangeValue(2, 41) = +1.00964050782222770000; + aPoles.ChangeValue(2, 41) = + gp_Pnt(-99.35219429474524600000, +2.12122430736176200000, -88.40960770124299000000); + aWeights.ChangeValue(2, 42) = +1.00963755960468140000; + aPoles.ChangeValue(2, 42) = + gp_Pnt(-102.41672784011750000000, +2.12063397196916760000, -87.38773038403248000000); + aWeights.ChangeValue(2, 43) = +1.00963441262388320000; + aPoles.ChangeValue(2, 43) = + gp_Pnt(-105.46799849165807000000, +2.12000379050942020000, -86.32718371153289600000); + aWeights.ChangeValue(2, 44) = +1.00962747055142050000; + aPoles.ChangeValue(2, 44) = + gp_Pnt(-111.77654530973133000000, +2.11861352771318150000, -84.04460889409097000000); + aWeights.ChangeValue(2, 45) = +1.00962344856326270000; + aPoles.ChangeValue(2, 45) = + gp_Pnt(-115.03162075269803000000, +2.11780798556167320000, -82.81644583890866300000); + aWeights.ChangeValue(2, 46) = +1.00961960432211730000; + aPoles.ChangeValue(2, 46) = + gp_Pnt(-118.26993104545312000000, +2.11703799459344700000, -81.54389579486141300000); + aWeights.ChangeValue(2, 47) = +1.00961486342011010000; + aPoles.ChangeValue(2, 47) = + gp_Pnt(-121.49080060905077000000, +2.11608829135299810000, -80.22729418526657200000); + aWeights.ChangeValue(2, 48) = +1.00961029578343630000; + aPoles.ChangeValue(2, 48) = + gp_Pnt(-124.69348951442340000000, +2.11517321690879800000, -78.86685283462101400000); + aWeights.ChangeValue(2, 49) = +1.00960520454014850000; + aPoles.ChangeValue(2, 49) = + gp_Pnt(-127.87731027004676000000, +2.11415312105035590000, -77.46291256687052900000); + aWeights.ChangeValue(2, 50) = +1.00959965618773250000; + aPoles.ChangeValue(2, 50) = + gp_Pnt(-131.04156234039974000000, +2.11304129636208420000, -76.01577573259778800000); + aWeights.ChangeValue(2, 51) = +1.00958841592243690000; + aPoles.ChangeValue(2, 51) = + gp_Pnt(-137.10496896782513000000, +2.11078854745601690000, -73.14215015354327000000); + aWeights.ChangeValue(2, 52) = +1.00958190609540830000; + aPoles.ChangeValue(2, 52) = + gp_Pnt(-140.00695092509352000000, +2.10948365684345340000, -71.72161996530125800000); + aWeights.ChangeValue(2, 53) = +1.00957719225994170000; + aPoles.ChangeValue(2, 53) = + gp_Pnt(-142.89082065884315000000, +2.10853873486620720000, -70.26423921243410600000); + aWeights.ChangeValue(2, 54) = +1.00956830737110970000; + aPoles.ChangeValue(2, 54) = + gp_Pnt(-145.75622246387837000000, +2.10675729535240960000, -68.77065477701791000000); + aWeights.ChangeValue(2, 55) = +1.00956295195561060000; + aPoles.ChangeValue(2, 55) = + gp_Pnt(-148.60233584192389000000, +2.10568335609513650000, -67.24065593702246700000); + aWeights.ChangeValue(2, 56) = +1.00955425555818930000; + aPoles.ChangeValue(2, 56) = + gp_Pnt(-151.42883073983140000000, +2.10393921590561070000, -65.67497260857376800000); + aWeights.ChangeValue(2, 57) = +1.00954602613011150000; + aPoles.ChangeValue(2, 57) = + gp_Pnt(-154.23502547473331000000, +2.10228833319884910000, -64.07366145615235100000); + aWeights.ChangeValue(2, 58) = +1.00952742278729300000; + aPoles.ChangeValue(2, 58) = + gp_Pnt(-160.02004322449872000000, +2.09855561509982950000, -60.67448614970191300000); + aWeights.ChangeValue(2, 59) = +1.00951486183164940000; + aPoles.ChangeValue(2, 59) = + gp_Pnt(-162.99613088380306000000, +2.09603444654779600000, -58.87207545484513800000); + aWeights.ChangeValue(2, 60) = +1.00950821186194630000; + aPoles.ChangeValue(2, 60) = + gp_Pnt(-165.94554723216726000000, +2.09470002788322150000, -57.02566663092176900000); + aWeights.ChangeValue(2, 61) = +1.00948761363819010000; + aPoles.ChangeValue(2, 61) = + gp_Pnt(-168.87287521283019000000, +2.09056345777511910000, -55.14566924440539700000); + aWeights.ChangeValue(2, 62) = +1.00948175483840210000; + aPoles.ChangeValue(2, 62) = + gp_Pnt(-171.77025983587509000000, +2.08938700649796160000, -53.21936605947655600000); + aWeights.ChangeValue(2, 63) = +1.00946082358399410000; + aPoles.ChangeValue(2, 63) = + gp_Pnt(-174.64262250370552000000, +2.08518149324171190000, -51.25662423685646700000); + aWeights.ChangeValue(2, 64) = +1.00944596410269540000; + aPoles.ChangeValue(2, 64) = + gp_Pnt(-177.48726621628353000000, +2.08219461660139650000, -49.25423871740036900000); + aWeights.ChangeValue(2, 65) = +1.00942605045267530000; + aPoles.ChangeValue(2, 65) = + gp_Pnt(-180.30433731845508000000, +2.07819005191471670000, -47.21374002625280800000); + aWeights.ChangeValue(2, 66) = +1.00940832657289500000; + aPoles.ChangeValue(2, 66) = + gp_Pnt(-182.92026834009920000000, +2.07462614892136180000, -45.31887901738367200000); + aWeights.ChangeValue(2, 67) = +1.00938358350026620000; + aPoles.ChangeValue(2, 67) = + gp_Pnt(-185.51252638985017000000, +2.06964535925843180000, -43.39137009339865600000); + aWeights.ChangeValue(2, 68) = +1.00937745534293180000; + aPoles.ChangeValue(2, 68) = + gp_Pnt(-188.07970214515959000000, +2.06841969296490240000, -41.42984981640538000000); + aWeights.ChangeValue(2, 69) = +1.00932110415642830000; + aPoles.ChangeValue(2, 69) = + gp_Pnt(-190.62397551723822000000, +2.05705915800362950000, -39.43932945784815300000); + aWeights.ChangeValue(2, 70) = +1.00934018958961060000; + aPoles.ChangeValue(2, 70) = + gp_Pnt(-193.13969442040633000000, +2.06091733419064350000, -37.41169132931209200000); + aWeights.ChangeValue(2, 71) = +1.00926513417552190000; + aPoles.ChangeValue(2, 71) = + gp_Pnt(-195.63329272671066000000, +2.04578165519120160000, -35.35822241980492500000); + aWeights.ChangeValue(2, 72) = +1.00924284324010150000; + aPoles.ChangeValue(2, 72) = + gp_Pnt(-198.09761820165846000000, +2.04128022217386820000, -33.26975126412686700000); + aWeights.ChangeValue(2, 73) = +1.00920104311988150000; + aPoles.ChangeValue(2, 73) = + gp_Pnt(-200.53514329838038000000, +2.03283693524956680000, -31.15087616958502200000); + aWeights.ChangeValue(2, 74) = +1.00917029694372660000; + aPoles.ChangeValue(2, 74) = + gp_Pnt(-202.97255799662608000000, +2.02663657044316060000, -29.03126127135719200000); + aWeights.ChangeValue(2, 75) = +1.00906597799637380000; + aPoles.ChangeValue(2, 75) = + gp_Pnt(-205.38430250588374000000, +2.00548607046822540000, -26.88375382824776200000); + aWeights.ChangeValue(2, 76) = +1.00920552993214340000; + aPoles.ChangeValue(2, 76) = + gp_Pnt(-207.76049754988114000000, +2.03384304897263670000, -24.69318019977189100000); + aWeights.ChangeValue(2, 77) = +1.00876475817298510000; + aPoles.ChangeValue(2, 77) = + gp_Pnt(-210.12674832523484000000, +1.94448851661030540000, -22.49703905023471500000); + aWeights.ChangeValue(2, 78) = +1.00888387250469380000; + aPoles.ChangeValue(2, 78) = + gp_Pnt(-212.44800842772909000000, +1.96852329008748410000, -20.25405344977475500000); + aWeights.ChangeValue(2, 79) = +1.00881670070680670000; + aPoles.ChangeValue(2, 79) = + gp_Pnt(-214.73260668420895000000, +1.95481624964232450000, -17.97008076073228700000); + aWeights.ChangeValue(2, 80) = +1.00875338528797620000; + aPoles.ChangeValue(2, 80) = + gp_Pnt(-216.99878954601004000000, +1.94217039944868790000, -15.66960286452947800000); + aWeights.ChangeValue(2, 81) = +1.00842683370719490000; + aPoles.ChangeValue(2, 81) = + gp_Pnt(-219.23765241170187000000, +1.87520469423183880000, -13.35291936652889800000); + aWeights.ChangeValue(3, 1) = +0.99802424639217791000; + aPoles.ChangeValue(3, 1) = + gp_Pnt(+131.89876890515018000000, +1.35189067474276530000, -66.51059820355672500000); + aWeights.ChangeValue(3, 2) = +0.99802234515929278000; + aPoles.ChangeValue(3, 2) = + gp_Pnt(+128.85071311608803000000, +1.35313353595059940000, -68.19368716153405800000); + aWeights.ChangeValue(3, 3) = +0.99802076064203826000; + aPoles.ChangeValue(3, 3) = + gp_Pnt(+125.77977143028471000000, +1.35416922698475650000, -69.83529373030198400000); + aWeights.ChangeValue(3, 4) = +0.99801949820651126000; + aPoles.ChangeValue(3, 4) = + gp_Pnt(+122.68659332837821000000, +1.35499438550965670000, -71.43508181423516100000); + aWeights.ChangeValue(3, 5) = +0.99801796211084914000; + aPoles.ChangeValue(3, 5) = + gp_Pnt(+119.57173533591266000000, +1.35599832254451200000, -72.99244308799212900000); + aWeights.ChangeValue(3, 6) = +0.99801651211145281000; + aPoles.ChangeValue(3, 6) = + gp_Pnt(+116.43595392098000000000, +1.35694592285710100000, -74.50721127326711700000); + aWeights.ChangeValue(3, 7) = +0.99801547938002733000; + aPoles.ChangeValue(3, 7) = + gp_Pnt(+113.28000153804584000000, +1.35762078417993900000, -75.97921900496575600000); + aWeights.ChangeValue(3, 8) = +0.99801427699595313000; + aPoles.ChangeValue(3, 8) = + gp_Pnt(+110.10443724854701000000, +1.35840649430771500000, -77.40790012997213400000); + aWeights.ChangeValue(3, 9) = +0.99801219521191387000; + aPoles.ChangeValue(3, 9) = + gp_Pnt(+103.71561277285424000000, +1.35976677896647580000, -80.17831514578958300000); + aWeights.ChangeValue(3, 10) = +0.99801119017200446000; + aPoles.ChangeValue(3, 10) = + gp_Pnt(+100.50232486897988000000, +1.36042346207845170000, -81.51999289835789900000); + aWeights.ChangeValue(3, 11) = +0.99801030363459775000; + aPoles.ChangeValue(3, 11) = + gp_Pnt(+97.27087733082035500000, +1.36100269005924380000, -82.81788136334564900000); + aWeights.ChangeValue(3, 12) = +0.99800944410125381000; + aPoles.ChangeValue(3, 12) = + gp_Pnt(+94.02193936655145000000, +1.36156425167614130000, -84.07165794609035500000); + aWeights.ChangeValue(3, 13) = +0.99800863606857426000; + aPoles.ChangeValue(3, 13) = + gp_Pnt(+90.75622955795523700000, +1.36209214789795310000, -85.28105659074749700000); + aWeights.ChangeValue(3, 14) = +0.99800791446328430000; + aPoles.ChangeValue(3, 14) = + gp_Pnt(+87.47446474935537700000, +1.36256356235759690000, -86.44582972368263500000); + aWeights.ChangeValue(3, 15) = +0.99800720379689600000; + aPoles.ChangeValue(3, 15) = + gp_Pnt(+84.17731596959211500000, +1.36302781837419680000, -87.56569962027794000000); + aWeights.ChangeValue(3, 16) = +0.99800525790220496000; + aPoles.ChangeValue(3, 16) = + gp_Pnt(+74.24198734063921300000, +1.36429897306986340000, -90.78996991844945800000); + aWeights.ChangeValue(3, 17) = +0.99800413521623321000; + aPoles.ChangeValue(3, 17) = + gp_Pnt(+67.56001809965197000000, +1.36503231983535440000, -92.75885901427626800000); + aWeights.ChangeValue(3, 18) = +0.99800316736440942000; + aPoles.ChangeValue(3, 18) = + gp_Pnt(+60.82490109578901600000, +1.36566449260567850000, -94.54523441794054900000); + aWeights.ChangeValue(3, 19) = +0.99800233531441818000; + aPoles.ChangeValue(3, 19) = + gp_Pnt(+54.04219505707111900000, +1.36620793936844790000, -96.14746061467829500000); + aWeights.ChangeValue(3, 20) = +0.99800162387306934000; + aPoles.ChangeValue(3, 20) = + gp_Pnt(+47.21773986109732800000, +1.36667259642912180000, -97.56414160157402200000); + aWeights.ChangeValue(3, 21) = +0.99800102168630012000; + aPoles.ChangeValue(3, 21) = + gp_Pnt(+40.35765665228271400000, +1.36706588836418840000, -98.79412083143951400000); + aWeights.ChangeValue(3, 22) = +0.99800052123917371000; + aPoles.ChangeValue(3, 22) = + gp_Pnt(+33.46834796257081700000, +1.36739272798589770000, -99.83648116661171900000); + aWeights.ChangeValue(3, 23) = +0.99799971600020576000; + aPoles.ChangeValue(3, 23) = + gp_Pnt(+19.64441706716387900000, +1.36791861440644060000, -101.54459131896159000000); + aWeights.ChangeValue(3, 24) = +0.99799940935225717000; + aPoles.ChangeValue(3, 24) = + gp_Pnt(+12.70928858254282900000, +1.36811887624638580000, -102.21030492597274000000); + aWeights.ChangeValue(3, 25) = +0.99799919351964705000; + aPoles.ChangeValue(3, 25) = + gp_Pnt(+5.75722078489831280000, +1.36825982711689180000, -102.68697252648171000000); + aWeights.ChangeValue(3, 26) = +0.99799906478455291000; + aPoles.ChangeValue(3, 26) = + gp_Pnt(-1.20571159764999210000, +1.36834389755229970000, -102.97410341218257000000); + aWeights.ChangeValue(3, 27) = +0.99799902110371730000; + aPoles.ChangeValue(3, 27) = + gp_Pnt(-8.17346746041202720000, +1.36837242333404090000, -103.07142929357101000000); + aWeights.ChangeValue(3, 28) = +0.99799906210844536000; + aPoles.ChangeValue(3, 28) = + gp_Pnt(-15.14003926915473600000, +1.36834564548690430000, -102.97890429403182000000); + aWeights.ChangeValue(3, 29) = +0.99799918910460783000; + aPoles.ChangeValue(3, 29) = + gp_Pnt(-22.09945300681867100000, +1.36826271027814080000, -102.69670494840925000000); + aWeights.ChangeValue(3, 30) = +0.99799962065035785000; + aPoles.ChangeValue(3, 30) = + gp_Pnt(-35.99208002634647800000, +1.36798088374117890000, -101.75375562004130000000); + aWeights.ChangeValue(3, 31) = +0.99799992612548816000; + aPoles.ChangeValue(3, 31) = + gp_Pnt(-42.92529183965938000000, +1.36778138671521220000, -101.09300634269859000000); + aWeights.ChangeValue(3, 32) = +0.99800032324181509000; + aPoles.ChangeValue(3, 32) = + gp_Pnt(-49.83946240643516700000, +1.36752203923507090000, -100.24338136864999000000); + aWeights.ChangeValue(3, 33) = +0.99800081646744487000; + aPoles.ChangeValue(3, 33) = + gp_Pnt(-56.72868525600537000000, +1.36719992054037180000, -99.20550257416397200000); + aWeights.ChangeValue(3, 34) = +0.99800141299480705000; + aPoles.ChangeValue(3, 34) = + gp_Pnt(-63.58708851299418500000, +1.36681032802942060000, -97.98021473616272200000); + aWeights.ChangeValue(3, 35) = +0.99800212274065336000; + aPoles.ChangeValue(3, 35) = + gp_Pnt(-70.40883481115771800000, +1.36634677727753220000, -96.56858555851044900000); + aWeights.ChangeValue(3, 36) = +0.99800295834605834000; + aPoles.ChangeValue(3, 36) = + gp_Pnt(-77.18812120943384500000, +1.36580100206191160000, -94.97190570545618000000); + aWeights.ChangeValue(3, 37) = +0.99800438851666018000; + aPoles.ChangeValue(3, 37) = + gp_Pnt(-87.04430869357409500000, +1.36486684103840930000, -92.36516064771883800000); + aWeights.ChangeValue(3, 38) = +0.99800487302440710000; + aPoles.ChangeValue(3, 38) = + gp_Pnt(-90.15904180478642600000, +1.36455036334574700000, -91.49906951050012100000); + aWeights.ChangeValue(3, 39) = +0.99800538998403165000; + aPoles.ChangeValue(3, 39) = + gp_Pnt(-93.26280104894121300000, +1.36421268117563340000, -90.59356682763008500000); + aWeights.ChangeValue(3, 40) = +0.99800594114472085000; + aPoles.ChangeValue(3, 40) = + gp_Pnt(-96.35501076566437500000, +1.36385265030680070000, -89.64881447076304300000); + aWeights.ChangeValue(3, 41) = +0.99800652872047668000; + aPoles.ChangeValue(3, 41) = + gp_Pnt(-99.43509702281136200000, +1.36346882243976730000, -88.66498478868943800000); + aWeights.ChangeValue(3, 42) = +0.99800715539011531000; + aPoles.ChangeValue(3, 42) = + gp_Pnt(-102.50248760972849000000, +1.36305944519955100000, -87.64226061031386900000); + aWeights.ChangeValue(3, 43) = +0.99800782429726853000; + aPoles.ChangeValue(3, 43) = + gp_Pnt(-105.55661203062589000000, +1.36262246213878830000, -86.58083524789229600000); + aWeights.ChangeValue(3, 44) = +0.99800929984388531000; + aPoles.ChangeValue(3, 44) = + gp_Pnt(-111.87105232543304000000, +1.36165848631400000000, -84.29637819122412200000); + aWeights.ChangeValue(3, 45) = +0.99801015470554688000; + aPoles.ChangeValue(3, 45) = + gp_Pnt(-115.12916723990907000000, +1.36109998387148300000, -83.06721412498791300000); + aWeights.ChangeValue(3, 46) = +0.99801097177629106000; + aPoles.ChangeValue(3, 46) = + gp_Pnt(-118.37050305702043000000, +1.36056615831231790000, -81.79361556056927900000); + aWeights.ChangeValue(3, 47) = +0.99801197939908182000; + aPoles.ChangeValue(3, 47) = + gp_Pnt(-121.59440429164877000000, +1.35990780214188640000, -80.47594855348815200000); + aWeights.ChangeValue(3, 48) = +0.99801295017732938000; + aPoles.ChangeValue(3, 48) = + gp_Pnt(-124.80011198391350000000, +1.35927349774917520000, -79.11439339164216700000); + aWeights.ChangeValue(3, 49) = +0.99801403220993246000; + aPoles.ChangeValue(3, 49) = + gp_Pnt(-127.98695272451793000000, +1.35856646260703170000, -77.70931006235629500000); + aWeights.ChangeValue(3, 50) = +0.99801521135673477000; + aPoles.ChangeValue(3, 50) = + gp_Pnt(-131.15422466608416000000, +1.35779592883408770000, -76.26099835790641600000); + aWeights.ChangeValue(3, 51) = +0.99801760008173268000; + aPoles.ChangeValue(3, 51) = + gp_Pnt(-137.22341426940562000000, +1.35623488186342090000, -73.38505097675174200000); + aWeights.ChangeValue(3, 52) = +0.99801898347031770000; + aPoles.ChangeValue(3, 52) = + gp_Pnt(-140.12817143218851000000, +1.35533077140178190000, -71.96340636458091900000); + aWeights.ChangeValue(3, 53) = +0.99801998518653323000; + aPoles.ChangeValue(3, 53) = + gp_Pnt(-143.01477271081365000000, +1.35467609324036100000, -70.50482384325539400000); + aWeights.ChangeValue(3, 54) = +0.99802187318341851000; + aPoles.ChangeValue(3, 54) = + gp_Pnt(-145.88296929650440000000, +1.35344206211285110000, -69.01011970904052400000); + aWeights.ChangeValue(3, 55) = +0.99802301113749214000; + aPoles.ChangeValue(3, 55) = + gp_Pnt(-148.73181832948791000000, +1.35269822187277230000, -67.47885556090747600000); + aWeights.ChangeValue(3, 56) = +0.99802485896116799000; + aPoles.ChangeValue(3, 56) = + gp_Pnt(-151.56108889838526000000, +1.35149030610332030000, -65.91196867904423600000); + aWeights.ChangeValue(3, 57) = +0.99802660746081140000; + aPoles.ChangeValue(3, 57) = + gp_Pnt(-154.37005843077941000000, +1.35034719652907540000, -64.30939181125272300000); + aWeights.ChangeValue(3, 58) = +0.99803055992501810000; + aPoles.ChangeValue(3, 58) = + gp_Pnt(-160.16078498432634000000, +1.34776300585323040000, -60.90758294114521500000); + aWeights.ChangeValue(3, 59) = +0.99803322842151521000; + aPoles.ChangeValue(3, 59) = + gp_Pnt(-163.13986451909619000000, +1.34601805132734250000, -59.10384793755353900000); + aWeights.ChangeValue(3, 60) = +0.99803464125751229000; + aPoles.ChangeValue(3, 60) = + gp_Pnt(-166.09208359425281000000, +1.34509430571165490000, -57.25595351707911400000); + aWeights.ChangeValue(3, 61) = +0.99803901668572381000; + aPoles.ChangeValue(3, 61) = + gp_Pnt(-169.02259847263389000000, +1.34223252516315280000, -55.37471701865561600000); + aWeights.ChangeValue(3, 62) = +0.99804026123487555000; + aPoles.ChangeValue(3, 62) = + gp_Pnt(-171.92274649713781000000, +1.34141857200850120000, -53.44681670722970100000); + aWeights.ChangeValue(3, 63) = +0.99804470691034153000; + aPoles.ChangeValue(3, 63) = + gp_Pnt(-174.79824691248783000000, +1.33851025764084610000, -51.48277226031661500000); + aWeights.ChangeValue(3, 64) = +0.99804786265209489000; + aPoles.ChangeValue(3, 64) = + gp_Pnt(-177.64589658566118000000, +1.33644541377468110000, -49.47887210970986900000); + aWeights.ChangeValue(3, 65) = +0.99805209132461004000; + aPoles.ChangeValue(3, 65) = + gp_Pnt(-180.46609411219177000000, +1.33367801102763010000, -47.43691639460438100000); + aWeights.ChangeValue(3, 66) = +0.99805585511720041000; + aPoles.ChangeValue(3, 66) = + gp_Pnt(-183.08478109176986000000, +1.33121501172845690000, -45.54077967192022000000); + aWeights.ChangeValue(3, 67) = +0.99806110806405779000; + aPoles.ChangeValue(3, 67) = + gp_Pnt(-185.68001727848417000000, +1.32777577033982250000, -43.61205685047624300000); + aWeights.ChangeValue(3, 68) = +0.99806241123000117000; + aPoles.ChangeValue(3, 68) = + gp_Pnt(-188.24953622256075000000, +1.32692526187276720000, -41.64902509374122300000); + aWeights.ChangeValue(3, 69) = +0.99807437025077705000; + aPoles.ChangeValue(3, 69) = + gp_Pnt(-190.79766796840426000000, +1.31909012471800140000, -39.65777616520052400000); + aWeights.ChangeValue(3, 70) = +0.99807032269259688000; + aPoles.ChangeValue(3, 70) = + gp_Pnt(-193.31511620328166000000, +1.32174544077043810000, -37.62798636408343400000); + aWeights.ChangeValue(3, 71) = +0.99808625039380772000; + aPoles.ChangeValue(3, 71) = + gp_Pnt(-195.81278252670535000000, +1.31130937814640340000, -35.57429171163009600000); + aWeights.ChangeValue(3, 72) = +0.99809097922828749000; + aPoles.ChangeValue(3, 72) = + gp_Pnt(-198.28008499427182000000, +1.30820906528388470000, -33.48422839734306700000); + aWeights.ChangeValue(3, 73) = +0.99809984631895698000; + aPoles.ChangeValue(3, 73) = + gp_Pnt(-200.72099421295775000000, +1.30239515227575060000, -31.36416391357070300000); + aWeights.ChangeValue(3, 74) = +0.99810637147759285000; + aPoles.ChangeValue(3, 74) = + gp_Pnt(-203.16127009409345000000, +1.29812048781277520000, -29.24337154392900800000); + aWeights.ChangeValue(3, 75) = +0.99812847998895315000; + aPoles.ChangeValue(3, 75) = + gp_Pnt(-205.57777363915829000000, +1.28359951668439790000, -27.09591401257074100000); + aWeights.ChangeValue(3, 76) = +0.99809892249848597000; + aPoles.ChangeValue(3, 76) = + gp_Pnt(-207.95321979211485000000, +1.30303533816127510000, -24.90029856221717000000); + aWeights.ChangeValue(3, 77) = +0.99819234539248169000; + aPoles.ChangeValue(3, 77) = + gp_Pnt(-210.32920376311637000000, +1.24168994973372330000, -22.71372419603407900000); + aWeights.ChangeValue(3, 78) = +0.99816706733577565000; + aPoles.ChangeValue(3, 78) = + gp_Pnt(-212.65404345030839000000, +1.25824740351837460000, -20.46200135460381000000); + aWeights.ChangeValue(3, 79) = +0.99818127776964660000; + aPoles.ChangeValue(3, 79) = + gp_Pnt(-214.94032188963598000000, +1.24888524402456480000, -18.17894168737611000000); + aWeights.ChangeValue(3, 80) = +0.99819475509197664000; + aPoles.ChangeValue(3, 80) = + gp_Pnt(-217.21049138159862000000, +1.24010538580557930000, -15.87773552075580100000); + aWeights.ChangeValue(3, 81) = +0.99826376750414003000; + aPoles.ChangeValue(3, 81) = + gp_Pnt(-219.45963474898130000000, +1.19454909379966280000, -13.56324778739743800000); + aWeights.ChangeValue(4, 1) = +0.99424302042862245000; + aPoles.ChangeValue(4, 1) = + gp_Pnt(+132.13618409480023000000, +0.70840889522526063000, -66.94024029007874800000); + aWeights.ChangeValue(4, 2) = +0.99423758610938695000; + aPoles.ChangeValue(4, 2) = + gp_Pnt(+129.08297406972278000000, +0.70909252303575865000, -68.62615176496952100000); + aWeights.ChangeValue(4, 3) = +0.99423305718875432000; + aPoles.ChangeValue(4, 3) = + gp_Pnt(+126.00685240811242000000, +0.70966228194967051000, -70.27050713058781600000); + aWeights.ChangeValue(4, 4) = +0.99422944886444642000; + aPoles.ChangeValue(4, 4) = + gp_Pnt(+122.90845587213282000000, +0.71011623149435366000, -71.87297804945868100000); + aWeights.ChangeValue(4, 5) = +0.99422505844796127000; + aPoles.ChangeValue(4, 5) = + gp_Pnt(+119.78834767262531000000, +0.71066859395963999000, -73.43294438704307900000); + aWeights.ChangeValue(4, 6) = +0.99422091417503022000; + aPoles.ChangeValue(4, 6) = + gp_Pnt(+116.64728496160824000000, +0.71119000548737488000, -74.95024473036627900000); + aWeights.ChangeValue(4, 7) = +0.99421796254996875000; + aPoles.ChangeValue(4, 7) = + gp_Pnt(+113.48602386120655000000, +0.71156137519735096000, -76.42471498016054500000); + aWeights.ChangeValue(4, 8) = +0.99421452605999638000; + aPoles.ChangeValue(4, 8) = + gp_Pnt(+110.30511547520040000000, +0.71199375553590705000, -77.85578472764748900000); + aWeights.ChangeValue(4, 9) = +0.99420857626658776000; + aPoles.ChangeValue(4, 9) = + gp_Pnt(+103.90553506044348000000, +0.71274238201017392000, -80.63083668700706100000); + aWeights.ChangeValue(4, 10) = +0.99420570386914531000; + aPoles.ChangeValue(4, 10) = + gp_Pnt(+100.68683453164211000000, +0.71310380757531833000, -81.97476109354066400000); + aWeights.ChangeValue(4, 11) = +0.99420317017586146000; + aPoles.ChangeValue(4, 11) = + gp_Pnt(+97.44994659335081600000, +0.71342262156961334000, -83.27482261755635300000); + aWeights.ChangeValue(4, 12) = +0.99420071368291341000; + aPoles.ChangeValue(4, 12) = + gp_Pnt(+94.19554253170841200000, +0.71373172711717636000, -84.53069694549194000000); + aWeights.ChangeValue(4, 13) = +0.99419840439350793000; + aPoles.ChangeValue(4, 13) = + gp_Pnt(+90.92433917217061900000, +0.71402231445757036000, -85.74211902365664200000); + aWeights.ChangeValue(4, 14) = +0.99419634212229768000; + aPoles.ChangeValue(4, 14) = + gp_Pnt(+87.63705473050230000000, +0.71428182289044062000, -86.90884124933938900000); + aWeights.ChangeValue(4, 15) = +0.99419431112670464000; + aPoles.ChangeValue(4, 15) = + gp_Pnt(+84.33436439436984200000, +0.71453739893908408000, -88.03058362353205300000); + aWeights.ChangeValue(4, 16) = +0.99418875003915341000; + aPoles.ChangeValue(4, 16) = + gp_Pnt(+74.38231313217285400000, +0.71523720648163680000, -91.26025430410756200000); + aWeights.ChangeValue(4, 17) = +0.99418554160984429000; + aPoles.ChangeValue(4, 17) = + gp_Pnt(+67.68910051798944500000, +0.71564096751482986000, -93.23244050128337800000); + aWeights.ChangeValue(4, 18) = +0.99418277570171931000; + aPoles.ChangeValue(4, 18) = + gp_Pnt(+60.94265918181897500000, +0.71598904839509359000, -95.02180567308657500000); + aWeights.ChangeValue(4, 19) = +0.99418039790864621000; + aPoles.ChangeValue(4, 19) = + gp_Pnt(+54.14855416044807900000, +0.71628829211206946000, -96.62671289123449000000); + aWeights.ChangeValue(4, 20) = +0.99417836479981814000; + aPoles.ChangeValue(4, 20) = + gp_Pnt(+47.31263275511362600000, +0.71654416141740851000, -98.04576467050098600000); + aWeights.ChangeValue(4, 21) = +0.99417664391975691000; + aPoles.ChangeValue(4, 21) = + gp_Pnt(+40.44102486854357200000, +0.71676073875086976000, -99.27780280738555500000); + aWeights.ChangeValue(4, 22) = +0.99417521378830997000; + aPoles.ChangeValue(4, 22) = + gp_Pnt(+33.54014335198198900000, +0.71694072618465221000, -100.32190824729783000000); + aWeights.ChangeValue(4, 23) = +0.99417291266204433000; + aPoles.ChangeValue(4, 23) = + gp_Pnt(+19.69298272358705000000, +0.71723033475882103000, -102.03287833894613000000); + aWeights.ChangeValue(4, 24) = +0.99417203636017570000; + aPoles.ChangeValue(4, 24) = + gp_Pnt(+12.74619890889187300000, +0.71734062296661449000, -102.69970663658552000000); + aWeights.ChangeValue(4, 25) = +0.99417141958182476000; + aPoles.ChangeValue(4, 25) = + gp_Pnt(+5.78245043030823250000, +0.71741824902277995000, -103.17717197796689000000); + aWeights.ChangeValue(4, 26) = +0.99417105170022846000; + aPoles.ChangeValue(4, 26) = + gp_Pnt(-1.19217909208406270000, +0.71746454980293017000, -103.46478315098152000000); + aWeights.ChangeValue(4, 27) = +0.99417092687508068000; + aPoles.ChangeValue(4, 27) = + gp_Pnt(-8.17163978203099180000, +0.71748026003105458000, -103.56227159755184000000); + aWeights.ChangeValue(4, 28) = +0.99417104405253187000; + aPoles.ChangeValue(4, 28) = + gp_Pnt(-15.14991535484593800000, +0.71746551227361877000, -103.46959139663633000000); + aWeights.ChangeValue(4, 29) = +0.99417140696519068000; + aPoles.ChangeValue(4, 29) = + gp_Pnt(-22.12102296425817400000, +0.71741983693815459000, -103.18691926012113000000); + aWeights.ChangeValue(4, 30) = +0.99417264018315676000; + aPoles.ChangeValue(4, 30) = + gp_Pnt(-36.03699423807252300000, +0.71726462804712465000, -102.24239043165372000000); + aWeights.ChangeValue(4, 31) = +0.99417351313460955000; + aPoles.ChangeValue(4, 31) = + gp_Pnt(-42.98185258768797500000, +0.71715476185170723000, -101.58053487832193000000); + aWeights.ChangeValue(4, 32) = +0.99417464796983568000; + aPoles.ChangeValue(4, 32) = + gp_Pnt(-49.90763755490115700000, +0.71701193671091712000, -100.72948788576410000000); + aWeights.ChangeValue(4, 33) = +0.99417605745995530000; + aPoles.ChangeValue(4, 33) = + gp_Pnt(-56.80843390632649900000, +0.71683454604177377000, -99.68987236817491700000); + aWeights.ChangeValue(4, 34) = +0.99417776216385467000; + aPoles.ChangeValue(4, 34) = + gp_Pnt(-63.67836146608049600000, +0.71662000367742562000, -98.46253420440308400000); + aWeights.ChangeValue(4, 35) = +0.99417979042818705000; + aPoles.ChangeValue(4, 35) = + gp_Pnt(-70.51157486810592400000, +0.71636474389607163000, -97.04854231351581000000); + aWeights.ChangeValue(4, 36) = +0.99418217838737100000; + aPoles.ChangeValue(4, 36) = + gp_Pnt(-77.30226331485057800000, +0.71606422146024096000, -95.44918875092946600000); + aWeights.ChangeValue(4, 37) = +0.99418626551507883000; + aPoles.ChangeValue(4, 37) = + gp_Pnt(-87.17503156127875700000, +0.71554987190288122000, -92.83807781738744300000); + aWeights.ChangeValue(4, 38) = +0.99418765014289556000; + aPoles.ChangeValue(4, 38) = + gp_Pnt(-90.29499963358738100000, +0.71537562386381059000, -91.97053762881716900000); + aWeights.ChangeValue(4, 39) = +0.99418912751868260000; + aPoles.ChangeValue(4, 39) = + gp_Pnt(-93.40397633478176000000, +0.71518970580821706000, -91.06351986664817800000); + aWeights.ChangeValue(4, 40) = +0.99419070264287346000; + aPoles.ChangeValue(4, 40) = + gp_Pnt(-96.50138523104767800000, +0.71499148886670094000, -90.11718659777564300000); + aWeights.ChangeValue(4, 41) = +0.99419238184469383000; + aPoles.ChangeValue(4, 41) = + gp_Pnt(-99.58665166110419900000, +0.71478017704711161000, -89.13171035602891800000); + aWeights.ChangeValue(4, 42) = +0.99419417278216393000; + aPoles.ChangeValue(4, 42) = + gp_Pnt(-102.65920271683186000000, +0.71455480723882170000, -88.10727415073346000000); + aWeights.ChangeValue(4, 43) = +0.99419608444209617000; + aPoles.ChangeValue(4, 43) = + gp_Pnt(-105.71846722422283000000, +0.71431424921765596000, -87.04407147601585800000); + aWeights.ChangeValue(4, 44) = +0.99420030141669824000; + aPoles.ChangeValue(4, 44) = + gp_Pnt(-112.04353021881408000000, +0.71378360593609291000, -84.75579106017932000000); + aWeights.ChangeValue(4, 45) = +0.99420274455295243000; + aPoles.ChangeValue(4, 45) = + gp_Pnt(-115.30712351688430000000, +0.71347617951477893000, -83.52457168950516600000); + aWeights.ChangeValue(4, 46) = +0.99420507969516914000; + aPoles.ChangeValue(4, 46) = + gp_Pnt(-118.55391065270935000000, +0.71318234625457844000, -82.24884224143599500000); + aWeights.ChangeValue(4, 47) = +0.99420795946419460000; + aPoles.ChangeValue(4, 47) = + gp_Pnt(-121.78323693095153000000, +0.71281998990170370000, -80.92897147787398600000); + aWeights.ChangeValue(4, 48) = +0.99421073394729520000; + aPoles.ChangeValue(4, 48) = + gp_Pnt(-124.99434061394447000000, +0.71247088780699119000, -79.56513754354314500000); + aWeights.ChangeValue(4, 49) = +0.99421382643715051000; + aPoles.ChangeValue(4, 49) = + gp_Pnt(-128.18654935306802000000, +0.71208178090166396000, -78.15770189412481300000); + aWeights.ChangeValue(4, 50) = +0.99421719652005114000; + aPoles.ChangeValue(4, 50) = + gp_Pnt(-131.35915951555538000000, +0.71165775668839981000, -76.70696466864815500000); + aWeights.ChangeValue(4, 51) = +0.99422402375653052000; + aPoles.ChangeValue(4, 51) = + gp_Pnt(-137.43857370930490000000, +0.71079877890710363000, -73.82620311743470200000); + aWeights.ChangeValue(4, 52) = +0.99422797768691740000; + aPoles.ChangeValue(4, 52) = + gp_Pnt(-140.34822128390073000000, +0.71030132584778982000, -72.40218284379008700000); + aWeights.ChangeValue(4, 53) = +0.99423084075610579000; + aPoles.ChangeValue(4, 53) = + gp_Pnt(-143.23968120103163000000, +0.70994112075449667000, -70.94115847846593700000); + aWeights.ChangeValue(4, 54) = +0.99423623706224973000; + aPoles.ChangeValue(4, 54) = + gp_Pnt(-146.11271315064005000000, +0.70926223398833632000, -69.44395856663618400000); + aWeights.ChangeValue(4, 55) = +0.99423948964319253000; + aPoles.ChangeValue(4, 55) = + gp_Pnt(-148.96636467875118000000, +0.70885305306993507000, -67.91012785943519200000); + aWeights.ChangeValue(4, 56) = +0.99424477127021760000; + aPoles.ChangeValue(4, 56) = + gp_Pnt(-151.80041102174371000000, +0.70818863107582075000, -66.34061951491401000000); + aWeights.ChangeValue(4, 57) = +0.99424976912431906000; + aPoles.ChangeValue(4, 57) = + gp_Pnt(-154.61412826195317000000, +0.70755993553172780000, -64.73535576374381200000); + aWeights.ChangeValue(4, 58) = +0.99426106692542415000; + aPoles.ChangeValue(4, 58) = + gp_Pnt(-160.41462700323274000000, +0.70613881146866808000, -61.32785485541679500000); + aWeights.ChangeValue(4, 59) = +0.99426869485276259000; + aPoles.ChangeValue(4, 59) = + gp_Pnt(-163.39874797129167000000, +0.70517937516238605000, -59.52109641918814000000); + aWeights.ChangeValue(4, 60) = +0.99427273335051769000; + aPoles.ChangeValue(4, 60) = + gp_Pnt(-166.35588428707737000000, +0.70467140031138198000, -57.67014968010805400000); + aWeights.ChangeValue(4, 61) = +0.99428524121150996000; + aPoles.ChangeValue(4, 61) = + gp_Pnt(-169.29147402675417000000, +0.70309833118760823000, -55.78569706052214600000); + aWeights.ChangeValue(4, 62) = +0.99428879891231192000; + aPoles.ChangeValue(4, 62) = + gp_Pnt(-172.19641321622018000000, +0.70265088960130029000, -53.85463096447261900000); + aWeights.ChangeValue(4, 63) = +0.99430150819260854000; + aPoles.ChangeValue(4, 63) = + gp_Pnt(-175.07684836851479000000, +0.70105264832187786000, -51.88726956537038900000); + aWeights.ChangeValue(4, 64) = +0.99431053021705873000; + aPoles.ChangeValue(4, 64) = + gp_Pnt(-177.92932492963632000000, +0.69991818857623234000, -49.88000737868681300000); + aWeights.ChangeValue(4, 65) = +0.99432262020918794000; + aPoles.ChangeValue(4, 65) = + gp_Pnt(-180.75433885652521000000, +0.69839807993520564000, -47.83460859504128800000); + aWeights.ChangeValue(4, 66) = +0.99433338093448842000; + aPoles.ChangeValue(4, 66) = + gp_Pnt(-183.37745173242254000000, +0.69704510882650861000, -45.93530736698277700000); + aWeights.ChangeValue(4, 67) = +0.99434840096468768000; + aPoles.ChangeValue(4, 67) = + gp_Pnt(-185.97711214268182000000, +0.69515696483250133000, -44.00334265992864100000); + aWeights.ChangeValue(4, 68) = +0.99435212441487342000; + aPoles.ChangeValue(4, 68) = + gp_Pnt(-188.55092060214918000000, +0.69468843290184534000, -42.03706245316480100000); + aWeights.ChangeValue(4, 69) = +0.99438632495837886000; + aPoles.ChangeValue(4, 69) = + gp_Pnt(-191.10351948864678000000, +0.69039032514405918000, -40.04240176159244400000); + aWeights.ChangeValue(4, 70) = +0.99437474610357146000; + aPoles.ChangeValue(4, 70) = + gp_Pnt(-193.62512272227769000000, +0.69184483548244469000, -38.00925246210125900000); + aWeights.ChangeValue(4, 71) = +0.99442029730057158000; + aPoles.ChangeValue(4, 71) = + gp_Pnt(-196.12715745709386000000, +0.68612074693666814000, -35.95207510226987300000); + aWeights.ChangeValue(4, 72) = +0.99443382321708784000; + aPoles.ChangeValue(4, 72) = + gp_Pnt(-198.59871781224271000000, +0.68442148883790921000, -33.85842837168388500000); + aWeights.ChangeValue(4, 73) = +0.99445918644353237000; + aPoles.ChangeValue(4, 73) = + gp_Pnt(-201.04387700918369000000, +0.68123533540985159000, -31.73471330438436400000); + aWeights.ChangeValue(4, 74) = +0.99447784672499884000; + aPoles.ChangeValue(4, 74) = + gp_Pnt(-203.48830197003542000000, +0.67889067518118906000, -29.61036197082074800000); + aWeights.ChangeValue(4, 75) = +0.99454111417144087000; + aPoles.ChangeValue(4, 75) = + gp_Pnt(-205.90905874701556000000, +0.67094847421818948000, -27.45911353863423800000); + aWeights.ChangeValue(4, 76) = +0.99445650432969468000; + aPoles.ChangeValue(4, 76) = + gp_Pnt(-208.28851122415659000000, +0.68156618053615436000, -25.25989914496455000000); + aWeights.ChangeValue(4, 77) = +0.99472383917628937000; + aPoles.ChangeValue(4, 77) = + gp_Pnt(-210.66819860636727000000, +0.64801004101885640000, -23.06997485052475800000); + aWeights.ChangeValue(4, 78) = +0.99465154011060308000; + aPoles.ChangeValue(4, 78) = + gp_Pnt(-212.99829629837927000000, +0.65709020698928045000, -20.81293704958459000000); + aWeights.ChangeValue(4, 79) = +0.99469225299704522000; + aPoles.ChangeValue(4, 79) = + gp_Pnt(-215.28778722004142000000, +0.65198647566642243000, -18.52648999480212300000); + aWeights.ChangeValue(4, 80) = +0.99473072608314816000; + aPoles.ChangeValue(4, 80) = + gp_Pnt(-217.56233176434088000000, +0.64714607636795729000, -16.22125679272672700000); + aWeights.ChangeValue(4, 81) = +0.99492849872148770000; + aPoles.ChangeValue(4, 81) = + gp_Pnt(-219.81591407133737000000, +0.62237708094437050000, -13.90082269618381800000); + aWeights.ChangeValue(5, 1) = +0.99802424639217535000; + aPoles.ChangeValue(5, 1) = + gp_Pnt(+132.45622778603641000000, +0.24240580374773624000, -67.51941232824347600000); + aWeights.ChangeValue(5, 2) = +0.99802234515930366000; + aPoles.ChangeValue(5, 2) = + gp_Pnt(+129.39621499227619000000, +0.24264599956164210000, -69.20932849809996400000); + aWeights.ChangeValue(5, 3) = +0.99802076064199163000; + aPoles.ChangeValue(5, 3) = + gp_Pnt(+126.31320722587012000000, +0.24284620475411531000, -70.85757023346207000000); + aWeights.ChangeValue(5, 4) = +0.99801949820656444000; + aPoles.ChangeValue(5, 4) = + gp_Pnt(+123.20785947444472000000, +0.24300571706284735000, -72.46379895615213200000); + aWeights.ChangeValue(5, 5) = +0.99801796211084626000; + aPoles.ChangeValue(5, 5) = + gp_Pnt(+120.08075545981777000000, +0.24319982314295371000, -74.02745916652884300000); + aWeights.ChangeValue(5, 6) = +0.99801651211139986000; + aPoles.ChangeValue(5, 6) = + gp_Pnt(+116.93263892914923000000, +0.24338306180645181000, -75.54835063375608700000); + aWeights.ChangeValue(5, 7) = +0.99801547938007906000; + aPoles.ChangeValue(5, 7) = + gp_Pnt(+113.76425167349765000000, +0.24351357797625062000, -77.02627451676777100000); + aWeights.ChangeValue(5, 8) = +0.99801427699593348000; + aPoles.ChangeValue(5, 8) = + gp_Pnt(+110.57618061475338000000, +0.24366553774363486000, -78.46071663606139200000); + aWeights.ChangeValue(5, 9) = +0.99801219521177365000; + aPoles.ChangeValue(5, 9) = + gp_Pnt(+104.16217613984874000000, +0.24392865233284403000, -81.24228081548614000000); + aWeights.ChangeValue(5, 10) = +0.99801119017243534000; + aPoles.ChangeValue(5, 10) = + gp_Pnt(+100.93622072836907000000, +0.24405568433254640000, -82.58935804874866400000); + aWeights.ChangeValue(5, 11) = +0.99801030363411136000; + aPoles.ChangeValue(5, 11) = + gp_Pnt(+97.69202612265307600000, +0.24416774311013159000, -83.89246252379766100000); + aWeights.ChangeValue(5, 12) = +0.99800944410126124000; + aPoles.ChangeValue(5, 12) = + gp_Pnt(+94.43027249107268500000, +0.24427639255629080000, -85.15127753548810600000); + aWeights.ChangeValue(5, 13) = +0.99800863606905588000; + aPoles.ChangeValue(5, 13) = + gp_Pnt(+91.15167507122404800000, +0.24437853537532742000, -86.36553541507953500000); + aWeights.ChangeValue(5, 14) = +0.99800791446282866000; + aPoles.ChangeValue(5, 14) = + gp_Pnt(+87.85695090009397700000, +0.24446975628264125000, -87.53498464352057300000); + aWeights.ChangeValue(5, 15) = +0.99800720379704511000; + aPoles.ChangeValue(5, 15) = + gp_Pnt(+84.54678770958248900000, +0.24455959646371978000, -88.65934979276558200000); + aWeights.ChangeValue(5, 16) = +0.99800525790220262000; + aPoles.ChangeValue(5, 16) = + gp_Pnt(+74.57222162875666500000, +0.24480559775636487000, -91.89655746079053200000); + aWeights.ChangeValue(5, 17) = +0.99800413521623044000; + aPoles.ChangeValue(5, 17) = + gp_Pnt(+67.86385477996348900000, +0.24494753702776123000, -93.87334138726605200000); + aWeights.ChangeValue(5, 18) = +0.99800316736440708000; + aPoles.ChangeValue(5, 18) = + gp_Pnt(+61.10212188651380700000, +0.24506990714535715000, -95.66687639706128700000); + aWeights.ChangeValue(5, 19) = +0.99800233531441618000; + aPoles.ChangeValue(5, 19) = + gp_Pnt(+54.29260355218377000000, +0.24517511152453569000, -97.27552257290322800000); + aWeights.ChangeValue(5, 20) = +0.99800162387306812000; + aPoles.ChangeValue(5, 20) = + gp_Pnt(+47.44116356008504500000, +0.24526506890417449000, -98.69787956398771200000); + aWeights.ChangeValue(5, 21) = +0.99800102168629923000; + aPoles.ChangeValue(5, 21) = + gp_Pnt(+40.55394899036769400000, +0.24534121333759545000, -99.93278652962781900000); + aWeights.ChangeValue(5, 22) = +0.99800052123917249000; + aPoles.ChangeValue(5, 22) = + gp_Pnt(+33.63739034141031700000, +0.24540449418574758000, -100.97932209286283000000); + aWeights.ChangeValue(5, 23) = +0.99799971600020576000; + aPoles.ChangeValue(5, 23) = + gp_Pnt(+19.75877904385457000000, +0.24550631764576064000, -102.69427034587730000000); + aWeights.ChangeValue(5, 24) = +0.99799940935225595000; + aPoles.ChangeValue(5, 24) = + gp_Pnt(+12.79621461719473900000, +0.24554509442498113000, -103.36264862290150000000); + aWeights.ChangeValue(5, 25) = +0.99799919351964361000; + aPoles.ChangeValue(5, 25) = + gp_Pnt(+5.81664173483571470000, +0.24557238768930081000, -103.84122357926364000000); + aWeights.ChangeValue(5, 26) = +0.99799906478454914000; + aPoles.ChangeValue(5, 26) = + gp_Pnt(-1.17384006705611750000, +0.24558866712534574000, -104.12950288114470000000); + aWeights.ChangeValue(5, 27) = +0.99799902110371452000; + aPoles.ChangeValue(5, 27) = + gp_Pnt(-8.16916502467035950000, +0.24559419086566145000, -104.22721740658889000000); + aWeights.ChangeValue(5, 28) = +0.99799906210844525000; + aPoles.ChangeValue(5, 28) = + gp_Pnt(-15.16330109337111900000, +0.24558900548798951000, -104.13432123956672000000); + aWeights.ChangeValue(5, 29) = +0.99799918910460916000; + aPoles.ChangeValue(5, 29) = + gp_Pnt(-22.15024989420349800000, +0.24557294601509544000, -103.85099166853988000000); + aWeights.ChangeValue(5, 30) = +0.99799962065035952000; + aPoles.ChangeValue(5, 30) = + gp_Pnt(-36.09784025928350100000, +0.24551837507724711000, -102.90426687944763000000); + aWeights.ChangeValue(5, 31) = +0.99799992612548860000; + aPoles.ChangeValue(5, 31) = + gp_Pnt(-43.05848024708384300000, +0.24547974681812620000, -102.24087223758063000000); + aWeights.ChangeValue(5, 32) = +0.99800032324181287000; + aPoles.ChangeValue(5, 32) = + gp_Pnt(-50.00000136683811300000, +0.24542953068576923000, -101.38784584473753000000); + aWeights.ChangeValue(5, 33) = +0.99800081646744143000; + aPoles.ChangeValue(5, 33) = + gp_Pnt(-56.91647304260395400000, +0.24536716218422927000, -100.34581179308852000000); + aWeights.ChangeValue(5, 34) = +0.99800141299480460000; + aPoles.ChangeValue(5, 34) = + gp_Pnt(-63.80199929133657100000, +0.24529173277606747000, -99.11561770524215800000); + aWeights.ChangeValue(5, 35) = +0.99800212274065292000; + aPoles.ChangeValue(5, 35) = + gp_Pnt(-70.65071863638867500000, +0.24520198988589620000, -97.69833476064030700000); + aWeights.ChangeValue(5, 36) = +0.99800295834605834000; + aPoles.ChangeValue(5, 36) = + gp_Pnt(-77.45680402323041800000, +0.24509633690518939000, -96.09525772913629300000); + aWeights.ChangeValue(5, 37) = +0.99800438851665707000; + aPoles.ChangeValue(5, 37) = + gp_Pnt(-87.35194268844766400000, +0.24491551610541196000, -93.47806376363495000000); + aWeights.ChangeValue(5, 38) = +0.99800487302440644000; + aPoles.ChangeValue(5, 38) = + gp_Pnt(-90.47898339307414500000, +0.24485425955861742000, -92.60850028621504700000); + aWeights.ChangeValue(5, 39) = +0.99800538998403221000; + aPoles.ChangeValue(5, 39) = + gp_Pnt(-93.59500505694055100000, +0.24478890139349116000, -91.69936647202810300000); + aWeights.ChangeValue(5, 40) = +0.99800594114472096000; + aPoles.ChangeValue(5, 40) = + gp_Pnt(-96.69942959625443300000, +0.24471922075774133000, -90.75082469114758500000); + aWeights.ChangeValue(5, 41) = +0.99800652872047502000; + aPoles.ChangeValue(5, 41) = + gp_Pnt(-99.79168063143930600000, +0.24464493811196314000, -89.76304779373697300000); + aWeights.ChangeValue(5, 42) = +0.99800715539011187000; + aPoles.ChangeValue(5, 42) = + gp_Pnt(-102.87118348036965000000, +0.24456571523016235000, -88.73621911304020700000); + aWeights.ChangeValue(5, 43) = +0.99800782429726465000; + aPoles.ChangeValue(5, 43) = + gp_Pnt(-105.93736515171811000000, +0.24448115520035879000, -87.67053246863201800000); + aWeights.ChangeValue(5, 44) = +0.99800929984371112000; + aPoles.ChangeValue(5, 44) = + gp_Pnt(-112.27672847568951000000, +0.24429462970498794000, -85.37690123862388700000); + aWeights.ChangeValue(5, 45) = +0.99801015470633669000; + aPoles.ChangeValue(5, 45) = + gp_Pnt(-115.54769755356581000000, +0.24418656943131900000, -84.14279592325505100000); + aWeights.ChangeValue(5, 46) = +0.99801097177455889000; + aPoles.ChangeValue(5, 46) = + gp_Pnt(-118.80182311076892000000, +0.24408328894344730000, -82.86408351153079400000); + aWeights.ChangeValue(5, 47) = +0.99801197940129383000; + aPoles.ChangeValue(5, 47) = + gp_Pnt(-122.03843417449148000000, +0.24395592759703674000, -81.54111184389478200000); + aWeights.ChangeValue(5, 48) = +0.99801295017559344000; + aPoles.ChangeValue(5, 48) = + gp_Pnt(-125.25678060282321000000, +0.24383322797751039000, -80.17408187890907800000); + aWeights.ChangeValue(5, 49) = +0.99801403221073270000; + aPoles.ChangeValue(5, 49) = + gp_Pnt(-128.45617956663568000000, +0.24369647262362162000, -78.76334161483092100000); + aWeights.ChangeValue(5, 50) = +0.99801521135655380000; + aPoles.ChangeValue(5, 50) = + gp_Pnt(-131.63592529803751000000, +0.24354745092247693000, -77.30919404502431300000); + aWeights.ChangeValue(5, 51) = +0.99801760008187401000; + aPoles.ChangeValue(5, 51) = + gp_Pnt(-137.72900951211963000000, +0.24324557860805471000, -74.42165429070698200000); + aWeights.ChangeValue(5, 52) = +0.99801898346970708000; + aPoles.ChangeValue(5, 52) = + gp_Pnt(-140.64518873661288000000, +0.24307076523393223000, -72.99426192178911800000); + aWeights.ChangeValue(5, 53) = +0.99801998518786039000; + aPoles.ChangeValue(5, 53) = + gp_Pnt(-143.54316005505726000000, +0.24294418386170585000, -71.52981926220020600000); + aWeights.ChangeValue(5, 54) = +0.99802187318168345000; + aPoles.ChangeValue(5, 54) = + gp_Pnt(-146.42260629144496000000, +0.24270562978064991000, -70.02903356238938700000); + aWeights.ChangeValue(5, 55) = +0.99802301113888081000; + aPoles.ChangeValue(5, 55) = + gp_Pnt(-149.28266198929455000000, +0.24256185427332766000, -68.49161271016626500000); + aWeights.ChangeValue(5, 56) = +0.99802485896051119000; + aPoles.ChangeValue(5, 56) = + gp_Pnt(-152.12302992679020000000, +0.24232840183433180000, -66.91836178765569800000); + aWeights.ChangeValue(5, 57) = +0.99802660746095961000; + aPoles.ChangeValue(5, 57) = + gp_Pnt(-154.94301695331424000000, +0.24210751871096883000, -65.30929034698890200000); + aWeights.ChangeValue(5, 58) = +0.99803055992501044000; + aPoles.ChangeValue(5, 58) = + gp_Pnt(-160.75642720778953000000, +0.24160825342055195000, -61.89368007550259400000); + aWeights.ChangeValue(5, 59) = +0.99803322842160846000; + aPoles.ChangeValue(5, 59) = + gp_Pnt(-163.74717060555361000000, +0.24127121961594802000, -60.08255013672670200000); + aWeights.ChangeValue(5, 60) = +0.99803464125717123000; + aPoles.ChangeValue(5, 60) = + gp_Pnt(-166.71086689375946000000, +0.24109275824918924000, -58.22731479955884700000); + aWeights.ChangeValue(5, 61) = +0.99803901668628470000; + aPoles.ChangeValue(5, 61) = + gp_Pnt(-169.65297207222594000000, +0.24054025241076704000, -56.33806928337021700000); + aWeights.ChangeValue(5, 62) = +0.99804026123435818000; + aPoles.ChangeValue(5, 62) = + gp_Pnt(-172.56427255537395000000, +0.24038308942389072000, -54.40260496408483000000); + aWeights.ChangeValue(5, 63) = +0.99804470691060532000; + aPoles.ChangeValue(5, 63) = + gp_Pnt(-175.45101016300779000000, +0.23982181928534163000, -52.43032166263763100000); + aWeights.ChangeValue(5, 64) = +0.99804786265202527000; + aPoles.ChangeValue(5, 64) = + gp_Pnt(-178.30970270493245000000, +0.23942347201733374000, -50.41823769283568900000); + aWeights.ChangeValue(5, 65) = +0.99805209132460959000; + aPoles.ChangeValue(5, 65) = + gp_Pnt(-181.14080917168710000000, +0.23888978094458979000, -48.36782293133622100000); + aWeights.ChangeValue(5, 66) = +0.99805585511722006000; + aPoles.ChangeValue(5, 66) = + gp_Pnt(-183.76963089028271000000, +0.23841474156011525000, -46.46384963887197700000); + aWeights.ChangeValue(5, 67) = +0.99806110806389992000; + aPoles.ChangeValue(5, 67) = + gp_Pnt(-186.37480135254410000000, +0.23775204017864099000, -44.52702607060874100000); + aWeights.ChangeValue(5, 68) = +0.99806241123039841000; + aPoles.ChangeValue(5, 68) = + gp_Pnt(-188.95443339023049000000, +0.23758721013871806000, -42.55611011320790700000); + aWeights.ChangeValue(5, 69) = +0.99807437025022461000; + aPoles.ChangeValue(5, 69) = + gp_Pnt(-191.51185439080101000000, +0.23607937004601673000, -40.55588840407725800000); + aWeights.ChangeValue(5, 70) = +0.99807032269304363000; + aPoles.ChangeValue(5, 70) = + gp_Pnt(-194.03956238778505000000, +0.23658914396266717000, -38.51843887702921200000); + aWeights.ChangeValue(5, 71) = +0.99808625039358922000; + aPoles.ChangeValue(5, 71) = + gp_Pnt(-196.54607703546344000000, +0.23458111537982981000, -36.45513422497234800000); + aWeights.ChangeValue(5, 72) = +0.99809097922833689000; + aPoles.ChangeValue(5, 72) = + gp_Pnt(-199.02284030117690000000, +0.23398526561785285000, -34.35633603568415100000); + aWeights.ChangeValue(5, 73) = +0.99809984631895676000; + aPoles.ChangeValue(5, 73) = + gp_Pnt(-201.47284391020807000000, +0.23286808083306546000, -32.22700780168109700000); + aWeights.ChangeValue(5, 74) = +0.99810637147739267000; + aPoles.ChangeValue(5, 74) = + gp_Pnt(-203.92239692899503000000, +0.23204542949601353000, -30.09717639714928000000); + aWeights.ChangeValue(5, 75) = +0.99812847998973830000; + aPoles.ChangeValue(5, 75) = + gp_Pnt(-206.34684289021220000000, +0.22926391512904498000, -27.93902362306789300000); + aWeights.ChangeValue(5, 76) = +0.99809892249694432000; + aPoles.ChangeValue(5, 76) = + gp_Pnt(-208.73420674519565000000, +0.23297935369059405000, -25.73750919512989600000); + aWeights.ChangeValue(5, 77) = +0.99819234539430379000; + aPoles.ChangeValue(5, 77) = + gp_Pnt(-211.11258262007470000000, +0.22122441504945897000, -23.53328220960779800000); + aWeights.ChangeValue(5, 78) = +0.99816706733442118000; + aPoles.ChangeValue(5, 78) = + gp_Pnt(-213.44890831521380000000, +0.22441150695403267000, -21.27426418813643800000); + aWeights.ChangeValue(5, 79) = +0.99818127777024523000; + aPoles.ChangeValue(5, 79) = + gp_Pnt(-215.74298068197336000000, +0.22262736656649654000, -18.98075706196405200000); + aWeights.ChangeValue(5, 80) = +0.99819475509184485000; + aPoles.ChangeValue(5, 80) = + gp_Pnt(-218.02209738817496000000, +0.22092240555297402000, -16.66880151580776100000); + aWeights.ChangeValue(5, 81) = +0.99826376750413803000; + aPoles.ChangeValue(5, 81) = + gp_Pnt(-220.27506837008727000000, +0.21227676902692139000, -14.33587171753685400000); + aWeights.ChangeValue(6, 1) = +1.00955713824395920000; + aPoles.ChangeValue(6, 1) = + gp_Pnt(+132.82497533600920000000, -0.00000000000000355271, -68.18672206105269100000); + aWeights.ChangeValue(6, 2) = +1.00956608612165510000; + aPoles.ChangeValue(6, 2) = + gp_Pnt(+129.75720107675980000000, -0.00000000000001501048, -69.88134023490506800000); + aWeights.ChangeValue(6, 3) = +1.00957354292813720000; + aPoles.ChangeValue(6, 3) = + gp_Pnt(+126.66630562875893000000, +0.00000000000001468880, -71.53414324810810900000); + aWeights.ChangeValue(6, 4) = +1.00957948395969920000; + aPoles.ChangeValue(6, 4) = + gp_Pnt(+123.55299204973852000000, -0.00000000000002420214, -73.14476521965842400000); + aWeights.ChangeValue(6, 5) = +1.00958671248272540000; + aPoles.ChangeValue(6, 5) = + gp_Pnt(+120.41786571412476000000, +0.00000000000000774289, -74.71276629883676900000); + aWeights.ChangeValue(6, 6) = +1.00959353559449030000; + aPoles.ChangeValue(6, 6) = + gp_Pnt(+117.26165038381876000000, +0.00000000000002827238, -76.23787924846354300000); + aWeights.ChangeValue(6, 7) = +1.00959839503053540000; + aPoles.ChangeValue(6, 7) = + gp_Pnt(+114.08506189168672000000, -0.00000000000002567399, -77.71984701658058700000); + aWeights.ChangeValue(6, 8) = +1.00960405269295440000; + aPoles.ChangeValue(6, 8) = + gp_Pnt(+110.88875430250306000000, +0.00000000000001531652, -79.15824703626482500000); + aWeights.ChangeValue(6, 9) = +1.00961384794965610000; + aPoles.ChangeValue(6, 9) = + gp_Pnt(+104.45816547225203000000, +0.00000000000002372811, -81.94743615023858800000); + aWeights.ChangeValue(6, 10) = +1.00961857675613920000; + aPoles.ChangeValue(6, 10) = + gp_Pnt(+101.22387341781818000000, -0.00000000000003253030, -83.29820264563102200000); + aWeights.ChangeValue(6, 11) = +1.00962274789490230000; + aPoles.ChangeValue(6, 11) = + gp_Pnt(+97.97127406275538400000, +0.00000000000002165813, -84.60486564781918200000); + aWeights.ChangeValue(6, 12) = +1.00962679188945900000; + aPoles.ChangeValue(6, 12) = + gp_Pnt(+94.70106106239124700000, +0.00000000000003307844, -85.86712155505158300000); + aWeights.ChangeValue(6, 13) = +1.00963059350859920000; + aPoles.ChangeValue(6, 13) = + gp_Pnt(+91.41394873512904000000, -0.00000000000001002370, -87.08469757155246800000); + aWeights.ChangeValue(6, 14) = +1.00963398843787310000; + aPoles.ChangeValue(6, 14) = + gp_Pnt(+88.11065082060795800000, -0.00000000000001620026, -88.25733602781997400000); + aWeights.ChangeValue(6, 15) = +1.00963733185343440000; + aPoles.ChangeValue(6, 15) = + gp_Pnt(+84.79187377942922400000, +0.00000000000001387836, -89.38476986722990600000); + aWeights.ChangeValue(6, 16) = +1.00964648640037490000; + aPoles.ChangeValue(6, 16) = + gp_Pnt(+74.79138897281484300000, +0.00000000000001147648, -92.63077806554609600000); + aWeights.ChangeValue(6, 17) = +1.00965176794147980000; + aPoles.ChangeValue(6, 17) = + gp_Pnt(+68.06556894151637500000, +0.00000000000001348105, -94.61292925638954900000); + aWeights.ChangeValue(6, 18) = +1.00965632094816880000; + aPoles.ChangeValue(6, 18) = + gp_Pnt(+61.28620656548358900000, +0.00000000000001132208, -96.41133393799678700000); + aWeights.ChangeValue(6, 19) = +1.00966023501695920000; + aPoles.ChangeValue(6, 19) = + gp_Pnt(+54.45890525472331200000, +0.00000000000000779610, -98.02434736777235000000); + aWeights.ChangeValue(6, 20) = +1.00966358166845540000; + aPoles.ChangeValue(6, 20) = + gp_Pnt(+47.58955228763309700000, +0.00000000000000496426, -99.45056478986435900000); + aWeights.ChangeValue(6, 21) = +1.00966641434734750000; + aPoles.ChangeValue(6, 21) = + gp_Pnt(+40.68431826182812500000, +0.00000000000000415229, -100.68882169811890000000); + aWeights.ChangeValue(6, 22) = +1.00966876842241240000; + aPoles.ChangeValue(6, 22) = + gp_Pnt(+33.74965652868991100000, +0.00000000000000595055, -101.73819405254569000000); + aWeights.ChangeValue(6, 23) = +1.00967255617655690000; + aPoles.ChangeValue(6, 23) = + gp_Pnt(+19.83474481990451800000, +0.00000000000000626687, -103.45778313292877000000); + aWeights.ChangeValue(6, 24) = +1.00967399859793900000; + aPoles.ChangeValue(6, 24) = + gp_Pnt(+12.85396744583563800000, +0.00000000000000961706, -104.12796934503771000000); + aWeights.ChangeValue(6, 25) = +1.00967501382969150000; + aPoles.ChangeValue(6, 25) = + gp_Pnt(+5.85612456199985140000, +0.00000000000001451316, -104.60783896197547000000); + aWeights.ChangeValue(6, 26) = +1.00967561936958040000; + aPoles.ChangeValue(6, 26) = + gp_Pnt(-1.15266320632332260000, +0.00000000000001739414, -104.89689790453474000000); + aWeights.ChangeValue(6, 27) = +1.00967582483410530000; + aPoles.ChangeValue(6, 27) = + gp_Pnt(-8.16630892272242730000, +0.00000000000001688939, -104.99487618531697000000); + aWeights.ChangeValue(6, 28) = +1.00967563195849790000; + aPoles.ChangeValue(6, 28) = + gp_Pnt(-15.17875958769639600000, +0.00000000000001381871, -104.90172793642448000000); + aWeights.ChangeValue(6, 29) = +1.00967503459672230000; + aPoles.ChangeValue(6, 29) = + gp_Pnt(-22.18399638815323600000, +0.00000000000001119232, -104.61763141615558000000); + aWeights.ChangeValue(6, 30) = +1.00967300468446440000; + aPoles.ChangeValue(6, 30) = + gp_Pnt(-36.16808769247344200000, +0.00000000000001926896, -103.66834538209933000000); + aWeights.ChangeValue(6, 31) = +1.00967156777535520000; + aPoles.ChangeValue(6, 31) = + gp_Pnt(-43.14695215605046700000, +0.00000000000002086710, -103.00315490229345000000); + aWeights.ChangeValue(6, 32) = +1.00966969979090850000; + aPoles.ChangeValue(6, 32) = + gp_Pnt(-50.10664482445217500000, +0.00000000000002115378, -102.14781821392242000000); + aWeights.ChangeValue(6, 33) = +1.00966737970297340000; + aPoles.ChangeValue(6, 33) = + gp_Pnt(-57.04121502398449900000, +0.00000000000002158031, -101.10296070558179000000); + aWeights.ChangeValue(6, 34) = +1.00966457365849420000; + aPoles.ChangeValue(6, 34) = + gp_Pnt(-63.94474533155499800000, +0.00000000000002290082, -99.86943240681669900000); + aWeights.ChangeValue(6, 35) = +1.00966123497950670000; + aPoles.ChangeValue(6, 35) = + gp_Pnt(-70.81135197820185600000, +0.00000000000002517228, -98.44830786498150100000); + aWeights.ChangeValue(6, 36) = +1.00965730416314160000; + aPoles.ChangeValue(6, 36) = + gp_Pnt(-77.63518524225725100000, +0.00000000000002775445, -96.84088598857995600000); + aWeights.ChangeValue(6, 37) = +1.00965057624219750000; + aPoles.ChangeValue(6, 37) = + gp_Pnt(-87.55609990295042200000, +0.00000000000002423047, -94.21659328767886200000); + aWeights.ChangeValue(6, 38) = +1.00964829695753600000; + aPoles.ChangeValue(6, 38) = + gp_Pnt(-90.69129861847109500000, +0.00000000000002587407, -93.34466557470412300000); + aWeights.ChangeValue(6, 39) = +1.00964586498085130000; + aPoles.ChangeValue(6, 39) = + gp_Pnt(-93.81544408055053500000, +0.00000000000003006614, -92.43305897005754400000); + aWeights.ChangeValue(6, 40) = +1.00964327207695040000; + aPoles.ChangeValue(6, 40) = + gp_Pnt(-96.92795589621758300000, +0.00000000000003388207, -91.48193626907418300000); + aWeights.ChangeValue(6, 41) = +1.00964050782223150000; + aPoles.ChangeValue(6, 41) = + gp_Pnt(-100.02825520717420000000, +0.00000000000003564727, -90.49147079864104600000); + aWeights.ChangeValue(6, 42) = +1.00963755960468200000; + aPoles.ChangeValue(6, 42) = + gp_Pnt(-103.11576472135789000000, +0.00000000000003493709, -89.46184640324143800000); + aWeights.ChangeValue(6, 43) = +1.00963441262388120000; + aPoles.ChangeValue(6, 43) = + gp_Pnt(-106.18990874397944000000, +0.00000000000003257692, -88.39325742978746800000); + aWeights.ChangeValue(6, 44) = +1.00962747055172470000; + aPoles.ChangeValue(6, 44) = + gp_Pnt(-112.54574015681582000000, +0.00000000000006160655, -86.09336936272072200000); + aWeights.ChangeValue(6, 45) = +1.00962344856191890000; + aPoles.ChangeValue(6, 45) = + gp_Pnt(-115.82520602454126000000, -0.00000000000003931317, -84.85588414554271700000); + aWeights.ChangeValue(6, 46) = +1.00961960432502520000; + aPoles.ChangeValue(6, 46) = + gp_Pnt(-119.08778487668772000000, +0.00000000000016494845, -83.57368219250022900000); + aWeights.ChangeValue(6, 47) = +1.00961486341637220000; + aPoles.ChangeValue(6, 47) = + gp_Pnt(-122.33277704237545000000, -0.00000000000006102663, -82.24707666574315100000); + aWeights.ChangeValue(6, 48) = +1.00961029578642010000; + aPoles.ChangeValue(6, 48) = + gp_Pnt(-125.55945424028559000000, +0.00000000000005443726, -80.87630621413205700000); + aWeights.ChangeValue(6, 49) = +1.00960520453872830000; + aPoles.ChangeValue(6, 49) = + gp_Pnt(-128.76711471386264000000, +0.00000000000006731284, -79.46169679871513800000); + aWeights.ChangeValue(6, 50) = +1.00959965618806670000; + aPoles.ChangeValue(6, 50) = + gp_Pnt(-131.95505034236234000000, +0.00000000000001744703, -78.00355594499717400000); + aWeights.ChangeValue(6, 51) = +1.00958841592259230000; + aPoles.ChangeValue(6, 51) = + gp_Pnt(-138.06383173526737000000, +0.00000000000005091738, -75.10807262033468100000); + aWeights.ChangeValue(6, 52) = +1.00958190609477040000; + aPoles.ChangeValue(6, 52) = + gp_Pnt(-140.98751167669514000000, +0.00000000000001249767, -73.67671445695528100000); + aWeights.ChangeValue(6, 53) = +1.00957719226123470000; + aPoles.ChangeValue(6, 53) = + gp_Pnt(-143.89297197091258000000, +0.00000000000004304958, -72.20827197874005800000); + aWeights.ChangeValue(6, 54) = +1.00956830736954160000; + aPoles.ChangeValue(6, 54) = + gp_Pnt(-146.77976177895343000000, +0.00000000000014315600, -70.70325097869228200000); + aWeights.ChangeValue(6, 55) = +1.00956295195680430000; + aPoles.ChangeValue(6, 55) = + gp_Pnt(-149.64716302220674000000, -0.00000000000013374459, -69.16163316263994400000); + aWeights.ChangeValue(6, 56) = +1.00955425555763600000; + aPoles.ChangeValue(6, 56) = + gp_Pnt(-152.49476001470052000000, +0.00000000000014982315, -67.58397318476696100000); + aWeights.ChangeValue(6, 57) = +1.00954602613024340000; + aPoles.ChangeValue(6, 57) = + gp_Pnt(-155.32190503332637000000, -0.00000000000000021066, -65.97043121899140800000); + aWeights.ChangeValue(6, 58) = +1.00952742278739690000; + aPoles.ChangeValue(6, 58) = + gp_Pnt(-161.15007234465017000000, -0.00000000000001992904, -62.54527347940126700000); + aWeights.ChangeValue(6, 59) = +1.00951486183122910000; + aPoles.ChangeValue(6, 59) = + gp_Pnt(-164.14837014605524000000, +0.00000000000023572067, -60.72896647597298900000); + aWeights.ChangeValue(6, 60) = +1.00950821186278380000; + aPoles.ChangeValue(6, 60) = + gp_Pnt(-167.11960531963629000000, -0.00000000000028988207, -58.86870049528032900000); + aWeights.ChangeValue(6, 61) = +1.00948761363721440000; + aPoles.ChangeValue(6, 61) = + gp_Pnt(-170.06906478280905000000, +0.00000000000040689923, -56.97372124744497800000); + aWeights.ChangeValue(6, 62) = +1.00948175483910860000; + aPoles.ChangeValue(6, 62) = + gp_Pnt(-172.98765254825670000000, -0.00000000000024250881, -55.03312548926784600000); + aWeights.ChangeValue(6, 63) = +1.00946082358368820000; + aPoles.ChangeValue(6, 63) = + gp_Pnt(-175.88148729884773000000, +0.00000000000015443744, -53.05496328096450000000); + aWeights.ChangeValue(6, 64) = +1.00944596410276510000; + aPoles.ChangeValue(6, 64) = + gp_Pnt(-178.74719668858941000000, +0.00000000000002184305, -51.03719587787818300000); + aWeights.ChangeValue(6, 65) = +1.00942605045267690000; + aPoles.ChangeValue(6, 65) = + gp_Pnt(-181.58512029181043000000, +0.00000000000003863576, -48.98084041218928800000); + aWeights.ChangeValue(6, 66) = +1.00940832657292460000; + aPoles.ChangeValue(6, 66) = + gp_Pnt(-184.22041885135505000000, +0.00000000000012642202, -47.07128183802177500000); + aWeights.ChangeValue(6, 67) = +1.00938358350016230000; + aPoles.ChangeValue(6, 67) = + gp_Pnt(-186.83172267077580000000, -0.00000000000026075896, -45.12863792869809700000); + aWeights.ChangeValue(6, 68) = +1.00937745534316470000; + aPoles.ChangeValue(6, 68) = + gp_Pnt(-189.41814135962036000000, +0.00000000000050815389, -43.15221363464823400000); + aWeights.ChangeValue(6, 69) = +1.00932110415609880000; + aPoles.ChangeValue(6, 69) = + gp_Pnt(-191.98049421722968000000, -0.00000000000036869153, -41.14519558079494000000); + aWeights.ChangeValue(6, 70) = +1.00934018958992230000; + aPoles.ChangeValue(6, 70) = + gp_Pnt(-194.51554398045388000000, +0.00000000000024701945, -39.10283303403318900000); + aWeights.ChangeValue(6, 71) = +1.00926513417534820000; + aPoles.ChangeValue(6, 71) = + gp_Pnt(-197.02654362639632000000, +0.00000000000002378284, -37.03182458375535900000); + aWeights.ChangeValue(6, 72) = +1.00924284324015100000; + aPoles.ChangeValue(6, 72) = + gp_Pnt(-199.50902604112426000000, +0.00000000000001468063, -34.92696457232537500000); + aWeights.ChangeValue(6, 73) = +1.00920104311988210000; + aPoles.ChangeValue(6, 73) = + gp_Pnt(-201.96417476016930000000, +0.00000000000004485301, -32.79087292323346500000); + aWeights.ChangeValue(6, 74) = +1.00917029694376930000; + aPoles.ChangeValue(6, 74) = + gp_Pnt(-204.41947086956830000000, +0.00000000000007013856, -30.65436716589900700000); + aWeights.ChangeValue(6, 75) = +1.00906597799622610000; + aPoles.ChangeValue(6, 75) = + gp_Pnt(-206.84718146821811000000, -0.00000000000006381675, -28.48746943619916600000); + aWeights.ChangeValue(6, 76) = +1.00920552993238920000; + aPoles.ChangeValue(6, 76) = + gp_Pnt(-209.24487385523256000000, +0.00000000000020688933, -26.28443183778934900000); + aWeights.ChangeValue(6, 77) = +1.00876475817276390000; + aPoles.ChangeValue(6, 77) = + gp_Pnt(-211.61934752962611000000, -0.00000000000012087895, -24.05869960942788700000); + aWeights.ChangeValue(6, 78) = +1.00888387250480620000; + aPoles.ChangeValue(6, 78) = + gp_Pnt(-213.96155431166437000000, +0.00000000000019025578, -21.80066237623914200000); + aWeights.ChangeValue(6, 79) = +1.00881670070678450000; + aPoles.ChangeValue(6, 79) = + gp_Pnt(-216.26151615033589000000, -0.00000000000009572292, -19.49741392382435400000); + aWeights.ChangeValue(6, 80) = +1.00875338528797620000; + aPoles.ChangeValue(6, 80) = + gp_Pnt(-218.54531424806936000000, +0.00000000000008182630, -17.17704407009146500000); + aWeights.ChangeValue(6, 81) = +1.00842683370719580000; + aPoles.ChangeValue(6, 81) = + gp_Pnt(-220.79435406720884000000, +0.00000000000004973799, -14.82789528118522200000); + aWeights.ChangeValue(7, 1) = +1.02986327036737910000; + aPoles.ChangeValue(7, 1) = + gp_Pnt(+133.20307692191452000000, -0.00000000000000177636, -68.87095947031473000000); + aWeights.ChangeValue(7, 2) = +1.02989244478762340000; + aPoles.ChangeValue(7, 2) = + gp_Pnt(+130.12738123407763000000, -0.00000000000000516390, -70.57040146390383500000); + aWeights.ChangeValue(7, 3) = +1.02991676091110000000; + aPoles.ChangeValue(7, 3) = + gp_Pnt(+127.02840986317391000000, +0.00000000000000554535, -72.22789464235242500000); + aWeights.ChangeValue(7, 4) = +1.02993613450137910000; + aPoles.ChangeValue(7, 4) = + gp_Pnt(+123.90694758506712000000, -0.00000000000000702621, -73.84302715009133100000); + aWeights.ChangeValue(7, 5) = +1.02995970896171030000; + aPoles.ChangeValue(7, 5) = + gp_Pnt(+120.76360256847768000000, -0.00000000000000047370, -75.41549467632542300000); + aWeights.ChangeValue(7, 6) = +1.02998196300924330000; + aPoles.ChangeValue(7, 6) = + gp_Pnt(+117.59908279457284000000, +0.00000000000000772901, -76.94495426059752700000); + aWeights.ChangeValue(7, 7) = +1.02999781361776170000; + aPoles.ChangeValue(7, 7) = + gp_Pnt(+114.41407453952652000000, -0.00000000000000327310, -78.43108601253017300000); + aWeights.ChangeValue(7, 8) = +1.03001626830282000000; + aPoles.ChangeValue(7, 8) = + gp_Pnt(+111.20931631680004000000, +0.00000000000000421483, -79.87356087705671800000); + aWeights.ChangeValue(7, 9) = +1.03004822145821140000; + aPoles.ChangeValue(7, 9) = + gp_Pnt(+104.76172782897289000000, +0.00000000000000259283, -82.67059011797552200000); + aWeights.ChangeValue(7, 10) = +1.03006364818919470000; + aPoles.ChangeValue(7, 10) = + gp_Pnt(+101.51889932580750000000, +0.00000000000000793496, -84.02514647707548100000); + aWeights.ChangeValue(7, 11) = +1.03007725635610380000; + aPoles.ChangeValue(7, 11) = + gp_Pnt(+98.25768758130365700000, +0.00000000000000127608, -85.33546669488836800000); + aWeights.ChangeValue(7, 12) = +1.03009045031501540000; + aPoles.ChangeValue(7, 12) = + gp_Pnt(+94.97880175952953200000, +0.00000000000000289709, -86.60126064632369500000); + aWeights.ChangeValue(7, 13) = +1.03010285398165520000; + aPoles.ChangeValue(7, 13) = + gp_Pnt(+91.68295682468645700000, +0.00000000000000548904, -87.82224920548925700000); + aWeights.ChangeValue(7, 14) = +1.03011393120368040000; + aPoles.ChangeValue(7, 14) = + gp_Pnt(+88.37086140882031800000, -0.00000000000000004450, -88.99816853898946100000); + aWeights.ChangeValue(7, 15) = +1.03012484065781210000; + aPoles.ChangeValue(7, 15) = + gp_Pnt(+85.04324466385365600000, +0.00000000000000407116, -90.12875955698966400000); + aWeights.ChangeValue(7, 16) = +1.03015471267321310000; + aPoles.ChangeValue(7, 16) = + gp_Pnt(+75.01621211174902700000, +0.00000000000001208092, -93.38380423550353300000); + aWeights.ChangeValue(7, 17) = +1.03017194800922480000; + aPoles.ChangeValue(7, 17) = + gp_Pnt(+68.27251352067813200000, +0.00000000000001147779, -95.37146758037383200000); + aWeights.ChangeValue(7, 18) = +1.03018680682765580000; + aPoles.ChangeValue(7, 18) = + gp_Pnt(+61.47507566136914600000, +0.00000000000000851456, -97.17487791831784700000); + aWeights.ChangeValue(7, 19) = +1.03019958109549560000; + aPoles.ChangeValue(7, 19) = + gp_Pnt(+54.62953031922813800000, +0.00000000000000645560, -98.79238303220959900000); + aWeights.ChangeValue(7, 20) = +1.03021050389503310000; + aPoles.ChangeValue(7, 20) = + gp_Pnt(+47.74179355100338300000, +0.00000000000000683493, -100.22257163394704000000); + aWeights.ChangeValue(7, 21) = +1.03021974942385920000; + aPoles.ChangeValue(7, 21) = + gp_Pnt(+40.81806392732334400000, +0.00000000000000945638, -101.46427420633951000000); + aWeights.ChangeValue(7, 22) = +1.03022743299486530000; + aPoles.ChangeValue(7, 22) = + gp_Pnt(+33.86482072309787100000, +0.00000000000001239365, -102.51656369616552000000); + aWeights.ChangeValue(7, 23) = +1.03023979631718960000; + aPoles.ChangeValue(7, 23) = + gp_Pnt(+19.91267581058432200000, +0.00000000000001269021, -104.24092170462040000000); + aWeights.ChangeValue(7, 24) = +1.03024450452679180000; + aPoles.ChangeValue(7, 24) = + gp_Pnt(+12.91322103073442500000, +0.00000000000001310657, -104.91296575233191000000); + aWeights.ChangeValue(7, 25) = +1.03024781840890150000; + aPoles.ChangeValue(7, 25) = + gp_Pnt(+5.89663552968925500000, +0.00000000000001362222, -105.39416639705574000000); + aWeights.ChangeValue(7, 26) = +1.03024979501191980000; + aPoles.ChangeValue(7, 26) = + gp_Pnt(-1.13093554742009240000, +0.00000000000001442955, -105.68402704533355000000); + aWeights.ChangeValue(7, 27) = +1.03025046568879810000; + aPoles.ChangeValue(7, 27) = + gp_Pnt(-8.16338049757019310000, +0.00000000000001553070, -105.78227646648484000000); + aWeights.ChangeValue(7, 28) = +1.03024983609703620000; + aPoles.ChangeValue(7, 28) = + gp_Pnt(-15.19462185431612500000, +0.00000000000001673746, -105.68886888131540000000); + aWeights.ChangeValue(7, 29) = +1.03024788619868390000; + aPoles.ChangeValue(7, 29) = + gp_Pnt(-22.21861718693262200000, +0.00000000000001767135, -105.40398398356824000000); + aWeights.ChangeValue(7, 30) = +1.03024126030624560000; + aPoles.ChangeValue(7, 30) = + gp_Pnt(-36.24014829916134100000, +0.00000000000002019891, -104.45206611492652000000); + aWeights.ChangeValue(7, 31) = +1.03023657011944200000; + aPoles.ChangeValue(7, 31) = + gp_Pnt(-43.23771519136024500000, +0.00000000000002161068, -103.78502949380328000000); + aWeights.ChangeValue(7, 32) = +1.03023047292900840000; + aPoles.ChangeValue(7, 32) = + gp_Pnt(-50.21605719916001900000, +0.00000000000002249329, -102.92731708926736000000); + aWeights.ChangeValue(7, 33) = +1.03022290017099440000; + aPoles.ChangeValue(7, 33) = + gp_Pnt(-57.16920057960702200000, +0.00000000000002320995, -101.87955571848956000000); + aWeights.ChangeValue(7, 34) = +1.03021374148842140000; + aPoles.ChangeValue(7, 34) = + gp_Pnt(-64.09120253994868200000, +0.00000000000002399266, -100.64259867222304000000); + aWeights.ChangeValue(7, 35) = +1.03020284473128120000; + aPoles.ChangeValue(7, 35) = + gp_Pnt(-70.97615252947152000000, +0.00000000000002494226, -99.21752532044712300000); + aWeights.ChangeValue(7, 36) = +1.03019001595653670000; + aPoles.ChangeValue(7, 36) = + gp_Pnt(-77.81817349811507300000, +0.00000000000002602838, -97.60564061068184600000); + aWeights.ChangeValue(7, 37) = +1.03016805964614980000; + aPoles.ChangeValue(7, 37) = + gp_Pnt(-87.76549855749630100000, +0.00000000000002703745, -94.97405836608523100000); + aWeights.ChangeValue(7, 38) = +1.03016062145972500000; + aPoles.ChangeValue(7, 38) = + gp_Pnt(-90.90906843451735100000, +0.00000000000002735353, -94.09969925934423400000); + aWeights.ChangeValue(7, 39) = +1.03015268516758060000; + aPoles.ChangeValue(7, 39) = + gp_Pnt(-94.04154842308000200000, +0.00000000000002795160, -93.18554984223239000000); + aWeights.ChangeValue(7, 40) = +1.03014422393874510000; + aPoles.ChangeValue(7, 40) = + gp_Pnt(-97.16235536263198500000, +0.00000000000002873660, -92.23177350871787900000); + aWeights.ChangeValue(7, 41) = +1.03013520381253840000; + aPoles.ChangeValue(7, 41) = + gp_Pnt(-100.27090735629974000000, +0.00000000000002960449, -91.23854430518403500000); + aWeights.ChangeValue(7, 42) = +1.03012558369857450000; + aPoles.ChangeValue(7, 42) = + gp_Pnt(-103.36662387191370000000, +0.00000000000003044224, -90.20604688574815100000); + aWeights.ChangeValue(7, 43) = +1.03011531537676040000; + aPoles.ChangeValue(7, 43) = + gp_Pnt(-106.44892584135401000000, +0.00000000000003112785, -89.13447646370049400000); + aWeights.ChangeValue(7, 44) = +1.03009266486582220000; + aPoles.ChangeValue(7, 44) = + gp_Pnt(-112.82164316087234000000, +0.00000000000002877514, -86.82815610446842000000); + aWeights.ChangeValue(7, 45) = +1.03007954250937140000; + aPoles.ChangeValue(7, 45) = + gp_Pnt(-116.10982863064515000000, +0.00000000000005217709, -85.58719260568324200000); + aWeights.ChangeValue(7, 46) = +1.03006700046765860000; + aPoles.ChangeValue(7, 46) = + gp_Pnt(-119.38108228759732000000, -0.00000000000000364635, -84.30140001571530200000); + aWeights.ChangeValue(7, 47) = +1.03005153385603830000; + aPoles.ChangeValue(7, 47) = + gp_Pnt(-122.63466837574235000000, +0.00000000000007773224, -82.97105629274108200000); + aWeights.ChangeValue(7, 48) = +1.03003663316235050000; + aPoles.ChangeValue(7, 48) = + gp_Pnt(-125.86988610286646000000, +0.00000000000000501775, -81.59643931580511400000); + aWeights.ChangeValue(7, 49) = +1.03002002524069390000; + aPoles.ChangeValue(7, 49) = + gp_Pnt(-129.08600965998806000000, +0.00000000000004872530, -80.17785297868806500000); + aWeights.ChangeValue(7, 50) = +1.03000192732158440000; + aPoles.ChangeValue(7, 50) = + gp_Pnt(-132.28232849510800000000, +0.00000000000003627431, -78.71561001568775900000); + aWeights.ChangeValue(7, 51) = +1.02996526567106140000; + aPoles.ChangeValue(7, 51) = + gp_Pnt(-138.40719443250111000000, +0.00000000000004030865, -75.81195871455292900000); + aWeights.ChangeValue(7, 52) = +1.02994403451619650000; + aPoles.ChangeValue(7, 52) = + gp_Pnt(-141.33856968181306000000, +0.00000000000003444592, -74.37651555974527200000); + aWeights.ChangeValue(7, 53) = +1.02992866105480000000; + aPoles.ChangeValue(7, 53) = + gp_Pnt(-144.25171811139330000000, +0.00000000000003429445, -72.90395453557894700000); + aWeights.ChangeValue(7, 54) = +1.02989968743351530000; + aPoles.ChangeValue(7, 54) = + gp_Pnt(-147.14603336223070000000, +0.00000000000004355038, -71.39457006641885100000); + aWeights.ChangeValue(7, 55) = +1.02988222474475720000; + aPoles.ChangeValue(7, 55) = + gp_Pnt(-150.02095857157173000000, +0.00000000000003217269, -69.84863841933133700000); + aWeights.ChangeValue(7, 56) = +1.02985386954430420000; + aPoles.ChangeValue(7, 56) = + gp_Pnt(-152.87595706513403000000, +0.00000000000003648661, -68.26644064265008200000); + aWeights.ChangeValue(7, 57) = +1.02982704006085530000; + aPoles.ChangeValue(7, 57) = + gp_Pnt(-155.71041601974636000000, +0.00000000000003591181, -66.64830754728993200000); + aWeights.ChangeValue(7, 58) = +1.02976639514271140000; + aPoles.ChangeValue(7, 58) = + gp_Pnt(-161.55369960091491000000, +0.00000000000003646415, -63.21332070345936700000); + aWeights.ChangeValue(7, 59) = +1.02972545417744080000; + aPoles.ChangeValue(7, 59) = + gp_Pnt(-164.55974256681068000000, +0.00000000000003294676, -61.39167299907511900000); + aWeights.ChangeValue(7, 60) = +1.02970377642180270000; + aPoles.ChangeValue(7, 60) = + gp_Pnt(-167.53873683551103000000, +0.00000000000002190344, -59.52621075357659900000); + aWeights.ChangeValue(7, 61) = +1.02963665582099750000; + aPoles.ChangeValue(7, 61) = + gp_Pnt(-170.49570646978711000000, +0.00000000000009010479, -57.62531748377598000000); + aWeights.ChangeValue(7, 62) = +1.02961756328110620000; + aPoles.ChangeValue(7, 62) = + gp_Pnt(-173.42176702363508000000, -0.00000000000003499440, -55.67944052993496500000); + aWeights.ChangeValue(7, 63) = +1.02954937293567860000; + aPoles.ChangeValue(7, 63) = + gp_Pnt(-176.32284460610933000000, +0.00000000000007636921, -53.69521656711459900000); + aWeights.ChangeValue(7, 64) = +1.02950097342681770000; + aPoles.ChangeValue(7, 64) = + gp_Pnt(-179.19569709355173000000, +0.00000000000003273955, -51.67161593723249500000); + aWeights.ChangeValue(7, 65) = +1.02943612532291810000; + aPoles.ChangeValue(7, 65) = + gp_Pnt(-182.04053139917158000000, +0.00000000000003996803, -49.60917258111981500000); + aWeights.ChangeValue(7, 66) = +1.02937840445762090000; + aPoles.ChangeValue(7, 66) = + gp_Pnt(-184.68250151172640000000, +0.00000000000004112926, -47.69381589112448700000); + aWeights.ChangeValue(7, 67) = +1.02929786839945800000; + aPoles.ChangeValue(7, 67) = + gp_Pnt(-187.30004443981446000000, +0.00000000000003629801, -45.74517623046489900000); + aWeights.ChangeValue(7, 68) = +1.02927785532615720000; + aPoles.ChangeValue(7, 68) = + gp_Pnt(-189.89358418563035000000, +0.00000000000003708012, -43.76295173174737800000); + aWeights.ChangeValue(7, 69) = +1.02909457173661250000; + aPoles.ChangeValue(7, 69) = + gp_Pnt(-192.46070903458983000000, +0.00000000000005500515, -41.74904085552218200000); + aWeights.ChangeValue(7, 70) = +1.02915656102268340000; + aPoles.ChangeValue(7, 70) = + gp_Pnt(-195.00353322314638000000, +0.00000000000002645256, -39.70148425813464900000); + aWeights.ChangeValue(7, 71) = +1.02891246604057510000; + aPoles.ChangeValue(7, 71) = + gp_Pnt(-197.51895024482548000000, +0.00000000000005006422, -37.62251287581096900000); + aWeights.ChangeValue(7, 72) = +1.02884001996279940000; + aPoles.ChangeValue(7, 72) = + gp_Pnt(-200.00717902020989000000, +0.00000000000003866246, -35.51147139839754600000); + aWeights.ChangeValue(7, 73) = +1.02870418206103280000; + aPoles.ChangeValue(7, 73) = + gp_Pnt(-202.46745722827831000000, +0.00000000000003996803, -33.36845405838467800000); + aWeights.ChangeValue(7, 74) = +1.02860417892808040000; + aPoles.ChangeValue(7, 74) = + gp_Pnt(-204.92874075079348000000, +0.00000000000003952569, -31.22492832365916000000); + aWeights.ChangeValue(7, 75) = +1.02826579045574770000; + aPoles.ChangeValue(7, 75) = + gp_Pnt(-207.35951843182116000000, +0.00000000000002864861, -29.04902036970887700000); + aWeights.ChangeValue(7, 76) = +1.02871793966685040000; + aPoles.ChangeValue(7, 76) = + gp_Pnt(-209.76815931164757000000, +0.00000000000007786791, -26.84449461829588300000); + aWeights.ChangeValue(7, 77) = +1.02728787827248790000; + aPoles.ChangeValue(7, 77) = + gp_Pnt(-212.13952611955784000000, -0.00000000000002645359, -24.59453985262025100000); + aWeights.ChangeValue(7, 78) = +1.02767535385751650000; + aPoles.ChangeValue(7, 78) = + gp_Pnt(-214.48523983715771000000, +0.00000000000011316462, -22.34028621398329100000); + aWeights.ChangeValue(7, 79) = +1.02745809923196680000; + aPoles.ChangeValue(7, 79) = + gp_Pnt(-216.79261871005519000000, -0.00000000000002978790, -20.02558452892611700000); + aWeights.ChangeValue(7, 80) = +1.02725110106353260000; + aPoles.ChangeValue(7, 80) = + gp_Pnt(-219.08116944862113000000, +0.00000000000005732296, -17.69632354506026700000); + aWeights.ChangeValue(7, 81) = +1.02619749797986360000; + aPoles.ChangeValue(7, 81) = + gp_Pnt(-221.32510969435936000000, +0.00000000000004618528, -15.33078661161192400000); + } + //// + + const occ::handle aS1 = + new Geom_BSplineSurface(aPoles, aWeights, aUKnots, aVKnots, aUMult, aVMult, aUDegree, aVDegree); + + GeomAPI_IntSS anIntersection(aS1, aS2, Precision::Confusion()); + ASSERT_TRUE(anIntersection.IsDone()) << "Intersection failed"; + ASSERT_GE(anIntersection.NbLines(), 1) << "No intersection curves found"; + + // Verify the first curve has a non-degenerate parameter range + const occ::handle& aCurve = anIntersection.Line(1); + ASSERT_FALSE(aCurve.IsNull()) << "First intersection curve is null"; + + const double aU1 = aCurve->FirstParameter(); + const double aU2 = aCurve->LastParameter(); + const double aSpan = aU2 - aU1; + EXPECT_GT(aSpan, 1.0e-20) << "Curve range is degenerate: U2 - U1 = " << aSpan; +} diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GTests/GeomFill_BSplineCurves_Test.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GTests/GeomFill_BSplineCurves_Test.cxx new file mode 100644 index 0000000000..365c14cc23 --- /dev/null +++ b/src/ModelingAlgorithms/TKGeomAlgo/GTests/GeomFill_BSplineCurves_Test.cxx @@ -0,0 +1,173 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +// OCC28131: BRepOffset_MakeOffset can't create offset with a face made by filling 3 BSpline curves. + +namespace +{ + +//! Builds the filled face from 3 boundary BSpline/Bezier curves (common setup for all OCC28131 +//! tests). +TopoDS_Shape createOCC28131Face() +{ + const double aHeight = 8.5; + const gp_Pnt aV0(-17.6, 0.0, 0.0); + const gp_Pnt aV1(0, 32.8, 0.0); + + // Outline Bezier curve + NCollection_Array1 aBezierPoles(1, 4); + aBezierPoles(1) = aV0; + aBezierPoles(4) = aV1; + aBezierPoles(2) = gp_Pnt(aV0.X(), (5.4 / 13.2) * aV1.Y(), 0); + aBezierPoles(3) = gp_Pnt((6.0 / 6.8) * aV0.X(), aV1.Y(), 0); + + occ::handle aBezier = new Geom_BezierCurve(aBezierPoles); + occ::handle anOutlineCurve = GeomConvert::CurveToBSplineCurve(aBezier); + + // First side curve from 2D interpolation projected on YZ plane + occ::handle aCurve1; + { + occ::handle> aHArray = new NCollection_HArray1(1, 2); + aHArray->SetValue(1, gp_Pnt2d(-aV1.Y(), 0)); + aHArray->SetValue(2, gp_Pnt2d(0, aHeight + aHeight / 2)); + Geom2dAPI_Interpolate anInterp(aHArray, false, 1e-6); + anInterp.Load(gp_Vec2d(0, 1), gp_Vec2d(1, 0)); + anInterp.Perform(); + const gp_Pln aPln{gp_Ax3(gp_Pnt(), gp_Dir(gp_Dir::D::X), gp_Dir(gp_Dir::D::NY))}; + aCurve1 = occ::down_cast(GeomAPI::To3d(anInterp.Curve(), aPln)); + } + + // Second side curve from 2D interpolation projected on XZ plane + occ::handle aCurve2; + { + occ::handle> aHArray = new NCollection_HArray1(1, 3); + aHArray->SetValue(1, gp_Pnt2d(-aV0.X(), 0)); + aHArray->SetValue(2, gp_Pnt2d(-aV0.X() - 2.6, aHeight)); + aHArray->SetValue(3, gp_Pnt2d(0, aHeight + aHeight / 2)); + Geom2dAPI_Interpolate anInterp(aHArray, false, 1e-6); + anInterp.Perform(); + const gp_Pln aPln{gp_Ax3(gp_Pnt(), gp_Dir(gp_Dir::D::NY), gp_Dir(gp_Dir::D::NX))}; + aCurve2 = occ::down_cast(GeomAPI::To3d(anInterp.Curve(), aPln)); + } + + GeomFill_BSplineCurves aFill; + aFill.Init(anOutlineCurve, aCurve1, aCurve2, GeomFill_CoonsStyle); + + BRepBuilderAPI_MakeFace aFaceBuilder(aFill.Surface(), 0); + return aFaceBuilder.IsDone() ? aFaceBuilder.Shape() : TopoDS_Shape(); +} + +//! Returns the maximum BRep tolerance across all vertices, edges, and faces of theShape. +double maxTolerance(const TopoDS_Shape& theShape) +{ + double aMaxTol = 0.0; + for (TopExp_Explorer anExp(theShape, TopAbs_VERTEX); anExp.More(); anExp.Next()) + aMaxTol = std::max(aMaxTol, BRep_Tool::Tolerance(TopoDS::Vertex(anExp.Current()))); + for (TopExp_Explorer anExp(theShape, TopAbs_EDGE); anExp.More(); anExp.Next()) + aMaxTol = std::max(aMaxTol, BRep_Tool::Tolerance(TopoDS::Edge(anExp.Current()))); + for (TopExp_Explorer anExp(theShape, TopAbs_FACE); anExp.More(); anExp.Next()) + aMaxTol = std::max(aMaxTol, BRep_Tool::Tolerance(TopoDS::Face(anExp.Current()))); + return aMaxTol; +} + +//! Returns the surface area of theShape. +double surfaceArea(const TopoDS_Shape& theShape) +{ + GProp_GProps aProps; + BRepGProp::SurfaceProperties(theShape, aProps); + return aProps.Mass(); +} + +} // namespace + +TEST(GeomFill_BSplineCurvesTest, OCC28131_FillSurfaceFromBezierAndInterpolatedCurves) +{ + const TopoDS_Shape aFace = createOCC28131Face(); + ASSERT_FALSE(aFace.IsNull()); + EXPECT_TRUE(BRepCheck_Analyzer(aFace).IsValid()); +} + +TEST(GeomFill_BSplineCurvesTest, OCC28131_SimpleOffsetOfFilledFace) +{ + const TopoDS_Shape aFace = createOCC28131Face(); + ASSERT_FALSE(aFace.IsNull()); + + BRepOffsetAPI_MakeOffsetShape aMaker; + aMaker.PerformBySimple(aFace, 10.0); + ASSERT_TRUE(aMaker.IsDone()); + + const TopoDS_Shape aResult = aMaker.Shape(); + ASSERT_FALSE(aResult.IsNull()); + + EXPECT_TRUE(BRepCheck_Analyzer(aResult).IsValid()); + // checkmaxtol -ref 0.205 (1% relative tolerance) + EXPECT_NEAR(maxTolerance(aResult), 0.205, 0.205 * 0.01); + // checkprops -s 1693.7 (1% relative tolerance) + EXPECT_NEAR(surfaceArea(aResult), 1693.7, 1693.7 * 0.01); +} + +TEST(GeomFill_BSplineCurvesTest, OCC28131_StandardOffsetOfFilledFace) +{ + const TopoDS_Shape aFace = createOCC28131Face(); + ASSERT_FALSE(aFace.IsNull()); + + BRepOffset_MakeOffset aMaker; + aMaker + .Initialize(aFace, 10.0, Precision::Confusion(), BRepOffset_Skin, false, false, GeomAbs_Arc); + aMaker.MakeOffsetShape(); + ASSERT_FALSE(aMaker.Shape().IsNull()); + + // The Draw test runs fixshape before checking - apply ShapeFix_Shape likewise + occ::handle aFixer = new ShapeFix_Shape(aMaker.Shape()); + aFixer->Perform(); + const TopoDS_Shape aResult = aFixer->Shape(); + ASSERT_FALSE(aResult.IsNull()); + + EXPECT_TRUE(BRepCheck_Analyzer(aResult).IsValid()); + // checkmaxtol -ref 0.408 + EXPECT_NEAR(maxTolerance(aResult), 0.408, 0.408 * 0.01); + // checkprops -s 1693.76 + EXPECT_NEAR(surfaceArea(aResult), 1693.76, 1693.76 * 0.01); +} diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GTests/GeomFill_NSections_Test.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GTests/GeomFill_NSections_Test.cxx new file mode 100644 index 0000000000..e62098d279 --- /dev/null +++ b/src/ModelingAlgorithms/TKGeomAlgo/GTests/GeomFill_NSections_Test.cxx @@ -0,0 +1,59 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include + +#include + +namespace +{ + +//! Builds a simple degree-1 BSpline line segment from (0,0,0) to (1,0,0). +static Handle(Geom_BSplineCurve) makeSimpleLinearCurve() +{ + NCollection_Array1 aPoles(1, 2); + aPoles(1) = gp_Pnt(0.0, 0.0, 0.0); + aPoles(2) = gp_Pnt(1.0, 0.0, 0.0); + + NCollection_Array1 aKnots(1, 2); + aKnots(1) = 0.0; + aKnots(2) = 1.0; + + NCollection_Array1 aMults(1, 2); + aMults(1) = 2; + aMults(2) = 2; + + return new Geom_BSplineCurve(aPoles, aKnots, aMults, 1); +} + +} // namespace + +// Tests that GeomFill_NSections with a single-curve sequence does not throw. +// The resulting BSplineSurface may be null for a degenerate single-section case, +// but no exception should be raised (OCC27875). +TEST(GeomFill_NSectionsTest, OCC27875_SingleCurveDoesNotThrow) +{ + Handle(Geom_BSplineCurve) aCurve = makeSimpleLinearCurve(); + ASSERT_FALSE(aCurve.IsNull()); + + NCollection_Sequence aNC(new NCollection_IncAllocator()); + aNC.Append(Handle(Geom_Curve)(aCurve)); + + // Must not throw even though result may be degenerate + EXPECT_NO_THROW({ GeomFill_NSections aNS(aNC); }); +} diff --git a/src/ModelingAlgorithms/TKMesh/GTests/BRepMesh_CircleTool_Test.cxx b/src/ModelingAlgorithms/TKMesh/GTests/BRepMesh_CircleTool_Test.cxx new file mode 100644 index 0000000000..1a1dc129d1 --- /dev/null +++ b/src/ModelingAlgorithms/TKMesh/GTests/BRepMesh_CircleTool_Test.cxx @@ -0,0 +1,78 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +#include +#include +#include + +namespace +{ +// Returns true if thePoint lies on the circle defined by theCenter and theRadius. +bool isOnCircle(const gp_XY& thePoint, const gp_XY& theCenter, const double theRadius) +{ + static const double aSqPrec = Precision::PConfusion() * Precision::PConfusion(); + const gp_XY aDiff = thePoint - theCenter; + return aDiff.SquareModulus() - theRadius * theRadius < aSqPrec; +} +} // namespace + +// OCC24923: BRepMesh_CircleTool produces bad circles +// For a large set of random non-degenerate triangles, every circumscribed circle +// computed by BRepMesh_CircleTool::MakeCircle must pass through all three input points. +TEST(BRepMesh_CircleTool_Test, OCC24923_CircumCirclePassesThroughAllVertices) +{ + srand(42); + + static const double aSqPrec = Precision::PConfusion() * Precision::PConfusion(); + const double aMinArea = 5.0 * M_PI / 180.0; // same threshold as the original command + const int aNbTests = 100000; + + int aNbFailed = 0; + int i = 0; + while (i < aNbTests) + { + gp_XY p[3]; + for (int j = 0; j < 3; ++j) + p[j].SetCoord(static_cast(rand()) / RAND_MAX, static_cast(rand()) / RAND_MAX); + + // Skip degenerate (nearly collinear) triangles - retry like the original. + const gp_XY aV1 = p[1] - p[0]; + const gp_XY aV2 = p[2] - p[0]; + if (aV1.SquareModulus() <= aSqPrec || aV2.SquareModulus() <= aSqPrec || (aV1 ^ aV2) <= aMinArea) + continue; + + ++i; + + gp_XY aCenter; + double aRadius = 0.0; + if (!BRepMesh_CircleTool::MakeCircle(p[0], p[1], p[2], aCenter, aRadius)) + continue; + + if (!isOnCircle(p[0], aCenter, aRadius) || !isOnCircle(p[1], aCenter, aRadius) + || !isOnCircle(p[2], aCenter, aRadius)) + { + ++aNbFailed; + } + } + + // Allow at most 1% failure rate (same threshold as the original Draw test). + const double aFailRate = static_cast(aNbFailed) / static_cast(aNbTests); + EXPECT_LE(aFailRate, 0.01) << "Too many bad circumscribed circles: " << aNbFailed << " / " + << aNbTests; +} diff --git a/src/ModelingAlgorithms/TKMesh/GTests/BRepMesh_IncrementalMesh_Test.cxx b/src/ModelingAlgorithms/TKMesh/GTests/BRepMesh_IncrementalMesh_Test.cxx new file mode 100644 index 0000000000..210893f72b --- /dev/null +++ b/src/ModelingAlgorithms/TKMesh/GTests/BRepMesh_IncrementalMesh_Test.cxx @@ -0,0 +1,73 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +// Test OCC26407: BRepMesh_Delaun must not fail on a planar polygon with frontier edges. +// The key check is that GetStatusFlags() == 0 (success) after meshing. +// Migrated from QABugs_19.cxx OCC26407 +TEST(BRepMesh_IncrementalMeshTest, OCC26407_PlanarPolygonMeshStatus) +{ + // Hardcoded octagon-like polygon lying in the Z=88.5 plane + std::vector aPnts = { + gp_Pnt(587.90000000000009094947, 40.6758179230516248026106, 88.5), + gp_Pnt(807.824182076948432040808, 260.599999999999965893949, 88.5), + gp_Pnt(644.174182076948454778176, 424.249999999999943156581, 88.5000000000000142108547), + gp_Pnt(629.978025792618950617907, 424.25, 88.5), + gp_Pnt(793.628025792618700506864, 260.599999999999852207111, 88.5), + gp_Pnt(587.900000000000204636308, 54.8719742073813492311274, 88.5), + gp_Pnt(218.521974207381418864315, 424.250000000000056843419, 88.5), + gp_Pnt(204.325817923051886282337, 424.249999999999943156581, 88.5)}; + + std::vector aVertices; + aVertices.reserve(aPnts.size()); + for (const gp_Pnt& aPnt : aPnts) + { + aVertices.push_back(BRepBuilderAPI_MakeVertex(aPnt)); + } + + BRepBuilderAPI_MakeWire aWireBuilder; + for (size_t i = 0; i < aVertices.size(); ++i) + { + const TopoDS_Vertex& aV = aVertices[i]; + const TopoDS_Vertex& aW = aVertices[(i + 1) % aVertices.size()]; + aWireBuilder.Add(BRepBuilderAPI_MakeEdge(aV, aW)); + } + ASSERT_TRUE(aWireBuilder.IsDone()) << "Wire construction failed"; + + const gp_Pnt& aV0 = aPnts[0]; + const gp_Pnt& aV1 = aPnts[1]; + const gp_Pnt& aV2 = aPnts[aPnts.size() - 1]; + const gp_Vec aFaceNormal = gp_Vec(aV0, aV1).Crossed(gp_Vec(aV0, aV2)); + + const TopoDS_Face aFace = BRepBuilderAPI_MakeFace(gp_Pln(aV0, aFaceNormal), aWireBuilder.Wire()); + + BRepMesh_IncrementalMesh aMesher(aFace, 1.e-7); + EXPECT_EQ(aMesher.GetStatusFlags(), 0) + << "Meshing of the planar polygon face should succeed (status 0)"; +} diff --git a/src/ModelingAlgorithms/TKMesh/GTests/FILES.cmake b/src/ModelingAlgorithms/TKMesh/GTests/FILES.cmake index bb6d0cad92..a69290344f 100644 --- a/src/ModelingAlgorithms/TKMesh/GTests/FILES.cmake +++ b/src/ModelingAlgorithms/TKMesh/GTests/FILES.cmake @@ -3,7 +3,9 @@ set(OCCT_TKMesh_GTests_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}") set(OCCT_TKMesh_GTests_FILES BRepMesh_BaseMeshAlgo_Test.cxx + BRepMesh_CircleTool_Test.cxx BRepMesh_Delaun_Test.cxx BRepMesh_DiscretAlgoFactory_Test.cxx BRepMesh_GeomTool_Test.cxx + BRepMesh_IncrementalMesh_Test.cxx ) diff --git a/src/ModelingAlgorithms/TKTopAlgo/GTests/BRepGProp_Test.cxx b/src/ModelingAlgorithms/TKTopAlgo/GTests/BRepGProp_Test.cxx index e332bd04f8..bbe175b7d9 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/GTests/BRepGProp_Test.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/GTests/BRepGProp_Test.cxx @@ -11,13 +11,21 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include +#include #include +#include +#include +#include #include #include +#include +#include #include +#include #include #include #include @@ -115,3 +123,75 @@ TEST(BRepGPropTest, LinearProperties_SkipShared) EXPECT_NEAR(aPropsNotSkipped.Mass(), 240.0, Precision::Confusion()) << "Total edge length with SkipShared=false should be double"; } + +// Test OCC49: GProp_PrincipalProps::HasSymmetryAxis - cylinder has symmetry, cut does not. +// Migrated from QABugs_16.cxx OCC49 +TEST(BRepGPropTest, OCC49_CylinderHasSymmetryAxis) +{ + const TopoDS_Shape aCylinder = BRepPrimAPI_MakeCylinder(10., 20.).Shape(); + + GProp_GProps aProps; + BRepGProp::VolumeProperties(aCylinder, aProps); + const GProp_PrincipalProps aPrincipal = aProps.PrincipalProperties(); + EXPECT_TRUE(aPrincipal.HasSymmetryAxis()); +} + +TEST(BRepGPropTest, OCC49_CutShapeHasNoSymmetryAxis) +{ + const TopoDS_Shape aCylinder = BRepPrimAPI_MakeCylinder(10., 20.).Shape(); + const TopoDS_Shape aBox = BRepPrimAPI_MakeBox(10., 10., 10.).Shape(); + + BRepAlgoAPI_Cut aCut(aCylinder, aBox); + ASSERT_TRUE(aCut.IsDone()); + + GProp_GProps aProps; + BRepGProp::VolumeProperties(aCut.Shape(), aProps); + const GProp_PrincipalProps aPrincipal = aProps.PrincipalProperties(); + EXPECT_FALSE(aPrincipal.HasSymmetryAxis()); +} + +// OCC8797: Verify that GCPnts_AbscissaPoint::Length and BRepGProp::LinearProperties +// produce consistent arc-length values for a degree-3 BSpline curve with 7 poles. +// Both methods must agree within a tight relative tolerance. + +TEST(BRepGPropTest, OCC8797_BSplineLengthConsistencyAbscissaVsLinearProperties) +{ + NCollection_Array1 aPoles(0, 6); + aPoles(0) = gp_Pnt(0.0, 0.0, 0.0); + aPoles(1) = gp_Pnt(1.0, 1.0, 0.0); + aPoles(2) = gp_Pnt(2.0, 1.0, 0.0); + aPoles(3) = gp_Pnt(3.0, 0.0, 0.0); + aPoles(4) = gp_Pnt(4.0, 1.0, 0.0); + aPoles(5) = gp_Pnt(5.0, 1.0, 0.0); + aPoles(6) = gp_Pnt(6.0, 0.0, 0.0); + + NCollection_Array1 aKnots(0, 2); + aKnots(0) = 0.0; + aKnots(1) = 0.5; + aKnots(2) = 1.0; + + NCollection_Array1 aMults(0, 2); + aMults(0) = 4; + aMults(1) = 3; + aMults(2) = 4; + + occ::handle aSpline = new Geom_BSplineCurve(aPoles, aKnots, aMults, 3); + ASSERT_FALSE(aSpline.IsNull()); + EXPECT_EQ(aSpline->NbPoles(), 7); + EXPECT_EQ(aSpline->NbKnots(), 3); + + // Method 1: GCPnts_AbscissaPoint::Length + GeomAdaptor_Curve anAdaptor(aSpline); + const double aLengthAbscissa = GCPnts_AbscissaPoint::Length(anAdaptor); + EXPECT_GT(aLengthAbscissa, 0.0); + + // Method 2: BRepGProp::LinearProperties on the equivalent edge + const TopoDS_Edge aEdge = BRepBuilderAPI_MakeEdge(aSpline); + GProp_GProps aEdgeProps; + BRepGProp::LinearProperties(aEdge, aEdgeProps); + const double aLengthGProp = aEdgeProps.Mass(); + EXPECT_GT(aLengthGProp, 0.0); + + // Both methods must agree within 0.1 % + EXPECT_NEAR(aLengthAbscissa, aLengthGProp, aLengthGProp * 1e-3); +} diff --git a/src/ModelingAlgorithms/TKTopAlgo/GTests/BRepOffsetAPI_ThruSections_Test.cxx b/src/ModelingAlgorithms/TKTopAlgo/GTests/BRepOffsetAPI_ThruSections_Test.cxx index df9c2b8d3c..ef5c3a2164 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/GTests/BRepOffsetAPI_ThruSections_Test.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/GTests/BRepOffsetAPI_ThruSections_Test.cxx @@ -17,9 +17,18 @@ #include #include #include +#include #include #include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -324,3 +333,61 @@ TEST(BRepOffsetAPI_ThruSections_Test, BSplineProfilesWithDifferentPoleCount) EXPECT_FALSE(aThruSections.Shape().IsNull()) << "ThruSections should produce a valid shape"; } } + +// Test OCC895: BRepOffsetAPI_ThruSections with two circular arc wires. +// Regression test for incorrect computation of mutual orientations of wire segments +// that caused a twisted surface to be created. +TEST(BRepOffsetAPI_ThruSections_Test, OCC895_TwoCircularArcWires_NoTwist) +{ + // Build the two wires using circular arcs at different positions, + // reproducing exactly the OCC895 DRAW command with angle=5, reverse=0, order=0. + const double aRad = 1.0; + const double aAngle = 5.0 * M_PI / 180.0; + + // Wire 1: arc from a circle whose axis is rotated 5 degrees around Z + gp_Pnt aCenter1(0, 10, 0); + gp_Ax2 aAxis1(aCenter1, -gp::DY(), gp::DX()); + aAxis1.Rotate(gp_Ax1(aCenter1, gp::DZ()), aAngle); + + gce_MakeCirc aMakeCirc1(aAxis1, aRad); + ASSERT_TRUE(aMakeCirc1.IsDone()); + GC_MakeArcOfCircle aMakeArc1(aMakeCirc1.Value(), 0, M_PI / 2, true); + ASSERT_TRUE(aMakeArc1.IsDone()); + const occ::handle& aArc1 = aMakeArc1.Value(); + + BRepBuilderAPI_MakeEdge aMakeEdge1(aArc1, aArc1->StartPoint(), aArc1->EndPoint()); + ASSERT_TRUE(aMakeEdge1.IsDone()); + BRepBuilderAPI_MakeWire aMakeWire1(aMakeEdge1.Edge()); + ASSERT_TRUE(aMakeWire1.IsDone()); + const TopoDS_Wire& aWire1 = aMakeWire1.Wire(); + + // Wire 2: arc from a circle at a different center with fixed axis + gp_Pnt aCenter2(10, 0, 0); + gp_Ax2 aAxis2(aCenter2, -gp::DX(), gp::DZ()); + + gce_MakeCirc aMakeCirc2(aAxis2, aRad); + ASSERT_TRUE(aMakeCirc2.IsDone()); + GC_MakeArcOfCircle aMakeArc2(aMakeCirc2.Value(), 0, M_PI / 2, true); + ASSERT_TRUE(aMakeArc2.IsDone()); + const occ::handle& aArc2 = aMakeArc2.Value(); + + BRepBuilderAPI_MakeEdge aMakeEdge2(aArc2, aArc2->StartPoint(), aArc2->EndPoint()); + ASSERT_TRUE(aMakeEdge2.IsDone()); + BRepBuilderAPI_MakeWire aMakeWire2(aMakeEdge2.Edge()); + ASSERT_TRUE(aMakeWire2.IsDone()); + const TopoDS_Wire& aWire2 = aMakeWire2.Wire(); + + // Build ThruSections shell with order=0: wire2 first, then wire1 + BRepOffsetAPI_ThruSections aThruSect(false, true); + aThruSect.AddWire(aWire2); + aThruSect.AddWire(aWire1); + aThruSect.Build(); + + ASSERT_TRUE(aThruSect.IsDone()) << "ThruSections must succeed"; + ASSERT_FALSE(aThruSect.Shape().IsNull()) << "ThruSections must produce a non-null shape"; + + // Verify surface area is approximately 18.1614 (reference value from DRAW test) + GProp_GProps aProps; + BRepGProp::SurfaceProperties(aThruSect.Shape(), aProps); + EXPECT_NEAR(aProps.Mass(), 18.1614, 0.01) << "Surface area should be approximately 18.1614"; +} diff --git a/src/ModelingData/TKBRep/GTests/BRepAdaptor_CompCurve_Test.cxx b/src/ModelingData/TKBRep/GTests/BRepAdaptor_CompCurve_Test.cxx index 1d6bebe3b1..262732a9d8 100644 --- a/src/ModelingData/TKBRep/GTests/BRepAdaptor_CompCurve_Test.cxx +++ b/src/ModelingData/TKBRep/GTests/BRepAdaptor_CompCurve_Test.cxx @@ -13,12 +13,24 @@ #include +#include #include #include #include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include +#include #include +#include // Test OCC5696: BRepAdaptor_CompCurve::Edge() method // Migrated from QABugs_5.cxx @@ -57,3 +69,111 @@ TEST(BRepAdaptor_CompCurve_Test, OCC5696_EdgeMethod) // The parameter should be approximately half of the edge length EXPECT_NEAR(1.0, aParEdge, 0.01) << "Edge parameter should be approximately 1.0"; } + +// Test OCC29430: BRepAdaptor_CompCurve::Value() at boundary parameters matches wire vertices. +// The bug was that evaluating a composite curve at its First/LastParameter +// did not return the correct endpoint. +TEST(BRepAdaptor_CompCurve_Test, OCC29430_ArcBoundaryPoints) +{ + const double r45 = M_PI / 4.0, r225 = 3.0 * M_PI / 4.0; + + GC_MakeArcOfCircle arcMaker( + gp_Circ(gp_Ax2(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), 1.0), + r45, + r225, + true); + BRepBuilderAPI_MakeEdge edgeMaker(arcMaker.Value()); + BRepBuilderAPI_MakeWire wireMaker(edgeMaker.Edge()); + const TopoDS_Wire aWire = wireMaker.Wire(); + + BRepAdaptor_CompCurve aCurve(aWire); + const gp_Pnt aStartPt = aCurve.Value(aCurve.FirstParameter()); + const gp_Pnt anEndPt = aCurve.Value(aCurve.LastParameter()); + + // Collect wire vertices + NCollection_List aVertices; + for (TopExp_Explorer anExp(aWire, TopAbs_VERTEX); anExp.More(); anExp.Next()) + { + aVertices.Append(BRep_Tool::Pnt(TopoDS::Vertex(anExp.Current()))); + } + ASSERT_GE(aVertices.Size(), 1); + + // Start point should match one of the wire vertices (within 1e-7 tolerance) + bool aStartMatchesAnyVertex = false; + bool anEndMatchesAnyVertex = false; + for (const gp_Pnt& aV : aVertices) + { + if (aStartPt.Distance(aV) < 1.0e-7) + aStartMatchesAnyVertex = true; + if (anEndPt.Distance(aV) < 1.0e-7) + anEndMatchesAnyVertex = true; + } + EXPECT_TRUE(aStartMatchesAnyVertex) << "Start point does not match any wire vertex"; + EXPECT_TRUE(anEndMatchesAnyVertex) << "End point does not match any wire vertex"; + EXPECT_GT(aStartPt.Distance(anEndPt), 1.0e-7) << "Start and end points should be different"; +} + +// Test OCC30869: BRepAdaptor_CompCurve D1 at boundary parameters of a wire with reversed edge. +// The bug was that a wire with a single reversed-orientation trimmed-circle edge returned +// incorrect boundary point coordinates and tangent directions. +// Migrated from QABugs_20.cxx OCC30869 +TEST(BRepAdaptor_CompCurve_Test, OCC30869_ReversedEdgeBoundaryPoints) +{ + // Build a circle: center(1,0,0), Z-axis(0,-1,0), X-axis(0,0,-1), radius=1 + const gp_Ax2 anAx2(gp_Pnt(1., 0., 0.), gp_Dir(0., -1., 0.), gp_Dir(0., 0., -1.)); + Handle(Geom_Circle) aCircle = new Geom_Circle(anAx2, 1.0); + + const double t1 = M_PI / 2.0; // 1.5707963267949 + const double t2 = 3.0 * M_PI / 2.0; // 4.71238898038469 + + Handle(Geom_TrimmedCurve) aTrimmed = new Geom_TrimmedCurve(aCircle, t1, t2); + TopoDS_Edge anEdge = BRepBuilderAPI_MakeEdge(aTrimmed).Edge(); + + // Reverse the edge, then wrap it in a wire + anEdge.Orientation(TopAbs_REVERSED); + TopoDS_Wire aWire = BRepBuilderAPI_MakeWire(anEdge).Wire(); + + BRepAdaptor_CompCurve aBACC(aWire); + const double aFirst = aBACC.FirstParameter(); + const double aLast = aBACC.LastParameter(); + + gp_Pnt aPFirst, aPLast; + gp_Vec aVFirst, aVLast; + aBACC.D1(aFirst, aPFirst, aVFirst); + aBACC.D1(aLast, aPLast, aVLast); + + if (aVFirst.SquareMagnitude() > gp::Resolution()) + aVFirst.Normalize(); + if (aVLast.SquareMagnitude() > gp::Resolution()) + aVLast.Normalize(); + + // Reference: inverse circle (normal = (0,1,0)), evaluated at the same parameters + const gp_Ax2 anAx2Ref(gp_Pnt(1., 0., 0.), gp_Dir(0., 1., 0.), gp_Dir(0., 0., -1.)); + Handle(Geom_Circle) aCircleRef = new Geom_Circle(anAx2Ref, 1.0); + + gp_Pnt aRefP1, aRefP2; + gp_Vec aRefV1, aRefV2; + aCircleRef->D1(t1, aRefP1, aRefV1); + aCircleRef->D1(t2, aRefP2, aRefV2); + if (aRefV1.SquareMagnitude() > gp::Resolution()) + aRefV1.Normalize(); + if (aRefV2.SquareMagnitude() > gp::Resolution()) + aRefV2.Normalize(); + + const double aTol = 1.e-7; + EXPECT_NEAR(aPFirst.X(), aRefP1.X(), aTol) << "First point X"; + EXPECT_NEAR(aPFirst.Y(), aRefP1.Y(), aTol) << "First point Y"; + EXPECT_NEAR(aPFirst.Z(), aRefP1.Z(), aTol) << "First point Z"; + + EXPECT_NEAR(aVFirst.X(), aRefV1.X(), aTol) << "First tangent X"; + EXPECT_NEAR(aVFirst.Y(), aRefV1.Y(), aTol) << "First tangent Y"; + EXPECT_NEAR(aVFirst.Z(), aRefV1.Z(), aTol) << "First tangent Z"; + + EXPECT_NEAR(aPLast.X(), aRefP2.X(), aTol) << "Last point X"; + EXPECT_NEAR(aPLast.Y(), aRefP2.Y(), aTol) << "Last point Y"; + EXPECT_NEAR(aPLast.Z(), aRefP2.Z(), aTol) << "Last point Z"; + + EXPECT_NEAR(aVLast.X(), aRefV2.X(), aTol) << "Last tangent X"; + EXPECT_NEAR(aVLast.Y(), aRefV2.Y(), aTol) << "Last tangent Y"; + EXPECT_NEAR(aVLast.Z(), aRefV2.Z(), aTol) << "Last tangent Z"; +} diff --git a/src/ModelingData/TKG3d/GTests/Geom_BSplineSurface_Test.cxx b/src/ModelingData/TKG3d/GTests/Geom_BSplineSurface_Test.cxx index 9d96a2d445..b48cc61152 100644 --- a/src/ModelingData/TKG3d/GTests/Geom_BSplineSurface_Test.cxx +++ b/src/ModelingData/TKG3d/GTests/Geom_BSplineSurface_Test.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -932,3 +933,95 @@ TEST_F(Geom_BSplineSurface_Test, WeightsArray_Rational_ReturnsOwning) EXPECT_DOUBLE_EQ(aWeights(1, 1), 1.0); EXPECT_EQ(&aWeights, &aRational->WeightsArray()); } + +// OCC30990: Foundation Classes - unexpected change in numerical results on bsplines after 0029769 +// Verify that evaluating a B-Spline surface at a knot gives consistent results regardless of +// which span was evaluated beforehand (i.e., the cache is updated correctly). +TEST_F(Geom_BSplineSurface_Test, OCC30990_CacheConsistencyAtKnots) +{ + // Build a degree-3 B-Spline surface with 3 interior knots in U (4 spans) and 2 in V (3 spans). + // Poles: 7 x 5 + const int aNbU = 7; + const int aNbV = 5; + NCollection_Array2 aPoles(1, aNbU, 1, aNbV); + for (int i = 1; i <= aNbU; ++i) + for (int j = 1; j <= aNbV; ++j) + aPoles(i, j) = + gp_Pnt(static_cast(i - 1), + static_cast(j - 1), + std::sin(static_cast(i) * 0.5) * std::cos(static_cast(j) * 0.7)); + + // Knot vector in U: [0, 0.25, 0.5, 0.75, 1] with multiplicities [4, 1, 1, 1, 4] + NCollection_Array1 aUKnots(1, 5); + aUKnots(1) = 0.0; + aUKnots(2) = 0.25; + aUKnots(3) = 0.5; + aUKnots(4) = 0.75; + aUKnots(5) = 1.0; + NCollection_Array1 aUMults(1, 5); + aUMults(1) = 4; + aUMults(2) = 1; + aUMults(3) = 1; + aUMults(4) = 1; + aUMults(5) = 4; + + // Knot vector in V: [0, 0.5, 1] with multiplicities [4, 1, 4] + NCollection_Array1 aVKnots(1, 3); + aVKnots(1) = 0.0; + aVKnots(2) = 0.5; + aVKnots(3) = 1.0; + NCollection_Array1 aVMults(1, 3); + aVMults(1) = 4; + aVMults(2) = 1; + aVMults(3) = 4; + + const occ::handle aSurf = + new Geom_BSplineSurface(aPoles, aUKnots, aVKnots, aUMults, aVMults, 3, 3); + ASSERT_FALSE(aSurf.IsNull()); + + GeomAdaptor_Surface aAdaptor(aSurf); + + // For each interior U knot, verify that evaluation at the knot is consistent + // regardless of whether the previous evaluation was in the span before or after. + int aNbErr = 0; + for (int i = 2; i < aSurf->NbUKnots(); ++i) + { + const double aUknot = aSurf->UKnot(i); + const double aUprev = 0.5 * (aUknot + aSurf->UKnot(i - 1)); + const double aUnext = 0.5 * (aUknot + aSurf->UKnot(i + 1)); + + for (int j = 1; j < aSurf->NbVKnots(); ++j) + { + const double aV = 0.5 * (aSurf->VKnot(j) + aSurf->VKnot(j + 1)); + aAdaptor.Value(aUprev, aV); // populate cache from span before + const gp_Pnt aP1 = aAdaptor.Value(aUknot, aV); + aAdaptor.Value(aUnext, aV); // populate cache from span after + const gp_Pnt aP2 = aAdaptor.Value(aUknot, aV); + + if (aP1.X() != aP2.X() || aP1.Y() != aP2.Y() || aP1.Z() != aP2.Z()) + ++aNbErr; + } + } + + // Same check for interior V knots + for (int j = 2; j < aSurf->NbVKnots(); ++j) + { + const double aVknot = aSurf->VKnot(j); + const double aVprev = 0.5 * (aVknot + aSurf->VKnot(j - 1)); + const double aVnext = 0.5 * (aVknot + aSurf->VKnot(j + 1)); + + for (int i = 1; i < aSurf->NbUKnots(); ++i) + { + const double aU = 0.5 * (aSurf->UKnot(i) + aSurf->UKnot(i + 1)); + aAdaptor.Value(aU, aVprev); + const gp_Pnt aP1 = aAdaptor.Value(aU, aVknot); + aAdaptor.Value(aU, aVnext); + const gp_Pnt aP2 = aAdaptor.Value(aU, aVknot); + + if (aP1.X() != aP2.X() || aP1.Y() != aP2.Y() || aP1.Z() != aP2.Z()) + ++aNbErr; + } + } + + EXPECT_EQ(0, aNbErr) << "BSpline surface cache is inconsistent at span knots"; +} diff --git a/src/ModelingData/TKG3d/GTests/Geom_BezierCurve_Test.cxx b/src/ModelingData/TKG3d/GTests/Geom_BezierCurve_Test.cxx index 2498577a63..ccbc704749 100644 --- a/src/ModelingData/TKG3d/GTests/Geom_BezierCurve_Test.cxx +++ b/src/ModelingData/TKG3d/GTests/Geom_BezierCurve_Test.cxx @@ -21,6 +21,7 @@ #include #include #include +#include class Geom_BezierCurve_Test : public ::testing::Test { @@ -524,3 +525,29 @@ TEST_F(Geom_BezierCurve_Test, WeightsArray_Rational_ReturnsOwning) EXPECT_DOUBLE_EQ(aWeights(3), 1.0); EXPECT_EQ(&aWeights, &aRational->WeightsArray()); } + +// Test OCC2569: Geom_BezierCurve degree equals NbPoles - 1. +// Migrated from QABugs_17.cxx OCC2569 +TEST(Geom_BezierCurveTest, OCC2569_DegreeEqualsNbPolesMinusOne) +{ + const int aNbPoles = 26; + NCollection_Array1 aPoles(1, aNbPoles); + for (int i = 1; i <= aNbPoles; ++i) + aPoles.SetValue(i, gp_Pnt(i + 10, i * 2 + 20, i * 3 + 45)); + + Handle(Geom_BezierCurve) aCurve = new Geom_BezierCurve(aPoles); + ASSERT_FALSE(aCurve.IsNull()); + EXPECT_EQ(aCurve->Degree(), aNbPoles - 1); +} + +// Test OCC2569: Geom_BezierCurve throws when NbPoles exceeds maximum allowed. +// Migrated from QABugs_17.cxx OCC2569 (bug2569_2) +TEST(Geom_BezierCurveTest, OCC2569_ThrowsForTooManyPoles) +{ + const int aNbPoles = 29; + NCollection_Array1 aPoles(1, aNbPoles); + for (int i = 1; i <= aNbPoles; ++i) + aPoles.SetValue(i, gp_Pnt(i + 10, i * 2 + 20, i * 3 + 45)); + + EXPECT_THROW(new Geom_BezierCurve(aPoles), Standard_Failure); +} diff --git a/src/ModelingData/TKGeomBase/GTests/FILES.cmake b/src/ModelingData/TKGeomBase/GTests/FILES.cmake index a08b25d772..78565e51af 100644 --- a/src/ModelingData/TKGeomBase/GTests/FILES.cmake +++ b/src/ModelingData/TKGeomBase/GTests/FILES.cmake @@ -35,9 +35,11 @@ set(OCCT_TKGeomBase_GTests_FILES GC_MakeCircle2d_Test.cxx GC_MakeConicalSurface_Test.cxx GC_MakePlane_Test.cxx + GC_MakeParabola2d_Test.cxx GC_MakeSegment2d_Test.cxx GCPnts_AbscissaPoint_Test.cxx GeomConvert_CompCurveToBSplineCurve_Test.cxx + Geom2dConvert_CompCurveToBSplineCurve_Test.cxx GeomConvert_Test.cxx Hermit_Test.cxx IntAna_IntQuadQuad_Test.cxx diff --git a/src/ModelingData/TKGeomBase/GTests/GC_MakeParabola2d_Test.cxx b/src/ModelingData/TKGeomBase/GTests/GC_MakeParabola2d_Test.cxx new file mode 100644 index 0000000000..4bb86c784b --- /dev/null +++ b/src/ModelingData/TKGeomBase/GTests/GC_MakeParabola2d_Test.cxx @@ -0,0 +1,88 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include + +namespace +{ +// Helper: verify a parabola built from directrix+focus against expected values. +void CheckParabola2d(const gp_Ax2d& theAxes, + const gp_Pnt2d& theFocus, + bool theSense, + double theExpectedFocal, + double theExpectedVertX, + double theExpectedVertY, + double theExpectedParam, + const double theExpectedCoeffs[6]) +{ + const double aCompareTol = 1.0e-12; + + GC_MakeParabola2d aPrb(theAxes, theFocus, theSense); + ASSERT_FALSE(aPrb.Value().IsNull()) << "GC_MakeParabola2d should produce a non-null result"; + + const gp_Parab2d& aParab = aPrb.Value()->Parab2d(); + const gp_Pnt2d aVert(aParab.Location()); + + EXPECT_NEAR(aParab.Focal(), theExpectedFocal, aCompareTol) << "Wrong focal length"; + EXPECT_NEAR(aVert.X(), theExpectedVertX, aCompareTol) << "Wrong vertex X"; + EXPECT_NEAR(aVert.Y(), theExpectedVertY, aCompareTol) << "Wrong vertex Y"; + EXPECT_NEAR(aParab.Parameter(), theExpectedParam, aCompareTol) << "Wrong parameter"; + + double aF[6]; + aParab.Coefficients(aF[0], aF[1], aF[2], aF[3], aF[4], aF[5]); + for (int i = 0; i < 6; ++i) + { + EXPECT_NEAR(aF[i], theExpectedCoeffs[i], aCompareTol) + << "Wrong coefficient [" << i << "]: got " << aF[i] << ", expected " << theExpectedCoeffs[i]; + } +} +} // namespace + +// Test OCC26747 (case 1): parabola with vertex at (0.5, 3.0) opening in +X direction. +// Directrix Y-axis at x=0, y=3; focus at (1.0, 3.0); sense=true. +// Equation: (y-3)^2 = 2*(x-0.5), i.e. 1*Y^2 + 2*(-1)*X + 2*(-3)*Y + 10 = 0. +TEST(GC_MakeParabola2d_Test, OCC26747_1_ParabolaOpeningRight) +{ + const gp_Ax2d anAxes(gp_Pnt2d(0.0, 3.0), gp_Dir2d(gp_Dir2d::D::Y)); + const gp_Pnt2d aFocus(1.0, 3.0); + const double aCoeffs[6] = {0.0, 1.0, 0.0, -1.0, -3.0, 10.0}; + CheckParabola2d(anAxes, aFocus, true, 0.5, 0.5, 3.0, 1.0, aCoeffs); +} + +// Test OCC26747 (case 2): parabola with vertex at (-0.5, 3.0) opening in -X direction. +// Directrix Y-axis at origin; focus at (-1.0, 3.0); sense=false. +// Equation (WCS): (y-3)^2 = 2*(-x-0.5), i.e. 1*Y^2 + 2*1*X + 2*(-3)*Y + 10 = 0. +TEST(GC_MakeParabola2d_Test, OCC26747_2_ParabolaOpeningLeft) +{ + const gp_Ax2d anAxes(gp_Pnt2d(0.0, 0.0), gp_Dir2d(gp_Dir2d::D::Y)); + const gp_Pnt2d aFocus(-1.0, 3.0); + const double aCoeffs[6] = {0.0, 1.0, 0.0, 1.0, -3.0, 10.0}; + CheckParabola2d(anAxes, aFocus, false, 0.5, -0.5, 3.0, 1.0, aCoeffs); +} + +// Test OCC26747 (case 3): degenerate parabola where focus coincides with vertex. +// Directrix Y-axis at origin; focus at (0.0, 3.0); sense=false. +// Focal length = 0, parameter = 0. Equation: Y^2 + 2*(-3)*Y + 9 = 0 (line y=3). +TEST(GC_MakeParabola2d_Test, OCC26747_3_DegenerateParabola) +{ + const gp_Ax2d anAxes(gp_Pnt2d(0.0, 0.0), gp_Dir2d(gp_Dir2d::D::Y)); + const gp_Pnt2d aFocus(0.0, 3.0); + const double aCoeffs[6] = {0.0, 1.0, 0.0, 0.0, -3.0, 9.0}; + CheckParabola2d(anAxes, aFocus, false, 0.0, 0.0, 3.0, 0.0, aCoeffs); +} diff --git a/src/ModelingData/TKGeomBase/GTests/Geom2dConvert_CompCurveToBSplineCurve_Test.cxx b/src/ModelingData/TKGeomBase/GTests/Geom2dConvert_CompCurveToBSplineCurve_Test.cxx new file mode 100644 index 0000000000..206866959b --- /dev/null +++ b/src/ModelingData/TKGeomBase/GTests/Geom2dConvert_CompCurveToBSplineCurve_Test.cxx @@ -0,0 +1,58 @@ +// Copyright (c) 2026 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +TEST(Geom2dConvert_CompCurveToBSplineCurveTest, OCC30747_ClosedContourFromCircleArcs) +{ + // OCC30747: 2d Curves concatenator must properly handle closed contours. + // Split a full circle into 10 arcs and assemble them into a closed BSpline. + const occ::handle aCirc = GC_MakeCircle2d(gp_Pnt2d(0, 0), 50); + ASSERT_FALSE(aCirc.IsNull()); + + const double aF = aCirc->FirstParameter(); + const double aL = aCirc->LastParameter(); + const int aNb = 10; + const double aDelta = (aF + aL) / aNb; + + occ::handle aFTrim = new Geom2d_TrimmedCurve(aCirc, aF, aDelta); + Geom2dConvert_CompCurveToBSplineCurve aRes(aFTrim); + + for (int anId = 1; anId < aNb; anId++) + { + occ::handle aLTrim; + if (anId == (aNb - 1)) + { + aLTrim = new Geom2d_TrimmedCurve(aCirc, anId * aDelta, aF); + } + else + { + aLTrim = new Geom2d_TrimmedCurve(aCirc, anId * aDelta, (anId + 1) * aDelta); + } + aRes.Add(aLTrim, Precision::PConfusion()); + } + + const occ::handle aBSpline = aRes.BSplineCurve(); + ASSERT_FALSE(aBSpline.IsNull()); + EXPECT_TRUE(aBSpline->IsClosed()) + << "Assembled BSpline curve from closed circle arcs must be closed"; +} diff --git a/tests/bugs/caf/bug31320 b/tests/bugs/caf/bug31320 deleted file mode 100644 index ecceec5a39..0000000000 --- a/tests/bugs/caf/bug31320 +++ /dev/null @@ -1,13 +0,0 @@ -puts "============" -puts "0031320: TObj - method TObj_Object::GetFatherObject() is not protected against deleted object" -puts "============" -puts "" - -pload TOBJ QAcommands - -# create document with object and sub-object -TObjNew TD1 -TObjAddObj TD1 obj -TObjAddChild TD1 obj subobj1 - -OCC31320 TD1 obj diff --git a/tests/bugs/fclasses/bug15489 b/tests/bugs/fclasses/bug15489 deleted file mode 100755 index 3c8c72d938..0000000000 --- a/tests/bugs/fclasses/bug15489 +++ /dev/null @@ -1,25 +0,0 @@ -puts "===========" -puts "OCC15489" -puts "===========" - -set BugNumber OCC15489 - -###################################################### -# Constructor gp_Lin2d(A, B, C) creates line with origin point in infinity -###################################################### - -pload QAcommands - -set A 1e-20 -set B -1. -set C 2. - -set OriginList [OCC15489 $A $B $C] -regexp {X_0 += +([-0-9.+eE]+)} $OriginList full X_0 -regexp {Y_0 += +([-0-9.+eE]+)} $OriginList full Y_0 - -set good_X_0 -1.9999999999999999e-20 -set good_Y_0 2 - -checkreal "X_0" ${X_0} ${good_X_0} 0 0.001 -checkreal "Y_0" ${Y_0} ${good_Y_0} 0 0.001 diff --git a/tests/bugs/fclasses/bug181_1 b/tests/bugs/fclasses/bug181_1 deleted file mode 100644 index a61bf39365..0000000000 --- a/tests/bugs/fclasses/bug181_1 +++ /dev/null @@ -1,34 +0,0 @@ -puts "========" -puts "OCC181" -puts "OCC701" -puts "========" -###################################################### -# Resource_Manager class doesn't return status of saving resources in a file. -###################################################### -# Add method BuildPath to OSD_Directory -###################################################### - -# Clear tmp-data -###################################################################### -set tmp ${imagedir} -###################################################################### - -pload QAcommands - -set log [OCC181 OCC181 ${imagedir} ${tmp}/1 0] - -set list [split ${log}] -set ll [llength ${list}] -set status [lindex ${list} [expr ${ll} - 2] ] - -if { ${status} == "TRUE"} then { - puts "OCC181: OK" -} else { - puts "OCC181: Error" -} - -if { ! [file exists ${tmp}/1/OCC181] } { - puts "Error: user resource file is not found!" -} - -file delete -force ${tmp}/1 diff --git a/tests/bugs/fclasses/bug181_2 b/tests/bugs/fclasses/bug181_2 deleted file mode 100644 index 0ec8515704..0000000000 --- a/tests/bugs/fclasses/bug181_2 +++ /dev/null @@ -1,34 +0,0 @@ -puts "========" -puts "OCC181" -puts "OCC701" -puts "========" -###################################################### -# Resource_Manager class doesn't return status of saving resources in a file. -###################################################### -# Add method BuildPath to OSD_Directory -###################################################### - -# Clear tmp-data -###################################################################### -set tmp ${imagedir} -###################################################################### - -pload QAcommands - -set log [OCC181 OCC181 ${imagedir} ${tmp}/2/2/3 0] - -set list [split ${log}] -set ll [llength ${list}] -set status [lindex ${list} [expr ${ll} - 2] ] - -if { ${status} == "TRUE"} then { - puts "OCC181: OK" -} else { - puts "OCC181: Error" -} - -if { ! [file exists ${tmp}/2/2/3/OCC181] } { - puts "Error: user resource file is not found!" -} - -file delete -force ${tmp}/2 diff --git a/tests/bugs/fclasses/bug22611 b/tests/bugs/fclasses/bug22611 deleted file mode 100755 index 039e911f61..0000000000 --- a/tests/bugs/fclasses/bug22611 +++ /dev/null @@ -1,19 +0,0 @@ -puts "========" -puts "OCC22611" -puts "========" -puts "" -####################################################################### -# Memory leak in expression interpreter -####################################################################### - -pload QAcommands - -set BugNumber OCC22611 -set listmem {} - -for {set i 1} {$i < 10} {incr i} { - OCC22611 "0.1214343" 10 - - lappend listmem [meminfo h] - checktrend $listmem 0 1 "Memory leak detected" -} diff --git a/tests/bugs/fclasses/bug24537 b/tests/bugs/fclasses/bug24537 deleted file mode 100644 index 912a2b3d2f..0000000000 --- a/tests/bugs/fclasses/bug24537 +++ /dev/null @@ -1,15 +0,0 @@ -puts "================" -puts "OCC24537" -puts "================" -puts "" -####################################################################### -# GCC compiler warnings in byte order reversion code. -# The matter of this test is to ensure correctness of work of the methods -# (in the file FSD_FileHeader.hxx) of inversion of numbers between little/big endian. -# Attention! The test is created for working on a little endian platform. -####################################################################### - -pload QAcommands - -# The following command gives an error output if conversion is wrong -OCC24537 diff --git a/tests/bugs/fclasses/bug25329 b/tests/bugs/fclasses/bug25329 deleted file mode 100755 index e1eac0cddb..0000000000 --- a/tests/bugs/fclasses/bug25329 +++ /dev/null @@ -1,11 +0,0 @@ -puts "============" -puts "OCC25329" -puts "============" -puts "" -####################################################################### -# ExprIntrp_GenExp can not parse unary plus -####################################################################### - -pload QAcommands - -OCC22611 "+1" 1 diff --git a/tests/bugs/fclasses/bug25574 b/tests/bugs/fclasses/bug25574 deleted file mode 100644 index 565c3ea4c1..0000000000 --- a/tests/bugs/fclasses/bug25574 +++ /dev/null @@ -1,9 +0,0 @@ -puts "==========" -puts "0025574: gp_YawPitchRoll Euler Angle computation gives wrong results" -puts "==========" - -pload QAcommands - -puts "Checking conversions of Euler angles in gp_Quaternion" -OCC25574 - diff --git a/tests/bugs/fclasses/bug27849 b/tests/bugs/fclasses/bug27849 deleted file mode 100644 index d9cbc1c052..0000000000 --- a/tests/bugs/fclasses/bug27849 +++ /dev/null @@ -1,32 +0,0 @@ -puts "Test loading of resources from different paths" -puts "0027849: ResourceManager path computations fail for the folders containing dots" - -pload QAcommands - - -set paths { - "path" - "path.with.dots" - "path with spaces" - "nested/dirs/path with spaces" -} - -# key word to be saved in resource file and then checked -set keyw ok - -foreach p $paths { - set path [file join $imagedir $p] - - file mkdir $path - - set fd [open $path/TestResource w] - puts $fd "test.resource : $keyw" - close $fd - - - dsetenv CSF_TestResourceDefaults $path - - if { [OCC27849 TestResource test.resource] != "$keyw" } { - puts "Error: cannot read resource file in $path" - } -} diff --git a/tests/bugs/fclasses/bug29064 b/tests/bugs/fclasses/bug29064 deleted file mode 100644 index 84bffd0d18..0000000000 --- a/tests/bugs/fclasses/bug29064 +++ /dev/null @@ -1,12 +0,0 @@ -puts "========" -puts " 0029064: Copying of empty NCollection map takes excessive memory" -puts "========" -puts "" - -pload QAcommands - -OCC29064 map -OCC29064 doublemap -OCC29064 datamap -OCC29064 indexedmap -OCC29064 indexeddatamap diff --git a/tests/bugs/fclasses/bug30536 b/tests/bugs/fclasses/bug30536 deleted file mode 100644 index 6f20c79d10..0000000000 --- a/tests/bugs/fclasses/bug30536 +++ /dev/null @@ -1,25 +0,0 @@ -puts "============" -puts "0030536: Foundation Classes - TCollection_ExtendedString::StartsWith() and EndsWith() have a mistake" -puts "============" - -pload QAcommands - -set ret1 [QAStartsWith hello help] -if { ${ret1} == "Yes" } { - puts "Error" -} - -set ret2 [QAStartsWith hello he] -if { ${ret2} == "No" } { - puts "Error" -} - -set ret3 [QAEndsWith hello ll] -if { ${ret3} == "Yes" } { - puts "Error" -} - -set ret4 [QAEndsWith hello lo] -if { ${ret4} == "No" } { - puts "Error" -} diff --git a/tests/bugs/fclasses/bug30990 b/tests/bugs/fclasses/bug30990 deleted file mode 100644 index 24179ec86b..0000000000 --- a/tests/bugs/fclasses/bug30990 +++ /dev/null @@ -1,12 +0,0 @@ -puts "# ======================================================================" -puts "# 0030990: Foundation Classes - unexpected change in numerical results on bsplines after 0029769" -puts "# ======================================================================" -puts "" - -pload QAcommands - -restore [locate_data_file bug30990.brep] face -mksurface surf face - -puts "Check consistency of evaluation of BSpline surface at knots" -OCC30990 surf diff --git a/tests/bugs/fclasses/bug31697 b/tests/bugs/fclasses/bug31697 deleted file mode 100644 index a5a8462fc9..0000000000 --- a/tests/bugs/fclasses/bug31697 +++ /dev/null @@ -1,25 +0,0 @@ -puts "=======" -puts "OCC31697 - Expr_GeneralExpression::Derivative does not seem to work" -puts "=======" -puts "" - - -pload QAcommands - -set exp Exp(2*Sin(x^2)) -set var x -set list [OCC31697 $exp $var] - -set we_have [lindex $list 10] -puts "we_have = $we_have" - -set must_be "Exp(2*Sin(x^2))*Cos(x^2)*x*4" -puts "must_be = $must_be" - - -if {[string compare $we_have $must_be] == 0} { - puts "OCC31697 OK" -} else { - puts "OCC31697 Faulty" -} - diff --git a/tests/bugs/fclasses/bug7639 b/tests/bugs/fclasses/bug7639 deleted file mode 100755 index 36af027dc5..0000000000 --- a/tests/bugs/fclasses/bug7639 +++ /dev/null @@ -1,27 +0,0 @@ -puts "============" -puts "OCC7639" -puts "============" -puts "" -####################################################################### -# NCollection_Vector works incorrectly with rare data -####################################################################### - -pload QAcommands -set BugNumber OCC7639 - -set List [OCC7639 0 1 2 500 1 2] - -set Length [llength $List] -if { ${Length} != 6} { - puts "Faulty (1) ${BugNumber}" -} else { - if { [regexp "1" $List] != 1 } { - puts "Faulty (2) ${BugNumber}" - } - if { [regexp "2" $List] != 1 } { - puts "Faulty (3) ${BugNumber}" - } - if { [regexp "500" $List] != 1 } { - puts "Faulty (4) ${BugNumber}" - } -} diff --git a/tests/bugs/mesh/bug24923 b/tests/bugs/mesh/bug24923 deleted file mode 100644 index 1514d0b9aa..0000000000 --- a/tests/bugs/mesh/bug24923 +++ /dev/null @@ -1,16 +0,0 @@ -puts "========" -puts "OCC24923" -puts "========" -puts "" -############################################ -# BRepMesh_CircleTool produces bad circles -############################################ - -pload QAcommands - -set bug_info [OCC24923] -set num_failed [string range [lindex $bug_info 12] 0 [expr {[string first "%" [lindex $bug_info 12]] - 1}]] -set max_failed [string range [lindex $bug_info 14] 0 [expr {[string first "%" [lindex $bug_info 14]] - 1}]] -if {$num_failed > $max_failed} { - puts "ERROR: OCC24923 is reproduced. Number of incorrect tests is too large ($num_failed > $max_failed)." -} diff --git a/tests/bugs/mesh/bug26407 b/tests/bugs/mesh/bug26407 deleted file mode 100644 index 6905f7978b..0000000000 --- a/tests/bugs/mesh/bug26407 +++ /dev/null @@ -1,11 +0,0 @@ -puts "========" -puts "OCC26407" -puts "========" -puts "" -########################################################################################## -# BRepMesh_Delaun should not take into account frontier edges on first pass of algorithm -########################################################################################## - -pload QAcommands - -OCC26407 result diff --git a/tests/bugs/modalg_2/bug570 b/tests/bugs/modalg_2/bug570 deleted file mode 100755 index 5c5c9033be..0000000000 --- a/tests/bugs/modalg_2/bug570 +++ /dev/null @@ -1,12 +0,0 @@ -pload QAcommands - -puts "========" -puts "OCC570" -puts "========" -puts "" - -OCC570 result - -checkprops result -s 58500 -checkshape result -checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_4/bug817_1 b/tests/bugs/modalg_4/bug817_1 deleted file mode 100755 index 39bbcbfca7..0000000000 --- a/tests/bugs/modalg_4/bug817_1 +++ /dev/null @@ -1,30 +0,0 @@ -pload QAcommands - -puts "============" -puts "OCC817" -puts "============" -puts "" -############################# -## Bad results of BRepAlgoAPI_Common -############################# - -set InfoList [OCC817 result 10] - -set OriginalVolume 0 -regexp {Info: Original volume = ([-0-9.+eE]+)} $InfoList full OriginalVolume - -set AccumulatedMeshedVolume 0 -regexp {Info: Accumulated meshed volume = ([-0-9.+eE]+)} $InfoList full AccumulatedMeshedVolume - -set percent_max 0.1 -set percent [expr abs(${AccumulatedMeshedVolume} - ${OriginalVolume}) / (${OriginalVolume}) * 100.] - -if {${percent} > ${percent_max}} { - puts "OCC817: Error" -} else { - puts "OCC817: OK" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png -checkprops result -s 6000 -checkshape result diff --git a/tests/bugs/modalg_4/bug817_2 b/tests/bugs/modalg_4/bug817_2 deleted file mode 100755 index 9c360a5c48..0000000000 --- a/tests/bugs/modalg_4/bug817_2 +++ /dev/null @@ -1,29 +0,0 @@ -pload QAcommands - -puts "============" -puts "OCC817" -puts "============" -puts "" -############################# -## Bad results of BRepAlgoAPI_Common -############################# - -set InfoList [OCC817 result 15] - -set OriginalVolume 0 -regexp {Info: Original volume = ([-0-9.+eE]+)} $InfoList full OriginalVolume - -set AccumulatedMeshedVolume 0 -regexp {Info: Accumulated meshed volume = ([-0-9.+eE]+)} $InfoList full AccumulatedMeshedVolume - -set percent_max 0.1 -set percent [expr abs(${AccumulatedMeshedVolume} - ${OriginalVolume}) / (${OriginalVolume}) * 100.] - -if {${percent} > ${percent_max}} { - puts "OCC817: Error" -} else { - puts "OCC817: OK" -} -checkview -display result -2d -path ${imagedir}/${test_image}.png -checkprops result -s 6000 -checkshape result diff --git a/tests/bugs/modalg_4/bug817_3 b/tests/bugs/modalg_4/bug817_3 deleted file mode 100755 index bb452c5120..0000000000 --- a/tests/bugs/modalg_4/bug817_3 +++ /dev/null @@ -1,30 +0,0 @@ -pload QAcommands - -puts "============" -puts "OCC817" -puts "============" -puts "" -############################# -## Bad results of BRepAlgoAPI_Common -############################# - -set InfoList [OCC817 result 30] - - -set OriginalVolume 0 -regexp {Info: Original volume = ([-0-9.+eE]+)} $InfoList full OriginalVolume - -set AccumulatedMeshedVolume 0 -regexp {Info: Accumulated meshed volume = ([-0-9.+eE]+)} $InfoList full AccumulatedMeshedVolume - -set percent_max 0.1 -set percent [expr abs(${AccumulatedMeshedVolume} - ${OriginalVolume}) / (${OriginalVolume}) * 100.] - -if {${percent} > ${percent_max}} { - puts "OCC817: Error" -} else { - puts "OCC817: OK" -} -checkview -display result -2d -path ${imagedir}/${test_image}.png -checkprops result -s 6000 -checkshape result diff --git a/tests/bugs/modalg_4/bug822_1 b/tests/bugs/modalg_4/bug822_1 deleted file mode 100755 index 5252857a58..0000000000 --- a/tests/bugs/modalg_4/bug822_1 +++ /dev/null @@ -1,26 +0,0 @@ -pload QAcommands - -puts "========" -puts "OCC822" -puts "========" -puts "" -##################################### -## BRepMesh_IncrementalMesh fails on some faces -##################################### - -if {[ catch { set info_result [OCC822_1 a1 a2 result] } ] } { - puts "Faulty OCC822" -} else { - if { [regexp {FAILED} $info_result] } { - puts "Faulty OCC822" - } - - set ExplodeList [explode result] - if {[llength ${ExplodeList}] < 1} { - puts "Faulty OCC822" - } -} - -checkprops result -s 133931 -checkshape result -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_4/bug822_2 b/tests/bugs/modalg_4/bug822_2 deleted file mode 100755 index 8a1d0277d5..0000000000 --- a/tests/bugs/modalg_4/bug822_2 +++ /dev/null @@ -1,27 +0,0 @@ -pload QAcommands - -puts "=======" -puts "OCC822" -puts "=======" -puts "" -##################################### -## BRepMesh_IncrementalMesh fails on some faces -##################################### -## (old topology) -##################################### - -if { [ catch { set info_result [OCC822_2 a1 a2 result] } ] } { - puts "Faulty OCC822" -} else { - if { [regexp {FAILED} $info_result] } { - puts "Faulty OCC822" - } - - set ExplodeList [explode result] - if {[llength ${ExplodeList}] < 1} { - puts "Faulty OCC822" - } -} -checkprops result -s 61963.5 -checkshape result -checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_4/bug823 b/tests/bugs/modalg_4/bug823 deleted file mode 100755 index df2e468c71..0000000000 --- a/tests/bugs/modalg_4/bug823 +++ /dev/null @@ -1,25 +0,0 @@ -pload QAcommands - -puts "=======" -puts "OCC823" -puts "=======" -puts "" -############################### -## BRepAlgoAPI_Fuse fails on two cylinders -############################### - -if { [ catch { set info_result [OCC823 a1 a2 result] } ] } { - puts "Faulty OCC823" -} else { - if { [regexp {FAILED} $info_result] } { - puts "Faulty OCC823" - } - - set ExplodeList [explode result] - if {[llength ${ExplodeList}] < 1} { - puts "Faulty OCC823 : Resulting shape is empty COMPOUND" - } -} -checkprops result -s 23189.5 -checkshape result -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_4/bug824 b/tests/bugs/modalg_4/bug824 deleted file mode 100755 index 285eeccfca..0000000000 --- a/tests/bugs/modalg_4/bug824 +++ /dev/null @@ -1,26 +0,0 @@ -pload QAcommands - -puts "============" -puts "OCC824" -puts "============" -puts "" -#################################### -## BRepAlgoAPI_Fuse fails on cylinder and sphere -#################################### - -if { [ catch { set info_result [OCC824 a1 a2 result] } ] } { - puts "Faulty OCC824" -} else { - if { [regexp {FAILED} $info_result] } { - puts "Faulty OCC824" - } - - set ExplodeList [explode result] - if {[llength ${ExplodeList}] < 1} { - puts "Faulty OCC824" - } -} - -checkprops result -s 16336.3 -checkshape result -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_4/bug826 b/tests/bugs/modalg_4/bug826 deleted file mode 100755 index 166c3e5790..0000000000 --- a/tests/bugs/modalg_4/bug826 +++ /dev/null @@ -1,37 +0,0 @@ -pload QAcommands - -puts "============" -puts "OCC826" -puts "============" -puts "" -################################### -## BRepAlgoAPI_Fuse fails on revolved and sphere -################################### -## Now this test uses BOPAlgo. -## Intersection of cylinder and sphere. At that, -## the intersection line goes near to the pole -## of the sphere (near, but not through). -## Walking-line has a point in the seam of -## the sphere and neighbour point. Both sections of the -## sphere (through every of these points and parallel to -## equatorial plane) are circles with small radii. As result, -## in 2D-space U-coordinates of these points are too different -## (may be even ~60 degrees) in spite of its neighbourhood. -##################################### - -if { [ catch { set info_result [OCC826 a1 a2 result] } ] } { - puts "Faulty OCC826" -} else { - if { [regexp {FAILED} $info_result] } { - puts "Faulty OCC826" - } - - set ExplodeList [explode result] - if {[llength ${ExplodeList}] < 1} { - puts "Faulty OCC826" - } -} - -checkprops result -s 272935 -checkshape result -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_4/bug827 b/tests/bugs/modalg_4/bug827 deleted file mode 100755 index 99f4024f25..0000000000 --- a/tests/bugs/modalg_4/bug827 +++ /dev/null @@ -1,46 +0,0 @@ -pload QAcommands - -puts "========" -puts "OCC827" -puts "========" -puts "" -################################### -## BRepAlgoAPI_Fuse fails on cylinder and torus -################################### - -# -# a1 - Cylinder -# a2 - Torus1 -# a3 - Torus1 -# res1 - Fuse(Torus1 & Cylinder) -# res2 - Fuse(Torus2 & res1) -# - -if { [ catch { set info_result [OCC827 a1 a2 a3 result1 result2] } ] } { - puts "Faulty : an exception was caught" -} else { - if { [lsearch ${info_result} FAILED] > -1} { - puts "Faulty OCC827 (case 1)" - } - checkshape a1 - checkshape a2 - checkshape a3 - checkshape result1 - checkshape result2 - - set ExplodeList [explode result1] - if {[llength ${ExplodeList}] < 1} { - puts "Faulty : Resulting shape is empty COMPOUND" - } - - set ExplodeList [explode result2] - if {[llength ${ExplodeList}] < 1} { - puts "Faulty : Resulting shape is empty COMPOUND" - } - - renamevar result2 result -} - -checkprops result -s 11847.7 -checkshape result -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_4/bug895 b/tests/bugs/modalg_4/bug895 deleted file mode 100755 index 61aaa25994..0000000000 --- a/tests/bugs/modalg_4/bug895 +++ /dev/null @@ -1,52 +0,0 @@ -puts "============" -puts "OCC895" -puts "============" -puts "" -######################################################### -## In one case, twisted surface is created. -## The problem is in incorrect computation of mutual orientations of wire segments. -######################################################### - -pload QAcommands - -set scale 73.609 -set proj_X 0.523995 -set proj_Y 0.359655 -set proj_Z 0.77206 -set up_X -0.739036 -set up_Y -0.258607 -set up_Z 0.622051 -set at_X 5.51184366274157 -set at_Y 5.10968389884332 -set at_Z 0.581665443993578 - -set x_coord 210 -set y_coord 210 - -set status 0 - -set angle 5 -set reverse 0 -set order 0 - -if { [ catch { OCC895 result ${angle} ${reverse} ${order} } ] } { - puts "Faulty : an exception was caught" -} - -if { ${status} == 0} { - vinit - vsetdispmode 1 - vdisplay result - - vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z} - - checkcolor $x_coord $y_coord 0.98 0.72 0.13 - - if { ${stat} != 1 } { - puts "Faulty OCC895 (case 2)" - } -} - -checkprops result -s 18.1614 -checkshape result -checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_5/bug25004_1 b/tests/bugs/modalg_5/bug25004_1 deleted file mode 100644 index e350ae3261..0000000000 --- a/tests/bugs/modalg_5/bug25004_1 +++ /dev/null @@ -1,22 +0,0 @@ -puts "============" -puts "OCC25004" -puts "============" -puts "" -########################################################################################################## -# Extrema_ExtCC::Extrema curve/curve incorrect result -########################################################################################################## - -pload QAcommands - -set info [OCC25004] -regexp {F += +([-0-9.+eE]+)} $info full aF -regexp {NbExtrema += +([-0-9.+eE]+)} $info full aNb - -set expected_F 0.39788735772 -set expected_aNb 3 -set tol_abs_dist 1.0e-12 -set tol_rel_dist 0.1 - -checkreal "value F" ${aF} ${expected_F} ${tol_abs_dist} ${tol_rel_dist} -checkreal "Nbextrema" ${aNb} ${expected_aNb} ${tol_abs_dist} ${tol_rel_dist} - diff --git a/tests/bugs/modalg_6/bug26746 b/tests/bugs/modalg_6/bug26746 deleted file mode 100644 index 4280cbb1a0..0000000000 --- a/tests/bugs/modalg_6/bug26746 +++ /dev/null @@ -1,15 +0,0 @@ -puts "========" -puts "OCC26746" -puts "========" -puts "" -################################################# -# 0026746: Method gp_Torus::Coefficients(...) returns incorrect value. -################################################# - -pload QAcommands - -set Tol 3.0e-7 - -torus tr 55.52514413 2.070076585 73.83409062 0.37231784651136368 0.58886674834874120 0.71736697293527607 0.80682335496555135, 0.17666016102759910, -0.56376170618524390 87.08479625 23.14682176 - -OCC26746 tr $Tol 5 \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug26747_1 b/tests/bugs/modalg_6/bug26747_1 deleted file mode 100644 index c81669900c..0000000000 --- a/tests/bugs/modalg_6/bug26747_1 +++ /dev/null @@ -1,17 +0,0 @@ -puts "========" -puts "OCC25605" -puts "========" -puts "" -################################################# -# 0026747: Some constructors of gp_Parab2d classes have not understandable interface and create wrong parabola -################################################# - -pload QAcommands - -OCC26747_1 result - -v2d -don result -2dfit - -checkview -screenshot -2d -l -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug26747_2 b/tests/bugs/modalg_6/bug26747_2 deleted file mode 100644 index fc25e990e1..0000000000 --- a/tests/bugs/modalg_6/bug26747_2 +++ /dev/null @@ -1,17 +0,0 @@ -puts "========" -puts "OCC26747" -puts "========" -puts "" -################################################# -# 0026747: Some constructors of gp_Parab2d classes have not understandable interface and create wrong parabola -################################################# - -pload QAcommands - -OCC26747_2 result - -v2d -don result -2dfit - -checkview -screenshot -2d -l -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug26747_3 b/tests/bugs/modalg_6/bug26747_3 deleted file mode 100644 index 0bb63c4d12..0000000000 --- a/tests/bugs/modalg_6/bug26747_3 +++ /dev/null @@ -1,17 +0,0 @@ -puts "========" -puts "OCC26747" -puts "========" -puts "" -################################################# -# 0026747: Some constructors of gp_Parab2d classes have not understandable interface and create wrong parabola -################################################# - -pload QAcommands - -OCC26747_3 result - -v2d -don result -2dfit - -checkview -screenshot -2d -l -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug26750 b/tests/bugs/modalg_6/bug26750 deleted file mode 100644 index 4486ec0ead..0000000000 --- a/tests/bugs/modalg_6/bug26750 +++ /dev/null @@ -1,11 +0,0 @@ -puts "============" -puts "OCC26750" -puts "============" -puts "" -############################################################################################# -## Method IsNormal(...) for gp_Vec2d returns FALSE if the angle between two vectors is equal to -90 degree (-M_PI/2 radian) -############################################################################################# - -pload QAcommands - -OCC26750 \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug27875 b/tests/bugs/modalg_6/bug27875 deleted file mode 100644 index b349d1d646..0000000000 --- a/tests/bugs/modalg_6/bug27875 +++ /dev/null @@ -1,19 +0,0 @@ -puts "================" -puts "OCC27875" -puts "================" -puts "" -############################### -## GeomFill_NSections constructor crash on sequence of curve containing only one curve -############################### - -# GeomFill_NSections does not work if the sequence of curves contains only single curve. -# Therefore, we should not expect any correct result from this operation. However, the -# exception must not be thrown. - -pload QAcommands - -restore [locate_data_file OCC606_2.brep] w2 -explode w2 e -mkcurve cc w2_1 -trim cc cc -OCC27875 cc diff --git a/tests/bugs/modalg_6/bug28594 b/tests/bugs/modalg_6/bug28594 deleted file mode 100644 index 1d5ca206dc..0000000000 --- a/tests/bugs/modalg_6/bug28594 +++ /dev/null @@ -1,25 +0,0 @@ -puts "========" -puts "OCC28594" -puts "========" -puts "" -#################################################################### -# Geom2dAPI_Interpolate generated curve is not the same as proe -#################################################################### - -pload QAcommands - -set anImageWithScale ${imagedir}/${test_image}_c1.png -set anImageWithoutScale ${imagedir}/${test_image}_c2.png - -OCC28594 c1 c2 -smallview -2D- -donly c1 -2dfit -checkview -screenshot -2d -path ${anImageWithScale} -donly c2 -checkview -screenshot -2d -path ${anImageWithoutScale} - -set aDiffImageResult [diffimage $anImageWithScale $anImageWithoutScale 0.1 0 0] -if {$aDiffImageResult == 0} { - puts "Error: curves are equal" -} \ No newline at end of file diff --git a/tests/bugs/modalg_7/bug28131 b/tests/bugs/modalg_7/bug28131 deleted file mode 100644 index 8af534c128..0000000000 --- a/tests/bugs/modalg_7/bug28131 +++ /dev/null @@ -1,38 +0,0 @@ -puts "# ===============================================================" -puts "# 0028131: BRepOffset_MakeOffset can't create offset with a face which created by filling 3 bsplinecurve" -puts "# ===============================================================" -puts "" - -puts "# Create face to be offset, by dedicated command" -pload QAcommands -OCC28131 f - -puts "# Try simple offset" -offsetshapesimple result_simple f 10. -checkshape result_simple -checkmaxtol result_simple -ref 0.205 -checkprops result_simple -s 1693.7 - -puts "# Try standard offset" -offsetshape result_std f 10. -fixshape result_std result_std ;# need to fix it.... -checkshape result_std -checkmaxtol result_std -ref 0.408 -checkprops result_std -s 1693.76 - -puts "# Make snapshots (overall and zoom to degenerated point)" - -smallview -Y+Z -fit -checkview -2d -screenshot -path ${imagedir}/${test_image}.png - -smallview -Y+Z -zoom 400 -pu; pu; pu -pr; pr; pr - -donly result_simple -checkview -2d -screenshot -path ${imagedir}/${test_image}_zoom_simple.png - -donly result_std -checkview -2d -screenshot -path ${imagedir}/${test_image}_zoom_standard.png diff --git a/tests/bugs/modalg_7/bug29430 b/tests/bugs/modalg_7/bug29430 deleted file mode 100644 index b29c40fe85..0000000000 --- a/tests/bugs/modalg_7/bug29430 +++ /dev/null @@ -1,46 +0,0 @@ -puts "========" -puts "OCC29430" -puts "========" -puts "" -################################################# -# [Regression] Curve evaluation at boundary point. -################################################# - -pload QAcommands - -# After launching the command below we will obtain -# some wire (stored in "result" variable) containing -# a single edge based on arc of circle and its first and last -# 3D-points (p1 and p2 correspondingly) taken from -# composite curve (BRepAdaptor_CompCurve) built on this wire. - -OCC29430 result p1 p2 - -vertex v1 p1 -vertex v2 p2 - -explode result v - -# Now, let's check -# 1. whether p1 and p2 match the vertices of the wire; -# 2. whether p1 and p2 are different points. - -distmini d11 result_1 v1 -distmini d12 result_1 v2 -distmini d21 result_2 v1 -distmini d22 result_2 v2 -distmini dv12 v1 v2 - - -if { ([dval d11_val] > 1.0e-7) && ([dval d21_val] > 1.0e-7) } { - puts "Error: Start point of the wire does not match any its vertex." -} -if { ([dval d12_val] > 1.0e-7) && ([dval d22_val] > 1.0e-7) } { - puts "Error: End point of the wire does not match any its vertex." -} - -if { [dval dv12_val] < 1.0e-7 } { - puts "Error: Start and End points of the wire are the same." -} - - diff --git a/tests/bugs/modalg_7/bug30747 b/tests/bugs/modalg_7/bug30747 deleted file mode 100644 index f2d76dd072..0000000000 --- a/tests/bugs/modalg_7/bug30747 +++ /dev/null @@ -1,8 +0,0 @@ -puts "=================================================================" -puts "OCC30747: Modeling Algorithms - 2d Curves concatenator doesn't properly process closed contours." -puts "=================================================================" -puts "" - -pload QAcommands - -OCC30747 res \ No newline at end of file diff --git a/tests/bugs/modalg_7/bug30869 b/tests/bugs/modalg_7/bug30869 deleted file mode 100644 index ed7e2e48a9..0000000000 --- a/tests/bugs/modalg_7/bug30869 +++ /dev/null @@ -1,55 +0,0 @@ -puts "========" -puts "0030869: Modeling Data - BRepAdaptor_CompCurve incorrectly evaluates the boundary points" -puts "========" -puts "" - -pload QAcommands - -# create wire consisting of a single edge based on a trimmed circle -circle c 1 0 0 0 -1 0 0 0 -1 1 -trim c c 1.5707963267949 4.71238898038469 -mkedge e c -orientation e R -wire w e - -# compute boundary points using BRepAdaptor_CompCurve -set log [OCC30869 w] - -set lines [split $log "\n"] - -if {![regexp {([-0-9.+eE]*): point ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*), tangent ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*)} [lindex $lines 0] full t1 x1 y1 z1 dx1 dy1 dz1]} { - puts "Error: first point is not computed" -} - -if {![regexp {([-0-9.+eE]*): point ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*), tangent ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*)} [lindex $lines 1] full t2 x2 y2 z2 dx2 dy2 dz2]} { - puts "Error: last point is not computed" -} - -# compute reference values - -# inverse the curve as the edge in the wire is reversed -circle ci 1 0 0 0 1 0 0 0 -1 1 -trim ci ci 1.5707963267949 4.71238898038469 - -cvalue ci 1.5707963267949 x1_ref y1_ref z1_ref dx1_ref dy1_ref dz1_ref -cvalue ci 4.71238898038469 x2_ref y2_ref z2_ref dx2_ref dy2_ref dz2_ref - -# compare the values -set tol_abs 1.e-7 -set tol_rel 1.e-7 - -checkreal first_pnt_x $x1 [dval x1_ref] $tol_abs $tol_rel -checkreal first_pnt_y $y1 [dval y1_ref] $tol_abs $tol_rel -checkreal first_pnt_z $z1 [dval z1_ref] $tol_abs $tol_rel - -checkreal first_tgt_x $dx1 [dval dx1_ref] $tol_abs $tol_rel -checkreal first_tgt_y $dy1 [dval dy1_ref] $tol_abs $tol_rel -checkreal first_tgt_z $dz1 [dval dz1_ref] $tol_abs $tol_rel - -checkreal last_pnt_x $x2 [dval x2_ref] $tol_abs $tol_rel -checkreal last_pnt_y $y2 [dval y2_ref] $tol_abs $tol_rel -checkreal last_pnt_z $z2 [dval z2_ref] $tol_abs $tol_rel - -checkreal last_tgt_x $dx2 [dval dx2_ref] $tol_abs $tol_rel -checkreal last_tgt_y $dy2 [dval dy2_ref] $tol_abs $tol_rel -checkreal last_tgt_z $dz2 [dval dz2_ref] $tol_abs $tol_rel diff --git a/tests/bugs/moddata_1/buc60897 b/tests/bugs/moddata_1/buc60897 deleted file mode 100755 index 6ed812b6e1..0000000000 --- a/tests/bugs/moddata_1/buc60897 +++ /dev/null @@ -1,68 +0,0 @@ -puts "========" -puts "BUC60897" -puts "========" - -pload QAcommands - -if [catch { set result [BUC60897] } ] { - puts "BUC60897: Error; (case 1)" -} else { - set len [llength ${result}] - if {${len} < 21} { - puts "length = ${len}" - puts "BUC60897: Error; (case 2)" - } else { - set circle_X [lindex ${result} 3] - set circle_Y [lindex ${result} 5] - set circle_R [lindex ${result} 7] - set tangency1_X [lindex ${result} 11] - set tangency1_Y [lindex ${result} 13] - set tangency2_X [lindex ${result} 17] - set tangency2_Y [lindex ${result} 19] - - set x1 [expr abs(${tangency1_X} - ${circle_X})] - set y1 [expr abs(${tangency1_Y} - ${circle_Y})] - set R1 [expr sqrt(${x1} * ${x1} + ${y1} * ${y1})] - - set x2 [expr abs(${tangency2_X} - ${circle_X})] - set y2 [expr abs(${tangency2_Y} - ${circle_Y})] - set R2 [expr sqrt(${x2} * ${x2} + ${y2} * ${y2})] - - set maxdelta 1.0 - set delta_R1 [expr abs(${R1} - ${circle_R}) / ${circle_R} * 100.] - set delta_R2 [expr abs(${R2} - ${circle_R}) / ${circle_R} * 100.] - - if {${delta_R1} > ${maxdelta}} { - puts "circle_X = ${circle_X}" - puts "circle_Y = ${circle_Y}" - puts "circle_R = ${circle_R}" - puts "tangency1_X = ${tangency1_X}" - puts "tangency1_Y = ${tangency1_Y}" - puts "x1 = ${x1}" - puts "y1 = ${y1}" - puts "R1 = ${R1}" - puts "delta_R1 = ${delta_R1}" - puts "maxdelta = ${maxdelta}" - puts "BUC60897: Error; (case 3)" - } else { - puts "BUC60897: OK; (case 1)" - } - - if {${delta_R2} > ${maxdelta}} { - puts "circle_X = ${circle_X}" - puts "circle_Y = ${circle_Y}" - puts "circle_R = ${circle_R}" - puts "tangency2_X = ${tangency2_X}" - puts "tangency2_Y = ${tangency2_Y}" - puts "x2 = ${x2}" - puts "y2 = ${y2}" - puts "R2 = ${R2}" - puts "delta_R2 = ${delta_R2}" - puts "maxdelta = ${maxdelta}" - puts "BUC60897: Error; (case 4)" - } else { - puts "BUC60897: OK; (case 2)" - } - - } -} diff --git a/tests/bugs/moddata_2/bug2569_1 b/tests/bugs/moddata_2/bug2569_1 deleted file mode 100755 index 435b7c08ed..0000000000 --- a/tests/bugs/moddata_2/bug2569_1 +++ /dev/null @@ -1,20 +0,0 @@ -pload QAcommands - -puts "============" -puts "OCC2569" -puts "============" -puts "" -###################################################### -# If it is not possible to create the bezier curve, -# it should throw an exception. -###################################################### -cpulimit 60 -vinit -set out [OCC2569 26 result] -if {[string compare $out "\n Degree = 25\n"] == 0} { - puts "OCC2569: OK" -} else { - puts "OCC2569: Faulty" -} -vfit -checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug2569_2 b/tests/bugs/moddata_2/bug2569_2 deleted file mode 100755 index 7bef991f71..0000000000 --- a/tests/bugs/moddata_2/bug2569_2 +++ /dev/null @@ -1,20 +0,0 @@ -# Incompleted behavior of test case is OK. -# Exception should be thrown. - -puts "TODO OCC11111 ALL: An exception was caught" - -pload QAcommands - -puts "============" -puts "0002569: If it is not possible to create the bezier curve, it should throw an e x c e p t i o n." -puts "============" -puts "" - -cpulimit 60 -vinit - -if { [catch {OCC2569 29 result} anException] } { - puts "OCC2569 : OK" -} else { - puts "Error : OCC2569" -} diff --git a/tests/bugs/moddata_2/bug49_1 b/tests/bugs/moddata_2/bug49_1 deleted file mode 100755 index c294ba6585..0000000000 --- a/tests/bugs/moddata_2/bug49_1 +++ /dev/null @@ -1,18 +0,0 @@ - -puts "========" -puts "OCC49" -puts "========" - -pload QAcommands - -pcylinder c 10 20 - -set result [OCC49 c] - -if {$result == 1} { - puts "OCC49: OK" -} else { - puts "Error : OCC49" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug49_2 b/tests/bugs/moddata_2/bug49_2 deleted file mode 100755 index 824e4724b9..0000000000 --- a/tests/bugs/moddata_2/bug49_2 +++ /dev/null @@ -1,21 +0,0 @@ - -puts "========" -puts "OCC49" -puts "========" - -pload QAcommands - -pcylinder c 10 20 -box b 10 10 10 -bcut b_c_cut b c -checkshape b_c_cut - -set result [OCC49 b_c_cut] - -if {$result == 1} { - puts "Error : OCC49" -} else { - puts "OCC49: OK" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug524 b/tests/bugs/moddata_2/bug524 deleted file mode 100755 index 65cd480afd..0000000000 --- a/tests/bugs/moddata_2/bug524 +++ /dev/null @@ -1,60 +0,0 @@ -pload QAcommands - -puts "========" -puts "OCC524" -puts "========" -puts "" - - -set LowerVector 1 -set UpperVector 6 -set InitialValueVector 5 -set LowerRowMatrix 1 -set UpperRowMatrix 6 -set LowerColMatrix 1 -set UpperColMatrix 6 -set InitialValueMatrix 4 - -set info_result [OCC524 ${LowerVector} ${UpperVector} ${InitialValueVector} ${LowerRowMatrix} ${UpperRowMatrix} ${LowerColMatrix} ${UpperColMatrix} ${InitialValueMatrix}] - -set ll [llength ${info_result}] - -if {${ll} != 46} { - puts "OCC524: Error" -} else { - regexp {math_Vector of Length = ([-0-9.+eE]+)} ${info_result} full Vector1Length - if {${Vector1Length} != [expr ${UpperVector} - ${LowerVector} + 1]} { - puts "Vector1Length=${Vector1Length}" - puts "OCC524: Error" - } else { - regexp {math_Vector\(1\) = ([-0-9.+eE]+)} ${info_result} full Vector1_1 - regexp {math_Vector\(2\) = ([-0-9.+eE]+)} ${info_result} full Vector1_2 - regexp {math_Vector\(3\) = ([-0-9.+eE]+)} ${info_result} full Vector1_3 - regexp {math_Vector\(4\) = ([-0-9.+eE]+)} ${info_result} full Vector1_4 - regexp {math_Vector\(5\) = ([-0-9.+eE]+)} ${info_result} full Vector1_5 - regexp {math_Vector\(6\) = ([-0-9.+eE]+)} ${info_result} full Vector1_6 - #regexp {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector1_7 - #regexp {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector1_8 - #regexp {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector1_9 - - if {${Vector1_1}!=120. || ${Vector1_2}!=120. || ${Vector1_3}!=120. || ${Vector1_4}!=120. || ${Vector1_5}!=120. || ${Vector1_6}!=120.} { - puts "Error : OCC524" - } else { - regexp -all {math_Vector\(1\) = ([-0-9.+eE]+)} ${info_result} full Vector2_1 - regexp -all {math_Vector\(2\) = ([-0-9.+eE]+)} ${info_result} full Vector2_2 - regexp -all {math_Vector\(3\) = ([-0-9.+eE]+)} ${info_result} full Vector2_3 - regexp -all {math_Vector\(4\) = ([-0-9.+eE]+)} ${info_result} full Vector2_4 - regexp -all {math_Vector\(5\) = ([-0-9.+eE]+)} ${info_result} full Vector2_5 - regexp -all {math_Vector\(6\) = ([-0-9.+eE]+)} ${info_result} full Vector2_6 - #regexp -all {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector2_7 - #regexp -all {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector2_8 - #regexp -all {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector2_9 - if {${Vector2_1}!=120. || ${Vector2_2}!=125. || ${Vector2_3}!=120. || ${Vector2_4}!=120. || ${Vector2_5}!=120. || ${Vector2_6}!=120.} { - puts "OCC524: Error" - } else { - puts "OCC524: OK" - } - } - } -} - diff --git a/tests/bugs/moddata_2/bug813 b/tests/bugs/moddata_2/bug813 deleted file mode 100755 index 0cde7ffdb8..0000000000 --- a/tests/bugs/moddata_2/bug813 +++ /dev/null @@ -1,24 +0,0 @@ -pload QAcommands - -puts "=========" -puts " OCC813 " -puts "=========" -puts "" -##################################### -## Geom2dGcc_Lin2d2Tan fails on point and ellipse -##################################### -set U 200 -set V 200 - -set result [OCC813 $U $V] - -set nb_sol 0 - -regexp {nb of solutions = ([-0-9.+eE]+)} $result full nb_sol - -if {$nb_sol > 0} { - puts "OCC813 OK" -} else { - puts "Faulty OCC813" -} - diff --git a/tests/bugs/moddata_2/bug814 b/tests/bugs/moddata_2/bug814 deleted file mode 100755 index 9772a63d72..0000000000 --- a/tests/bugs/moddata_2/bug814 +++ /dev/null @@ -1,23 +0,0 @@ -pload QAcommands - -puts "=========" -puts " OCC814 " -puts "=========" -puts "" -#################################### -## Geom2dGcc_Lin2d2Tan fails on circle and ellipse -#################################### - -set result [OCC814] - -set nb_sol 0 - -regexp {nb of solutions = ([-0-9.+eE]+)} $result full nb_sol - -if {$nb_sol > 0} { - puts "OCC814 OK" -} else { - puts "Faulty OCC814" -} - - diff --git a/tests/bugs/step/bug33657_1 b/tests/bugs/step/bug33657_1 deleted file mode 100644 index 1d46d0a76a..0000000000 --- a/tests/bugs/step/bug33657_1 +++ /dev/null @@ -1,4 +0,0 @@ -# Check performance of STEPCAFControl_Reader/Writer constructors in multithreading environment. -# If no crash occurs, its fine. -pload QAcommands -OCC33657_1 diff --git a/tests/bugs/step/bug33657_2 b/tests/bugs/step/bug33657_2 deleted file mode 100644 index 5fe05d1efa..0000000000 --- a/tests/bugs/step/bug33657_2 +++ /dev/null @@ -1,4 +0,0 @@ -# Check performance of STEPControl_Reader in multithreading environment. -# If no crash occurs, its fine. -pload QAcommands -OCC33657_2 [locate_data_file bug21802_as1-oc-214.stp] diff --git a/tests/bugs/step/bug33657_3 b/tests/bugs/step/bug33657_3 deleted file mode 100644 index bddc7259f0..0000000000 --- a/tests/bugs/step/bug33657_3 +++ /dev/null @@ -1,4 +0,0 @@ -# Check performance of STEPControl_Writer in multithreading environment. -# If no crash occurs, its fine. -pload QAcommands -OCC33657_1 diff --git a/tests/bugs/step/bug33657_4 b/tests/bugs/step/bug33657_4 deleted file mode 100644 index 6d24511bcb..0000000000 --- a/tests/bugs/step/bug33657_4 +++ /dev/null @@ -1,3 +0,0 @@ -# Check performance of STEPControl_Reader/Writer in multithreading environment. -pload QAcommands -OCC33657_4 [locate_data_file bug21802_as1-oc-214.stp] diff --git a/tests/bugs/xde/bug23950 b/tests/bugs/xde/bug23950 deleted file mode 100644 index 753467a621..0000000000 --- a/tests/bugs/xde/bug23950 +++ /dev/null @@ -1,41 +0,0 @@ -puts "==========" -puts "OCC23950" -puts "==========" -puts "" -################################################################################# -# Names and visibility of points not saved when writing XCAF Document into STEP -################################################################################# - -pload QAcommands - -#switch on writing of vertices names and styles -param write.step.vertex.mode 1 - -set aFile ${imagedir}/bug23950.step - -catch {file delete ${aFile}} - -set info [OCC23950 ${aFile}] - -if {[regexp "Write Done" $info] != 1} { - puts "Error: file was not written" -} else { - puts "OK: file was written" -} - -set is23950fixed "FALSE" -set file23950 [open ${aFile} RDONLY] -while {[eof $file23950] == 0} { - set file23950line [string trim [gets $file23950]] - if {[string first "Point1" $file23950line] != -1} { - set is23950fixed "TRUE" - } -} -close $file23950 - -if {[string compare $is23950fixed "FALSE"] == 0} { - puts "ERROR: OCC23950 is reproduced" -} - -#return default behavior -param write.step.vertex.mode 0 diff --git a/tests/bugs/xde/bug23951 b/tests/bugs/xde/bug23951 deleted file mode 100644 index b4be2e9e44..0000000000 --- a/tests/bugs/xde/bug23951 +++ /dev/null @@ -1,26 +0,0 @@ -puts "==========" -puts "OCC23951" -puts "==========" -puts "" -##################################################################################### -# Visibility of free, simple shapes not saved when writing XCAF Document info STEP -##################################################################################### - -pload QAcommands - -set FilePath ${imagedir}/bug23951_test_box.step - -file delete -force ${FilePath} -set info [OCC23951 ${FilePath}] - -if { [regexp "Write Done" $info] != 1 } { - puts "Error: file was not written" -} else { - puts "OK: file was written" -} - -stepread ${FilePath} a * -axo -fit - -checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/lowalgos/intss/bug26675 b/tests/lowalgos/intss/bug26675 deleted file mode 100644 index 20141ba93f..0000000000 --- a/tests/lowalgos/intss/bug26675 +++ /dev/null @@ -1,58 +0,0 @@ -puts "============" -puts "OCC26675" -puts "============" -puts "" -############################### -## 0026675: Eliminate normalization of coordinates in ApproxInt package -############################### - -set GoodNbCurv 1 - -pload QAcommands -OCC26675_1 ss - -intersect res ss_1 ss_2 - -set che [whatis res] -set ind [string first "3d curve" $che] -if {${ind} >= 0} { - #Only variable "res" exists - renamevar res res_1 -} - - -set ic 1 -set AllowRepeate 1 -while { $AllowRepeate != 0 } { - set che [whatis res_$ic] - set ind [string first "3d curve" $che] - if {${ind} < 0} { - set AllowRepeate 0 - } else { - display res_$ic - - bounds res_$ic U1 U2 - - dval U1 - dval U2 - - if {[dval U2-U1] < 1.0e-20} { - puts "Error: Wrong curve's range!" - } - - xdistcs res_$ic ss_1 U1 U2 10 4.6e-6 - xdistcs res_$ic ss_2 U1 U2 10 4.3e-6 - - incr ic - } -} - -if {[expr {$ic - 1}] == $GoodNbCurv} { - puts "OK: Curve Number is good!" -} else { - puts "Error: Curve Number is bad!" -} - -smallview -fit -checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug24005 b/tests/perf/modalg/bug24005 deleted file mode 100644 index b6aad5d352..0000000000 --- a/tests/perf/modalg/bug24005 +++ /dev/null @@ -1,23 +0,0 @@ -puts "============" -puts "OCC24005" -puts "============" -puts "" -############################### -## Intersecting a slightly off angle plane with a cylinder takes 7+ seconds -############################### - -pload QAcommands - -dchrono h restart - -OCC24005 result - -dchrono h stop counter OCC24005 - -if { [regexp {Ellipse} [dump result]] == 1 } { - puts "result is OK" -} else { - puts "result is Faulty" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png