]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Porting to OCCT 7.8.0 OCCT780
authorjfa <jfa@opencascade.com>
Mon, 15 Jan 2024 13:17:43 +0000 (13:17 +0000)
committermbs <martin.bernhard@opencascade.com>
Thu, 16 May 2024 07:48:55 +0000 (08:48 +0100)
38 files changed:
src/BuildPlugin/Test/Test20513_2.py
src/CTestTestfileInstall.cmake
src/ExchangePlugin/Test/TestImportImage_3.py
src/FeaturesPlugin/Test/Test20245_3.py
src/FeaturesPlugin/Test/Test20245_3_geometrical.py
src/FeaturesPlugin/Test/Test2918.py
src/FeaturesPlugin/Test/TestExtrusionCut_ByPlanesAndOffsets.py
src/FeaturesPlugin/Test/TestExtrusionFuse_ByPlanesAndOffsets.py
src/FeaturesPlugin/Test/TestExtrusion_ByFaces11.py
src/FeaturesPlugin/Test/TestFillet_MultiLevelCompound_v0_3.py
src/FeaturesPlugin/Test/TestFillet_MultiLevelCompound_v0_4.py
src/FeaturesPlugin/Test/TestFillet_MultiLevelCompound_v95_3.py
src/FeaturesPlugin/Test/TestFillet_MultiLevelCompound_v95_4.py
src/FeaturesPlugin/Test/TestRevolutionFuse_ByPlanesAndOffsets.py
src/FeaturesPlugin/Test/TestRevolutionFuse_ThroughAll.py
src/GeomAPI/GeomAPI_Shape.cpp
src/GeomAlgoAPI/GeomAlgoAPI_STEPExport.cpp
src/GeomAlgoImpl/GEOMAlgo_AlgoTools.cxx
src/GeomAlgoImpl/GEOMAlgo_AlgoTools.hxx
src/GeomAlgoImpl/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx
src/GeomAlgoImpl/GEOMAlgo_PassKeyShape.cxx
src/GeomAlgoImpl/GEOMAlgo_PassKeyShape.hxx
src/GeomAlgoImpl/GEOMAlgo_PassKeyShapeMapHasher.cxx
src/GeomAlgoImpl/GEOMAlgo_PassKeyShapeMapHasher.hxx
src/Model/Model_BodyBuilder.cpp
src/Model/Model_Document.cpp
src/Model/Model_Objects.cpp
src/ModelHighAPI/Test/Test18451.py
src/PythonAPI/model/tests/tests.py
test.models/CMakeLists.txt
test.models/CTestTestfileInstall.cmake [new file with mode: 0644]
test.models/bracket32.py
test.models/bushing.py
test.models/case24.py
test.models/plug.py
test.models/tests.set [new file with mode: 0644]
test.models/visor_support.py
test.models/wheel_rim.py

index 472287306b02b615728209805d595976c8cbf0eb..7770d81b461cdc880eaa033939399b993b366ebd 100644 (file)
@@ -1129,7 +1129,7 @@ model.testNbSubShapes(Filling_2, GeomAPI_Shape.SOLID, [0])
 model.testNbSubShapes(Filling_2, GeomAPI_Shape.FACE, [1])
 model.testNbSubShapes(Filling_2, GeomAPI_Shape.EDGE, [4])
 model.testNbSubShapes(Filling_2, GeomAPI_Shape.VERTEX, [8])
-model.testResultsAreas(Filling_2, [29.10364506])
+model.testResultsAreas(Filling_2, [29.09175882])
 
 model.testNbResults(Filling_3, 1)
 model.testNbSubResults(Filling_3, [0])
@@ -1137,6 +1137,6 @@ model.testNbSubShapes(Filling_3, GeomAPI_Shape.SOLID, [0])
 model.testNbSubShapes(Filling_3, GeomAPI_Shape.FACE, [1])
 model.testNbSubShapes(Filling_3, GeomAPI_Shape.EDGE, [4])
 model.testNbSubShapes(Filling_3, GeomAPI_Shape.VERTEX, [8])
-model.testResultsAreas(Filling_3, [30.744277238])
+model.testResultsAreas(Filling_3, [30.720017606])
 
 assert(model.checkPythonDump())
index c559f1a55094d4fd330860ffd067b99ff1e6fb32..81b24a8dae6f7fb688dc796c7feb8f6067b89635 100644 (file)
@@ -46,4 +46,5 @@ SUBDIRS(ConnectorAPI
         ModelGeomAlgo
         Locale
         test_API
+        TestModels
 )
index 82b1a89742f92b8755b9e5eb109806aa45b5d367..4de0cf850a09403785ba8f44a811fbad3d71a685 100755 (executable)
@@ -104,5 +104,9 @@ with TemporaryDirectory() as tmp_dir:
 # Close SALOME GUI
 import salome_utils
 import subprocess
+import platform
 port = salome_utils.getPortNumber()
-proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)])
+if platform.system() == "Windows":
+  proc = subprocess.Popen(["python", "killSalomeWithPort.py", "{}".format(port)])
+else:
+  proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)])
index 1c8898df02f6967454d79cf891814d4d690b3142..8e5e3f32bc8905996a6e75ed7b8946fba663af21 100644 (file)
@@ -1090,7 +1090,7 @@ SketchLine_77.result().setName("SketchLine_118")
 SketchProjection_19 = Sketch_8.addProjection(model.selection("EDGE", "Split_2_1_17/Modified_Edge&PartSet/YOZ/YOZ&Sketch_1/SketchArc_2_2"), False)
 SketchProjection_19.setName("SketchProjection_40")
 SketchProjection_19.result().setName("SketchProjection_40")
-SketchBSpline_1 = SketchProjection_19.createdFeature()
+SketchProj19_1 = SketchProjection_19.createdFeature()
 
 ### Create SketchProjection
 SketchProjection_20 = Sketch_8.addProjection(model.selection("EDGE", "Partition_1_1_4/Generated_Edge&PartSet/YOZ/YOZ&Sketch_1/SketchLine_19"), False)
@@ -1100,7 +1100,7 @@ SketchLine_78 = SketchProjection_20.createdFeature()
 SketchLine_78.setName("SketchLine_119")
 SketchLine_78.result().setName("SketchLine_119")
 Sketch_8.setCoincident(SketchLine_74.endPoint(), SketchLine_78.result())
-Sketch_8.setCoincident(SketchLine_74.startPoint(), SketchAPI_BSpline(SketchBSpline_1).startPoint())
+Sketch_8.setCoincident(SketchLine_74.startPoint(), SketchAPI_Arc(SketchProj19_1).startPoint())
 
 ### Create SketchLine
 SketchLine_79 = Sketch_8.addLine(5.676067550792231, 10.23944020672391, 5.829536340268943, 10.44848598250872)
index 70e5c1d7cfe0265bfa0fd026602e95dc453f4f65..21fe714c613e3b28ab278973629e7fc3cc8ad67b 100644 (file)
@@ -366,10 +366,10 @@ Revolution_3 = model.addRevolution(Part_1_doc, [model.selection("WIRE", (4.21276
 Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", (3.237566604725065, 1.012489110826635e-16, 11.61400119092393)), model.selection("SOLID", (3.223802337712571, 1.605864674679632e-16, 11.57493485456337))], model.selection("FACE", "PartSet/YOZ"), keepOriginal = True)
 
 ### Create Cut
-Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", (-0.02393444277354129, -2.619925842544883e-15, -2.580701826672511))], [model.selection("COMPOUND", (0, 0, 11.60508262087049))])
+Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", (0, 0, -2.581694))], [model.selection("COMPOUND", (0, 0, 11.60508262087049))])
 
 ### Create Fuse
-Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", (-0.02010673966564346, 1.098068506034238e-08, -2.591493279117804)), model.selection("COMPOUND", (0, 0, 11.54608275997197))], removeEdges = True)
+Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", (0, 0, -2.592352)), model.selection("COMPOUND", (0, 0, 11.54608275997197))], removeEdges = True)
 
 ### Create Plane
 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), 3.6, False)
@@ -485,10 +485,10 @@ Rotation_1 = model.addRotation(Part_1_doc, [model.selection("COMPOUND", "all-in-
 Rotation_2 = model.addRotation(Part_1_doc, [model.selection("SOLID", (5, 0, 1.2))], axis = model.selection("EDGE", "PartSet/OZ"), angle = -90)
 
 ### Create Fuse
-Fuse_2 = model.addFuse(Part_1_doc, [model.selection("SOLID", (-0.01517504751343968, 2.050041270815023e-08, -2.581926283264154)), model.selection("COMPOUND", (6.661338147750939e-16, -6.164784975045299, 1.5))], removeEdges = True)
+Fuse_2 = model.addFuse(Part_1_doc, [model.selection("SOLID", (0, 0, -2.582588)), model.selection("COMPOUND", (6.661338147750939e-16, -6.164784975045299, 1.5))], removeEdges = True)
 
 ### Create Cut
-Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", (-0.01123484393534465, -0.0370107755507461, -2.561989939908471))], [model.selection("SOLID", (6.683953801956267e-16, -5, 1.2))])
+Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", (0, -0.030528, -2.562454))], [model.selection("SOLID", (6.683953801956267e-16, -5, 1.2))])
 
 ### Create Group
 Group_1_objects = [model.selection("VERTEX", (-4.1398177019328, 0, 11.393656164374)),
@@ -708,7 +708,7 @@ Group_3_objects = [model.selection("FACE_4", (-2.517545082612181, -9.79305648457
 Group_3 = model.addGroup(Part_1_doc, "FACE", Group_3_objects)
 
 ### Create Partition
-Partition_1_objects = [model.selection("SOLID", (-0.01000739040276288, -0.02886888807097911, -2.568297753475152)),
+Partition_1_objects = [model.selection("SOLID", (0, -0.0201706, -2.568703)),
                        model.selection("FACE", "PartSet/XOZ"),
                        model.selection("FACE", "PartSet/YOZ")]
 Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True)
@@ -1090,7 +1090,7 @@ SketchLine_77.result().setName("SketchLine_118")
 SketchProjection_19 = Sketch_8.addProjection(model.selection("EDGE", (0, 5.790750667181333, 10.12202136327199)), False)
 SketchProjection_19.setName("SketchProjection_40")
 SketchProjection_19.result().setName("SketchProjection_40")
-SketchBSpline_1 = SketchProjection_19.createdFeature()
+SketchProj19_1 = SketchProjection_19.createdFeature()
 
 ### Create SketchProjection
 SketchProjection_20 = Sketch_8.addProjection(model.selection("EDGE", (0, 6.534999999999997, 9.721499999999999)), False)
@@ -1100,7 +1100,7 @@ SketchLine_78 = SketchProjection_20.createdFeature()
 SketchLine_78.setName("SketchLine_119")
 SketchLine_78.result().setName("SketchLine_119")
 Sketch_8.setCoincident(SketchLine_74.endPoint(), SketchLine_78.result())
-Sketch_8.setCoincident(SketchLine_74.startPoint(), SketchAPI_BSpline(SketchBSpline_1).startPoint())
+Sketch_8.setCoincident(SketchLine_74.startPoint(), SketchAPI_Arc(SketchProj19_1).startPoint())
 
 ### Create SketchLine
 SketchLine_79 = Sketch_8.addLine(5.676067550792231, 10.23944020672391, 5.829536340268943, 10.44848598250872)
@@ -1126,7 +1126,7 @@ Sketch_8.setCoincident(SketchLine_73.endPoint(), SketchLine_80.result())
 model.do()
 
 ### Create Revolution
-Revolution_9 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", (0, 5.830822237526045, 10.15645361216909))], model.selection("EDGE", "PartSet/OZ"), 360, 0, "Edges")
+Revolution_9 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", (0, 5.830822237526045, 10.3860737))], model.selection("EDGE", "PartSet/OZ"), 360, 0, "Edges")
 
 ### Create Split
 Split_4 = model.addSplit(Part_1_doc, [model.selection("COMPOUND", "all-in-Split_3")], [model.selection("COMPOUND", "all-in-Revolution_9")], keepSubResults = True)
index 6f2c304299c832eb1d417351ea31b0a92203da90..7553224a01bd140ee7e3bc0ae72457f9ec36b766 100644 (file)
@@ -237,8 +237,8 @@ model.do()
 Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("WIRE", (3.862008317343538, 0, 11.38077471561056))], model.selection("EDGE", (3.241000000000025, 0, 11.62374600149389)), 360, 0)
 Revolution_3 = model.addRevolution(Part_1_doc, [model.selection("WIRE", (4.212769702413368, 0, 11.10430922268928))], model.selection("EDGE", (3.241000000000025, 0, 11.62374600149389)), 360, 0)
 Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", (3.237566604725065, 0, 11.61400119092393)), model.selection("SOLID", (3.223802337712571, 0, 11.57493485456337))], model.selection("FACE", "PartSet/YOZ"), True)
-Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", (-0.02393444277354109, 0, -2.580701826672493))], [model.selection("COMPOUND", (0, 0, 11.60508262087049))])
-Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", (-0.0201067396659898, 0, -2.591493279115657)), model.selection("COMPOUND", (0, 0, 11.54608275997197))], removeEdges = True)
+Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", (0, 0, -2.5816942490967))], [model.selection("COMPOUND", (0, 0, 11.60508262087049))])
+Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", (0, 0, -2.5923523532641)), model.selection("COMPOUND", (0, 0, 11.54608275997197))], removeEdges = True)
 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), 3.6, False)
 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", (0, 0, 3.6)))
 SketchProjection_9 = Sketch_3.addProjection(model.selection("EDGE", (-6.188, 7.578114393123822e-16, -3.45)), True)
@@ -310,10 +310,10 @@ model.do()
 Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", (0, 0, 1.2))], model.selection(), 10, 0)
 Rotation_1_objects = [model.selection("SOLID", (5, 1.166200656118862e-18, 1.2)), model.selection("SOLID", (6.049686362669476, 0, 1.5)), model.selection("SOLID", (6.320976310013338, 0, 1.5))]
 Rotation_1 = model.addRotation(Part_1_doc, Rotation_1_objects, model.selection("EDGE", "PartSet/OZ"), -90)
-Fuse_2_objects_1 = [model.selection("SOLID", (-0.01517504751345233, 0, -2.581926283264175)), model.selection("SOLID", (0, -6.049686362669479, 1.5)), model.selection("SOLID", (0, -6.320976310013339, 1.5))]
+Fuse_2_objects_1 = [model.selection("SOLID", (0, 0, -2.5825883331029)), model.selection("SOLID", (0, -6.049686362669479, 1.5)), model.selection("SOLID", (0, -6.320976310013339, 1.5))]
 Fuse_2 = model.addFuse(Part_1_doc, Fuse_2_objects_1)
-Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", (-0.01017608298903453, -0.03890028204629473, -2.562040714294322))], [model.selection("SOLID", (0, -5, 1.2))])
-FusionFaces_1 = model.addFusionFaces(Part_1_doc, model.selection("SOLID", (-0.008741742572144908, -0.03112823644757425, -2.568357186681257)))
+Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", (0, -0.0305282901284, -2.5624546739218))], [model.selection("SOLID", (0, -5, 1.2))])
+FusionFaces_1 = model.addFusionFaces(Part_1_doc, model.selection("SOLID", (0, -0.020170634783153, -2.5687034308941)))
 
 model.end()
 
@@ -323,6 +323,6 @@ model.testNbSubShapes(FusionFaces_1, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(FusionFaces_1, GeomAPI_Shape.FACE, [47])
 model.testNbSubShapes(FusionFaces_1, GeomAPI_Shape.EDGE, [202])
 model.testNbSubShapes(FusionFaces_1, GeomAPI_Shape.VERTEX, [404])
-model.testResultsVolumes(FusionFaces_1, [612.7268292882])
+model.testResultsVolumes(FusionFaces_1, [612.727466])
 
 assert(model.checkPythonDump())
index 92dce387c8238de28cf47d9476ad0a140bbd7309..63251df6e86af6bd7d7c59df7ee39b304991e7d3 100644 (file)
@@ -57,7 +57,7 @@ SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchCircle_2.center(),
 ExtrusionCut_2.setNestedSketch(Sketch_2)
 model.do()
 Shape = ExtrusionCut_2.results()[0].resultSubShapePair()[0].shape()
-checkMiddlePoint(Shape, 4.999955838, 4.99999192, 4.677925562)
+checkMiddlePoint(Shape, 4.999955680, 4.99999176, 4.677925400)
 
 model.end()
 
index e1d9fcec08d390c959e4bf9b993719324688d562..1e7b13719d3910601e142b8d9eb10c68f5ed8b07 100644 (file)
@@ -57,7 +57,7 @@ SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchCircle_2.center(),
 ExtrusionFuse_2.setNestedSketch(Sketch_2)
 model.do()
 Shape = ExtrusionFuse_2.results()[0].resultSubShapePair()[0].shape()
-checkMiddlePoint(Shape, 4.97994427, 4.995857948, 4.254078314)
+checkMiddlePoint(Shape, 4.97994444, 4.995858131, 4.254077951)
 
 model.end()
 
index bb7aeec4fc0fed75a4362789ad8cec792f9730ef..3102dc3810bd8ac231c69f2dcae5df642bc439fc 100644 (file)
@@ -75,9 +75,9 @@ model.testNbResults(Extrusion_1, 1)
 model.testNbSubResults(Extrusion_1, [2])
 model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.SOLID, [2])
 model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [13])
-model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [61])
-model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [122])
-model.testResultsVolumes(Extrusion_1, [41289.10946])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [59])
+model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [118])
+model.testResultsVolumes(Extrusion_1, [41289.17344])
 
 # change radius of sketch circle and check failure
 ParamRCir.setValue(10)
index 5bcec48e5facd4f604e5fd4a4c0b5ccf6f8d5b72..2e64f771f0b1e2e0b68e0a9281fc7d0f75d494a9 100644 (file)
@@ -112,9 +112,7 @@ model.testNbSubShapes(Fillet_5, GeomAPI_Shape.FACE, [12])
 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.EDGE, [53])
 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.VERTEX, [106])
 model.testResultsVolumes(Fillet_5, [976.519471836586])
-refPoint = GeomAPI_Pnt(54.98720346, 4.918055722, 4.987203302)
-midPoint = Fillet_5.defaultResult().shape().middlePoint()
-assert(midPoint.distance(refPoint) < TOLERANCE)
+model.checkMiddlePoint(Fillet_5.defaultResult().shape(), 54.98720346, 4.918055722, 4.987203302)
 
 Fillet_6 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Partition_1_1_2/Modified_Face&Box_2_1/Top][Box_2_1/Front]"), model.selection("FACE", "Box_2_1/Right")], RADIUS_1, RADIUS_2)
 model.testNbResults(Fillet_6, 1)
@@ -124,9 +122,7 @@ model.testNbSubShapes(Fillet_6, GeomAPI_Shape.FACE, [23])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.EDGE, [95])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.VERTEX, [190])
 model.testResultsVolumes(Fillet_6, [1565.568094166])
-refPoint = GeomAPI_Pnt(2.7448, 2.7448, 5)
-midPoint = Fillet_6.defaultResult().shape().middlePoint()
-assert(midPoint.distance(refPoint) < TOLERANCE)
+model.checkMiddlePoint(Fillet_6.defaultResult().shape(), 2.58156073, 2.58159465, 4.83676073)
 
 Fillet_7 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[AngularCopy_1_1_1/MF:Rotated&Box_3_1/Back][AngularCopy_1_1_1/MF:Rotated&Box_3_1/Top]"), model.selection("FACE", "AngularCopy_1_1_2/MF:Rotated&Box_3_1/Left")], RADIUS_1, RADIUS_2)
 model.testNbResults(Fillet_7, 2)
index ff354c72588835f8695f16cc54871a322c2a091e..0d21109bc1a1f45e90060a629d89b9ad20766ced 100644 (file)
@@ -114,9 +114,7 @@ model.testNbSubShapes(Fillet_5, GeomAPI_Shape.FACE, [11])
 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.EDGE, [50])
 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.VERTEX, [100])
 model.testResultsVolumes(Fillet_5, [976.068565925934])
-refPoint = GeomAPI_Pnt(55.0654360945, 5.015632459, 4.985518188)
-midPoint = Fillet_5.defaultResult().shape().middlePoint()
-assert(midPoint.distance(refPoint) < TOLERANCE)
+model.checkMiddlePoint(Fillet_5.defaultResult().shape(), 55.0654360945, 5.015632459, 4.985518188)
 
 Recover_1 = model.addRecover(Part_1_doc, Fillet_5, [Compound_1.result()], True)
 Fillet_6 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Recover_1_1_7_2/Modified_Face&Box_2_1/Top][Recover_1_1_7_2/Modified_Face&Box_2_1/Front]"), model.selection("FACE", "Recover_1_1_7_2/Modified_Face&Box_2_1/Right")], RADIUS_1, RADIUS_2)
@@ -127,9 +125,7 @@ model.testNbSubShapes(Fillet_6, GeomAPI_Shape.FACE, [23])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.EDGE, [95])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.VERTEX, [190])
 model.testResultsVolumes(Fillet_6, [1565.568094166])
-refPoint = GeomAPI_Pnt(2.7448, 2.7448, 5)
-midPoint = Fillet_6.defaultResult().shape().middlePoint()
-assert(midPoint.distance(refPoint) < TOLERANCE)
+model.checkMiddlePoint(Fillet_6.defaultResult().shape(), 2.58156073, 2.58159465, 4.83676073)
 
 Recover_2 = model.addRecover(Part_1_doc, Fillet_6, [Compound_1.result()], True)
 Fillet_7 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Recover_2_1_8_1/Modified_Face&Box_3_1/Back][Recover_2_1_8_1/Modified_Face&Box_3_1/Top]"), model.selection("FACE", "Recover_2_1_8_2/Modified_Face&Box_3_1/Left")], RADIUS_1, RADIUS_2)
index b211223627dfec03828908e67fb24d3bf9096361..2726321f2e6d73c4bf44f9c59e01f31c0c92d1db 100644 (file)
@@ -112,9 +112,7 @@ model.testNbSubShapes(Fillet_5, GeomAPI_Shape.FACE, [12])
 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.EDGE, [53])
 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.VERTEX, [106])
 model.testResultsVolumes(Fillet_5, [976.519471836586])
-refPoint = GeomAPI_Pnt(54.98720346, 4.918055722, 4.987203302)
-midPoint = Fillet_5.defaultResult().shape().middlePoint()
-assert(midPoint.distance(refPoint) < TOLERANCE)
+model.checkMiddlePoint(Fillet_5.defaultResult().shape(), 54.98720346, 4.918055722, 4.987203302)
 
 Fillet_6 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Partition_1_1_2/Modified_Face&Box_2_1/Top][Box_2_1/Front]"), model.selection("FACE", "Box_2_1/Right")], RADIUS_1, RADIUS_2, keepSubResults = True)
 model.testNbResults(Fillet_6, 1)
@@ -124,9 +122,7 @@ model.testNbSubShapes(Fillet_6, GeomAPI_Shape.FACE, [23])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.EDGE, [95])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.VERTEX, [190])
 model.testResultsVolumes(Fillet_6, [1565.568094166])
-refPoint = GeomAPI_Pnt(2.7448, 2.7448, 5)
-midPoint = Fillet_6.defaultResult().shape().middlePoint()
-assert(midPoint.distance(refPoint) < TOLERANCE)
+model.checkMiddlePoint(Fillet_6.defaultResult().shape(), 2.58156073, 2.58159465, 4.83676073)
 
 Fillet_7 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[AngularCopy_1_1_1/MF:Rotated&Box_3_1/Back][AngularCopy_1_1_1/MF:Rotated&Box_3_1/Top]"), model.selection("FACE", "AngularCopy_1_1_2/MF:Rotated&Box_3_1/Left")], RADIUS_1, RADIUS_2, keepSubResults = True)
 model.testNbResults(Fillet_7, 1)
@@ -136,9 +132,8 @@ model.testNbSubShapes(Fillet_7, GeomAPI_Shape.FACE, [23])
 model.testNbSubShapes(Fillet_7, GeomAPI_Shape.EDGE, [98])
 model.testNbSubShapes(Fillet_7, GeomAPI_Shape.VERTEX, [196])
 model.testResultsVolumes(Fillet_7, [2976.0685684791988])
-refPoint = GeomAPI_Pnt(-20.9807621135, 42.806, 5)
-midPoint = Fillet_7.defaultResult().shape().middlePoint()
-assert(midPoint.distance(refPoint) < TOLERANCE)
+model.checkMiddlePoint(Fillet_7.defaultResult().shape(), -20.9807621135, 42.806, 5)
+
 model.end()
 
 model.begin()
index dba54c19249c50567907378da170937f0c5e1f18..be4f3885ffaac9617ed8e4547cb386e5819f15d4 100644 (file)
@@ -142,7 +142,7 @@ VOLUME = 5565.117188528191
 assertResult(Fillet_5)
 
 Fillet_6 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Compound_1_1_7_2/Modified_Face&Box_2_1/Top][Compound_1_1_7_2/Modified_Face&Box_2_1/Front]"), model.selection("FACE", "Compound_1_1_7_2/Modified_Face&Box_2_1/Right")], RADIUS_1, RADIUS_2, keepSubResults = True)
-REFERENCE[6] = GeomAPI_Pnt(2.7448, 2.7448, 5)
+REFERENCE[6] = GeomAPI_Pnt(2.58156073, 2.58159465, 4.83676073)
 NB_FACES += 6
 NB_EDGES += 29
 NB_VERTICES += 58
index 46f3e690acf3de1b39bf4c79abc74c1a1d3b622d..9c3f0dd05142a57b684ffc209c1b548808488b93 100644 (file)
@@ -44,7 +44,7 @@ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.result(), Sk
 RevolutionFuse_1.setNestedSketch(Sketch_1)
 model.do()
 Shape = RevolutionFuse_1.results()[0].resultSubShapePair()[0].shape()
-checkMiddlePoint(Shape, 5.000000277, 2.2088446592, 2.5458802675)
+checkMiddlePoint(Shape, 5, 2.2080639645, 2.5532186547)
 
 RevolutionFuse_1.setPlanesAndOffsets(model.selection(), 0, model.selection("FACE", "Box_1_1/Bottom"), 0)
 model.do()
index 56620ba270d5b0000bf5ff69af69871f610a07c5..4616adae89163d715ad597d3a21f5887db2a8236 100644 (file)
@@ -53,7 +53,7 @@ RevolutionFuse_1.setNestedSketch(Sketch_1)
 model.do()
 
 Shape = RevolutionFuse_1.results()[0].resultSubShapePair()[0].shape()
-checkMiddlePoint(Shape, 6.3892968486, 5.0, 6.3892968486)
+checkMiddlePoint(Shape, 6.3943254561, 5.0, 6.3943306351)
 
 model.end()
 
index e114d961c424f65983dd49dd54d98fb09ac0c045..3fb717b753f7e05d5b41f579de458b58c91e367f 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "GeomAPI_Shape.h"
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <GeomAPI_Pnt.h>
 #include <GeomAPI_Vertex.h>
 #include <GeomAPI_Edge.h>
@@ -60,8 +62,6 @@
 #include <sstream>
 #include <algorithm> // for std::transform
 
-#include <BRepTools.hxx>
-
 #define MY_SHAPE implPtr<TopoDS_Shape>()
 
 GeomAPI_Shape::GeomAPI_Shape()
@@ -810,8 +810,13 @@ bool GeomAPI_Shape::Comparator::operator()(const std::shared_ptr<GeomAPI_Shape>&
   const TopoDS_Shape& aShape2 = theShape2->impl<TopoDS_Shape>();
   bool isLess = aShape1.TShape() < aShape2.TShape();
   if (aShape1.TShape() == aShape2.TShape()) {
+#if OCC_VERSION_LARGE < 0x07080000
     Standard_Integer aHash1 = aShape1.Location().HashCode(IntegerLast());
     Standard_Integer aHash2 = aShape2.Location().HashCode(IntegerLast());
+#else
+    Standard_Integer aHash1 = aShape1.Location().HashCode();
+    Standard_Integer aHash2 = aShape2.Location().HashCode();
+#endif
     isLess = aHash1 < aHash2;
   }
   return isLess;
@@ -825,8 +830,13 @@ bool GeomAPI_Shape::ComparatorWithOri::operator()(
   const TopoDS_Shape& aShape2 = theShape2->impl<TopoDS_Shape>();
   bool isLess = aShape1.TShape() < aShape2.TShape();
   if (aShape1.TShape() == aShape2.TShape()) {
+#if OCC_VERSION_LARGE < 0x07080000
     Standard_Integer aHash1 = aShape1.Location().HashCode(IntegerLast());
     Standard_Integer aHash2 = aShape2.Location().HashCode(IntegerLast());
+#else
+    Standard_Integer aHash1 = aShape1.Location().HashCode();
+    Standard_Integer aHash2 = aShape2.Location().HashCode();
+#endif
     isLess = (aHash1 < aHash2) ||
              (aHash1 == aHash2 && aShape1.Orientation() < aShape2.Orientation());
   }
@@ -836,7 +846,11 @@ bool GeomAPI_Shape::ComparatorWithOri::operator()(
 int GeomAPI_Shape::Hash::operator()(const std::shared_ptr<GeomAPI_Shape>& theShape) const
 {
   const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
+#if OCC_VERSION_LARGE < 0x07080000
   return aShape.HashCode(IntegerLast());
+#else
+  return std::hash<TopoDS_Shape>{}(aShape);
+#endif
 }
 
 bool GeomAPI_Shape::Equal::operator()(const std::shared_ptr<GeomAPI_Shape>& theShape1,
@@ -845,8 +859,13 @@ bool GeomAPI_Shape::Equal::operator()(const std::shared_ptr<GeomAPI_Shape>& theS
   const TopoDS_Shape& aShape1 = theShape1->impl<TopoDS_Shape>();
   const TopoDS_Shape& aShape2 = theShape2->impl<TopoDS_Shape>();
 
+#if OCC_VERSION_LARGE < 0x07080000
   Standard_Integer aHash1 = aShape1.Location().HashCode(IntegerLast());
   Standard_Integer aHash2 = aShape2.Location().HashCode(IntegerLast());
+#else
+  Standard_Integer aHash1 = aShape1.Location().HashCode();
+  Standard_Integer aHash2 = aShape2.Location().HashCode();
+#endif
 
   return aShape1.TShape() == aShape2.TShape() && aHash1 == aHash2;
 }
index c3686dffd8273252a044488f2018ecfc45bca318..651b1b401f3074470b61887a468fe5a636bf2000 100644 (file)
@@ -31,6 +31,8 @@
 #include <XCAFDoc_ShapeTool.hxx>
 #include <XCAFDoc_ColorTool.hxx>
 #include <STEPCAFControl_Writer.hxx>
+#include <StepData_StepModel.hxx>
+#include <UnitsMethods.hxx>
 #include <Interface_Static.hxx>
 #include <Quantity_Color.hxx>
 
@@ -153,12 +155,22 @@ bool STEPExport(const std::string& theFileName,
     Interface_Static::SetCVal("xstep.cascade.unit", "M");
     Interface_Static::SetIVal("write.step.nonmanifold", 0); // 1 don't allow to export assemly tree
     Interface_Static::SetCVal("write.step.unit", "M");
-#else
+#elif OCC_VERSION_LARGE < 0x07080000
     STEPCAFControl_Writer aWriterTmp;
     Interface_Static::SetCVal("xstep.cascade.unit", "M");
     Interface_Static::SetIVal("write.step.nonmanifold", 0); // 1 don't allow to export assemly tree
     Interface_Static::SetCVal("write.step.unit", "M");
     STEPCAFControl_Writer aWriter;
+#else
+    STEPCAFControl_Writer aWriter;
+    Interface_Static::SetCVal("xstep.cascade.unit", "M");
+    Interface_Static::SetIVal("write.step.nonmanifold", 0); // 1 don't allow to export assemly tree
+    Interface_Static::SetCVal("write.step.unit", "M");
+    Handle(StepData_StepModel) aModel = aWriter.ChangeWriter().Model();
+    aModel->InternalParameters.InitFromStatic();
+    Standard_Integer aWriteUnitInt = Interface_Static::IVal("write.step.unit");
+    Standard_Real aWriteUnitReal = UnitsMethods::GetLengthFactorValue(aWriteUnitInt);
+    aModel->SetWriteLengthUnit(aWriteUnitReal);
 #endif
 
     auto aStatus = aWriter.Transfer(aDoc, STEPControl_AsIs);
index 8f12c9e9bb38e2969f8bf3314099916c9b2c9e59..e79ecdffbdeb2321dbb3d173e163d0346ef15846 100644 (file)
@@ -834,57 +834,6 @@ Standard_Integer GEOMAlgo_AlgoTools::RefineSDShapes
   //
   return 0;
 }
-//=======================================================================
-//function : BuildTriangulation
-//purpose  :
-//=======================================================================
-Standard_Boolean 
-  GEOMAlgo_AlgoTools::BuildTriangulation (const TopoDS_Shape& theShape)
-{
-  // calculate deflection
-  Standard_Real aDeviationCoefficient = 0.001;
-
-  Bnd_Box B;
-  BRepBndLib::Add(theShape, B);
-  Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
-  B.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-
-  Standard_Real dx = aXmax - aXmin, dy = aYmax - aYmin, dz = aZmax - aZmin;
-  Standard_Real aDeflection = Max(Max(dx, dy), dz) * aDeviationCoefficient * 4;
-  Standard_Real aHLRAngle = 0.349066;
-
-  // build triangulation
-  BRepMesh_IncrementalMesh Inc (theShape, aDeflection, Standard_False, aHLRAngle);
-
-  // check triangulation
-  bool isTriangulation = true;
-
-  TopExp_Explorer exp (theShape, TopAbs_FACE);
-  if (exp.More())
-  {
-    TopLoc_Location aTopLoc;
-    Handle(Poly_Triangulation) aTRF;
-    aTRF = BRep_Tool::Triangulation(TopoDS::Face(exp.Current()), aTopLoc);
-    if (aTRF.IsNull()) {
-      isTriangulation = false;
-    }
-  }
-  else // no faces, try edges
-  {
-    TopExp_Explorer expe (theShape, TopAbs_EDGE);
-    if (!expe.More()) {
-      isTriangulation = false;
-    }
-    else {
-      TopLoc_Location aLoc;
-      Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(TopoDS::Edge(expe.Current()), aLoc);
-      if (aPE.IsNull()) {
-        isTriangulation = false;
-      }
-    }
-  }
-  return isTriangulation;
-}
 
 //=======================================================================
 //function : IsCompositeShape
index 7a9a20cb3cbc66a4b90d113f22ff3ed27a1a8eea..5182ff75fe2d515dde3cddeba772c82e5f7f59a6 100644 (file)
@@ -90,9 +90,6 @@ class GEOMAlgo_AlgoTools  {
     static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS);
 
 
-  GEOMALGOIMPL_EXPORT
-    static Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS);
-
   GEOMALGOIMPL_EXPORT
     static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
                                            const Standard_Real aTol,
index c848ff86c53b51fcfe404d62b6d8c07acfa20903..68ad864de4c364eed7ccb98e16feef7b69029f98 100644 (file)
 
 #include <TopoDS_Shape.hxx>
 #include <Standard_Integer.hxx>
+
+#include <Basics_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE < 0x07080000
+
 #include <TColStd_MapIntegerHasher.hxx>
 
 #define _NCollection_MapHasher
@@ -39,6 +44,13 @@ typedef NCollection_IndexedDataMap<Standard_Integer, TopoDS_Shape, TColStd_MapIn
 
 #undef _NCollection_MapHasher
 
+#else
+
+#include <NCollection_IndexedDataMap.hxx>
+
+typedef NCollection_IndexedDataMap<Standard_Integer, TopoDS_Shape> GEOMAlgo_IndexedDataMapOfIntegerShape;
+
+#endif // OCC_VERSION_LARGE < 0x07080000
 
 
 #endif
index fa0c73ee7370b87a2a671ec4a12528ec9001eaf2..e4ceeb154231de212fe12cbae9f49f7c509fe350 100644 (file)
@@ -27,6 +27,8 @@
 //
 #include <GEOMAlgo_PassKeyShape.hxx>
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <TopTools_ListOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 
@@ -94,7 +96,11 @@ static
   Clear();
   myNbIds=1;
   myMap.Add(aS1);
+#if OCC_VERSION_LARGE < 0x07080000
   aHC=aS1.HashCode(myUpper);
+#else
+  aHC = std::hash<TopoDS_Shape>{}(aS1);
+#endif
   mySum=NormalizedId(aHC, myNbIds);
 }
 //=======================================================================
@@ -160,7 +166,11 @@ static
   myNbIds=myMap.Extent();
   for(i=1; i<=myNbIds; ++i) {
     const TopoDS_Shape& aS=myMap(i);
+#if OCC_VERSION_LARGE < 0x07080000
     aId=aS.HashCode(myUpper);
+#else
+    aId = std::hash<TopoDS_Shape>{}(aS);
+#endif
     aIdN=NormalizedId(aId, myNbIds);
     mySum+=aIdN;
   }
@@ -195,6 +205,7 @@ static
   }
   return !bRet;
 }
+#if OCC_VERSION_LARGE < 0x07080000
 //=======================================================================
 //function : HashCode
 //purpose  :
@@ -203,6 +214,7 @@ static
 {
   return ::HashCode(mySum, aUpper);
 }
+#endif
 //=======================================================================
 //function : Dump
 //purpose  :
index 420d9fdacf67f5164008ee6b1b41758c6c28fe64..6719f01f681dbb594922fac3c7c5c97b4e7789a2 100644 (file)
@@ -31,6 +31,8 @@
 
 #include <GeomAlgoImpl.h>
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <Standard.hxx>
 #include <Standard_Macro.hxx>
 #include <Standard_Integer.hxx>
@@ -92,8 +94,19 @@ class GEOMAlgo_PassKeyShape  {
   GEOMALGOIMPL_EXPORT
     Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aOther) const;
 
+#if OCC_VERSION_LARGE < 0x07080000
   GEOMALGOIMPL_EXPORT
     Standard_Integer HashCode(const Standard_Integer Upper) const;
+#endif
+
+  GEOMALGOIMPL_EXPORT
+  bool operator==(const GEOMAlgo_PassKeyShape& theOther) const
+  {
+    return IsEqual(theOther);
+  }
+
+  GEOMALGOIMPL_EXPORT
+  size_t GetSum() const { return (size_t)mySum; }
 
   GEOMALGOIMPL_EXPORT
     void Dump(const Standard_Integer aHex = 0) const;
index 7e1dccbc101906819a9a9e4b9940f8286696cdfa..e926870f966e1adc85d292571820a711bf184c56 100644 (file)
@@ -27,6 +27,8 @@
 //
 #include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
 
+#if OCC_VERSION_LARGE < 0x07080000
+
 //=======================================================================
 //function : HashCode
 //purpose  :
 {
   return aPK1.IsEqual(aPK2);
 }
+
+#else
+
+size_t GEOMAlgo_PassKeyShapeMapHasher::operator()(const GEOMAlgo_PassKeyShape& aPKey) const
+{
+  return aPKey.GetSum();
+}
+
+bool GEOMAlgo_PassKeyShapeMapHasher::operator()(const GEOMAlgo_PassKeyShape& aPKey1,
+                                                const GEOMAlgo_PassKeyShape& aPKey2) const
+{
+  return aPKey1.IsEqual(aPKey2);
+}
+
+#endif // OCC_VERSION_LARGE < 0x07080000
index d6aafc70d782968ca8aba0fd091f4c8646d9a126..57e4564487884ad28c5c470291241a885ccb28df 100644 (file)
@@ -36,6 +36,8 @@
 #include <Standard_Boolean.hxx>
 #include <GEOMAlgo_PassKeyShape.hxx>
 
+#include <Basics_OCCTVersion.hxx>
+
 //=======================================================================
 //class    : GEOMAlgo_PassKeyShapeMapHasher
 //purpose  :
@@ -43,6 +45,7 @@
 class GEOMAlgo_PassKeyShapeMapHasher
 {
  public:
+#if OCC_VERSION_LARGE < 0x07080000
   GEOMALGOIMPL_EXPORT
     static  Standard_Integer HashCode(const GEOMAlgo_PassKeyShape& aPKey,
                                       const Standard_Integer Upper) ;
@@ -50,5 +53,13 @@ class GEOMAlgo_PassKeyShapeMapHasher
   GEOMALGOIMPL_EXPORT
     static  Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aPKey1,
                                      const GEOMAlgo_PassKeyShape& aPKey2) ;
+#else
+  GEOMALGOIMPL_EXPORT
+  size_t operator()(const GEOMAlgo_PassKeyShape& aPKey) const;
+
+  GEOMALGOIMPL_EXPORT
+  bool operator()(const GEOMAlgo_PassKeyShape& aPKey1,
+                  const GEOMAlgo_PassKeyShape& aPKey2) const;
+#endif // OCC_VERSION_LARGE < 0x07080000
 };
 #endif
index 9a9fc1454bc590d2d3dafc32b93fd038a2a93fab..0c48c192c373d7b54aa417602fcbfa8b26ae1128 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <Model_BodyBuilder.h>
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <Locale_Convert.h>
 
 #include <Model_Data.h>
@@ -938,7 +940,11 @@ int findAmbiguities(const TopoDS_Shape&           theShapeIn,
       continue;
     Standard_Integer anID = 0;
     for(TopTools_ListIteratorOfListOfShape aFaceIt(ancestors); aFaceIt.More(); aFaceIt.Next()) {
+#if OCC_VERSION_LARGE < 0x07080000
       anID ^= HashCode(aFaceIt.ChangeValue(), 1990657); // Pierpont prime
+#else
+      anID ^= ((std::hash<TopoDS_Shape>{}(aFaceIt.ChangeValue()) & IntegerLast()) % 1990657 + 1); // Pierpont prime
+#endif
     }
     if (aFacesIDs.IsBound(anID)) { // there found same edge, check they really have same faces
       const NCollection_List<TopoDS_Shape>& aSameFaces1 =
index 1927466b408559dc09e5cd4acaa5963af7e787bd..5f313a85519112845c586862b6ada79476d43b7b 100644 (file)
@@ -690,7 +690,8 @@ void Model_Document::compactNested()
 /// references and Boolean and Integer Arrays for the current moment.
 static bool isEqualContent(Handle(TDF_Attribute) theAttr1, Handle(TDF_Attribute) theAttr2)
 {
-  if (Standard_GUID::IsEqual(theAttr1->ID(), TDF_Reference::GetID())) { // reference
+  Standard_GUID aGUID1 = theAttr1->ID();
+  if (aGUID1 == TDF_Reference::GetID()) { // reference
     Handle(TDF_Reference) aRef1 = Handle(TDF_Reference)::DownCast(theAttr1);
     Handle(TDF_Reference) aRef2 = Handle(TDF_Reference)::DownCast(theAttr2);
     if (aRef1.IsNull() && aRef2.IsNull())
@@ -698,7 +699,7 @@ static bool isEqualContent(Handle(TDF_Attribute) theAttr1, Handle(TDF_Attribute)
     if (aRef1.IsNull() || aRef2.IsNull())
       return false;
     return aRef1->Get().IsEqual(aRef2->Get()) == Standard_True;
-  } else if (Standard_GUID::IsEqual(theAttr1->ID(), TDataStd_BooleanArray::GetID())) {
+  } else if (aGUID1 == TDataStd_BooleanArray::GetID()) {
     Handle(TDataStd_BooleanArray) anArr1 = Handle(TDataStd_BooleanArray)::DownCast(theAttr1);
     Handle(TDataStd_BooleanArray) anArr2 = Handle(TDataStd_BooleanArray)::DownCast(theAttr2);
     if (anArr1.IsNull() && anArr2.IsNull())
@@ -716,7 +717,7 @@ static bool isEqualContent(Handle(TDF_Attribute) theAttr1, Handle(TDF_Attribute)
       }
       return true;
     }
-  } else if (Standard_GUID::IsEqual(theAttr1->ID(), TDataStd_IntegerArray::GetID())) {
+  } else if (aGUID1 == TDataStd_IntegerArray::GetID()) {
     Handle(TDataStd_IntegerArray) anArr1 = Handle(TDataStd_IntegerArray)::DownCast(theAttr1);
     Handle(TDataStd_IntegerArray) anArr2 = Handle(TDataStd_IntegerArray)::DownCast(theAttr2);
     if (anArr1.IsNull() && anArr2.IsNull())
@@ -734,7 +735,7 @@ static bool isEqualContent(Handle(TDF_Attribute) theAttr1, Handle(TDF_Attribute)
         }
       return true;
     }
-  } else if (Standard_GUID::IsEqual(theAttr1->ID(), TDataStd_ReferenceArray::GetID())) {
+  } else if (aGUID1 == TDataStd_ReferenceArray::GetID()) {
     Handle(TDataStd_ReferenceArray) anArr1 = Handle(TDataStd_ReferenceArray)::DownCast(theAttr1);
     Handle(TDataStd_ReferenceArray) anArr2 = Handle(TDataStd_ReferenceArray)::DownCast(theAttr2);
     if (anArr1.IsNull() && anArr2.IsNull())
@@ -752,7 +753,7 @@ static bool isEqualContent(Handle(TDF_Attribute) theAttr1, Handle(TDF_Attribute)
         }
       return true;
     }
-  } else if (Standard_GUID::IsEqual(theAttr1->ID(), TDataStd_ReferenceList::GetID())) {
+  } else if (aGUID1 == TDataStd_ReferenceList::GetID()) {
     Handle(TDataStd_ReferenceList) aList1 = Handle(TDataStd_ReferenceList)::DownCast(theAttr1);
     Handle(TDataStd_ReferenceList) aList2= Handle(TDataStd_ReferenceList)::DownCast(theAttr2);
     if (aList1.IsNull() && aList2.IsNull())
@@ -768,7 +769,7 @@ static bool isEqualContent(Handle(TDF_Attribute) theAttr1, Handle(TDF_Attribute)
         return false;
     }
     return !aLIter1.More() && !aLIter2.More(); // both lists are with the same size
-  } else if (Standard_GUID::IsEqual(theAttr1->ID(), TDF_TagSource::GetID())) {
+  } else if (aGUID1 == TDF_TagSource::GetID()) {
     return true; // it just for created and removed feature: nothing is changed
   }
   return false;
@@ -797,7 +798,7 @@ static bool isEmptyTransaction(const Handle(TDocStd_Document)& theDoc) {
             continue; // attribute is not changed actually
           }
         } else
-          if (Standard_GUID::IsEqual(anADelta->Attribute()->ID(), TDataStd_AsciiString::GetID())) {
+          if (anADelta->Attribute()->ID() == TDataStd_AsciiString::GetID()) {
             continue; // error message is disappeared
         }
       }
index 7aa4407bfc13dc8c022856f0dee1fc5054c5cb8c..544b5bef8bba5879774fbbc71db22b6de98cccef 100644 (file)
@@ -18,6 +18,9 @@
 //
 
 #include <Model_Objects.h>
+
+#include <Basics_OCCTVersion.hxx>
+
 #include <Model_Data.h>
 #include <Model_Document.h>
 #include <Model_Events.h>
 #include <TDataStd_HLabelArray1.hxx>
 #include <TDF_Reference.hxx>
 #include <TDF_ChildIDIterator.hxx>
-#include <TDF_LabelMapHasher.hxx>
 #include <TDF_LabelMap.hxx>
 #include <TDF_ListIteratorOfLabelList.hxx>
 
+#if OCC_VERSION_LARGE < 0x07080000
+
+#include <TDF_LabelMapHasher.hxx>
 // for TDF_Label map usage
 static Standard_Integer HashCode(const TDF_Label& theLab, const Standard_Integer theUpper);
 static Standard_Boolean IsEqual(const TDF_Label& theLab1, const TDF_Label& theLab2);
 
+#endif
+
 int kUNDEFINED_FEATURE_INDEX = -1;
 
 static const std::string& groupNameFoldering(const std::string& theGroupID,
@@ -1491,7 +1498,7 @@ std::shared_ptr<ModelAPI_Folder> Model_Objects::findFolder(
   int aRefIndex = aRefs->Lower();
   for(; aRefIndex <= aRefs->Upper(); ++aRefIndex) { // iterate all existing features
     TDF_Label aCurLabel = aRefs->Value(aRefIndex);
-    if (IsEqual(aCurLabel, aFirstFeatureLabel))
+    if (aCurLabel.IsEqual(aFirstFeatureLabel))
       break; // no need to continue searching
 
     // searching the folder below, just continue to search last feature from the list
@@ -1502,7 +1509,7 @@ std::shared_ptr<ModelAPI_Folder> Model_Objects::findFolder(
     //               because the folder may end by the feature which is
     //               neither a sub-feature nor a feature in history.
     if (!aLastFeatureInFolder.IsNull()) {
-      if (IsEqual(aCurLabel, aLastFeatureInFolder))
+      if (aCurLabel.IsEqual(aLastFeatureInFolder))
         aLastFeatureInFolder.Nullify(); // the last feature in the folder is achieved
       continue;
     }
@@ -2112,6 +2119,7 @@ std::shared_ptr<ModelAPI_Feature> Model_Objects::internalFeature(const int theIn
   return FeaturePtr(); // invalid
 }
 
+#if OCC_VERSION_LARGE < 0x07080000
 Standard_Integer HashCode(const TDF_Label& theLab, const Standard_Integer theUpper)
 {
   return TDF_LabelMapHasher::HashCode(theLab, theUpper);
@@ -2120,3 +2128,4 @@ Standard_Boolean IsEqual(const TDF_Label& theLab1, const TDF_Label& theLab2)
 {
   return TDF_LabelMapHasher::IsEqual(theLab1, theLab2);
 }
+#endif
index 604b90f665dbb163b7bd6566029be1f6eca7181c..d093526d33711ecd5dfbf871b58485526bde2596 100644 (file)
@@ -482,7 +482,7 @@ model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.FACE, [44])
 model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.EDGE, [192])
 model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.VERTEX, [384])
-model.testResultsVolumes(Symmetry_2, [0.714262940088946862715602037])
+model.testResultsVolumes(Symmetry_2, [0.71426763])
 
 from ModelAPI import *
 aFactory = ModelAPI_Session.get().validators()
index e088f7c749723377713df2a22937eb330ffa068c..2b42350a2dd481254f5ac8a55f4a4c0fbd25328c 100644 (file)
@@ -473,3 +473,14 @@ def checkFeaturesValidity(thePartDoc):
     assert error == '', "The feature {0} is in error: {1}".format(name, error)
     # raise an error if the the feature is not valid (without error message)
     assert aFactory.validate(feature), "The feature {0} is in error.".format(name)
+
+def checkMiddlePoint(theShape, theX, theY, theZ, theTolerance = 1.e-7):
+  """ Check coordinates of middle point of the given shape.
+  :param theShape         the shape to check
+  :param theX, theY, theZ the expected coordinates
+  :param theTolerance     comparison tolerance
+  """
+  assert(theShape is not None)
+  midPoint = theShape.middlePoint()
+  isEqual = math.fabs(midPoint.x() - theX) < theTolerance and math.fabs(midPoint.y() - theY) < theTolerance and math.fabs(midPoint.z() - theZ) < theTolerance
+  assert(isEqual), "Middle point: actual ({}, {}, {}) != expected ({}, {}, {})".format(midPoint.x(), midPoint.y(), midPoint.z(), theX, theY, theZ)
index ac38f2b733791185766f3a42fd8916b08560b5e6..f414caccb4574dd9ff64d764fba8d09a35338fbd 100644 (file)
@@ -19,7 +19,7 @@
 
 ENABLE_TESTING()
 
-file(GLOB pyFiles "*.py")
+file(GLOB pyFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.py")
 
 SET(RESTRICTED_ROOT_DIR $ENV{RESTRICTED_ROOT_DIR} CACHE PATH "Path to the restricted repository")
 
@@ -66,3 +66,22 @@ foreach(eachFilePath ${pyFiles};${pyFilesRestr})
 endforeach(eachFilePath ${ARGN})
 
 ADD_CUSTOM_TARGET(run_models_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -L "models_tests")
+
+include(tests.set)
+
+if(${HAVE_SALOME})
+  enable_testing()
+  set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/TestModels")
+  
+  install(FILES CTestTestfileInstall.cmake
+  DESTINATION ${TEST_INSTALL_DIRECTORY}
+  RENAME CTestTestfile.cmake)
+  install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+  set(TMP_TESTS_NAMES)
+  foreach(tfile ${TEST_NAMES})
+    list(APPEND TMP_TESTS_NAMES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile})
+  endforeach(tfile ${TEST_NAMES})
+
+  install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
diff --git a/test.models/CTestTestfileInstall.cmake b/test.models/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..a97b7ea
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2021-2024  CEA, EDF
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+  set(TEST_NAME ${COMPONENT_NAME}_Models_${tfile})
+  add_test(${TEST_NAME} python ${tfile})
+  set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+endforeach()
index 2148d2444f3f7cf915cd30627fed1efb7dcce82d..1d8e39387f480acf39251409900aab6d11a2fecc 100644 (file)
@@ -832,7 +832,7 @@ ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Ske
 # Test reexecution after parameter change
 Parameter_BPS.setValue(3)
 model.do()
-model.testResultsVolumes(ExtrusionCut_3, [154096.039414040715200826525688171])
+model.testResultsVolumes(ExtrusionCut_3, [154095.923043997521745041012763977])
 Parameter_BPS.setValue(6)
 model.end()
 
@@ -844,6 +844,6 @@ model.testNbSubShapes(ExtrusionCut_3, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(ExtrusionCut_3, GeomAPI_Shape.FACE, [70])
 model.testNbSubShapes(ExtrusionCut_3, GeomAPI_Shape.EDGE, [326])
 model.testNbSubShapes(ExtrusionCut_3, GeomAPI_Shape.VERTEX, [652])
-model.testResultsVolumes(ExtrusionCut_3, [156878.517351274640532210469245911])
+model.testResultsVolumes(ExtrusionCut_3, [156878.400948128226445987820625305])
 
 assert(model.checkPythonDump())
index 72785b370f298eb1f7a8312c8714e8e2e100f996..2012270a32caf5e5cd375ba4fc91d1aa934e9a83 100644 (file)
@@ -588,7 +588,7 @@ ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Ske
 # Test reexecution after parameter change
 Parameter_H.setValue(14)
 model.do()
-model.testResultsVolumes(ExtrusionCut_2, [10205.25717])
+model.testResultsVolumes(ExtrusionCut_2, [10205.255530970627660281024873257])
 Parameter_H.setValue(12)
 model.end()
 
@@ -598,8 +598,8 @@ model.testNbResults(ExtrusionCut_2, 1)
 model.testNbSubResults(ExtrusionCut_2, [0])
 model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.FACE, [551])
-model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.EDGE, [3481])
-model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.VERTEX, [6962])
-model.testResultsVolumes(ExtrusionCut_2, [10362.3368])
+model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.EDGE, [3473])
+model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.VERTEX, [6946])
+model.testResultsVolumes(ExtrusionCut_2, [10362.335163650115646305494010448])
 
 assert(model.checkPythonDump())
index c7c7dbbdffdf60e79869e628fa8b46d1c6017fd7..2f089084af41582109e43af7be849543a8b5608c 100644 (file)
@@ -795,7 +795,7 @@ ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_4_objects_1, mod
 # Test reexecution after parameter change
 Parameter_R.setValue(5)
 model.do()
-model.testResultsVolumes(ExtrusionCut_4, [502616.749082866765093058347702026])
+model.testResultsVolumes(ExtrusionCut_4, [502617.059752906498033553361892700])
 Parameter_R.setValue(3)
 model.end()
 
@@ -807,6 +807,6 @@ model.testNbSubShapes(ExtrusionCut_4, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(ExtrusionCut_4, GeomAPI_Shape.FACE, [81])
 model.testNbSubShapes(ExtrusionCut_4, GeomAPI_Shape.EDGE, [406])
 model.testNbSubShapes(ExtrusionCut_4, GeomAPI_Shape.VERTEX, [812])
-model.testResultsVolumes(ExtrusionCut_4, [502903.236060981987975537776947021])
+model.testResultsVolumes(ExtrusionCut_4, [502903.528831139323301613330841064])
 
 assert(model.checkPythonDump())
index dd50eb01a38bdcc7b091b60fa3e4a0d6298a5f97..9425557af6a1fe1ac70ce7ccdd78dbb6d8ea2054 100644 (file)
@@ -208,7 +208,7 @@ model.testNbSubShapes(Revolution_1, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Revolution_1, GeomAPI_Shape.FACE, [35])
 model.testNbSubShapes(Revolution_1, GeomAPI_Shape.EDGE, [114])
 model.testNbSubShapes(Revolution_1, GeomAPI_Shape.VERTEX, [228])
-model.testResultsVolumes(Revolution_1, [29055.346994571114919381216168404])
+model.testResultsVolumes(Revolution_1, [29055.379817395245481748133897781])
 
 Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/OY"), model.selection("VERTEX", "Sketch_1/SketchPoint_2"), True)
 
@@ -232,7 +232,7 @@ model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.FACE, [36])
 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.EDGE, [132])
 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.VERTEX, [264])
-model.testResultsVolumes(ExtrusionCut_1, [28943.115000463178148493170738220])
+model.testResultsVolumes(ExtrusionCut_1, [28943.145978945081878919154405594])
 
 Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_21][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_20]")], "Fillet1")
 # check Fillet_1
@@ -242,7 +242,7 @@ model.testNbSubShapes(Fillet_1, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.FACE, [37])
 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.EDGE, [136])
 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.VERTEX, [272])
-model.testResultsVolumes(Fillet_1, [28340.280766451105591841042041779])
+model.testResultsVolumes(Fillet_1, [28340.312197727056627627462148666])
 
 Fillet_2 = model.addFillet(Part_1_doc, [model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_31"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_29"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_27"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_25")], "Fillet2")
 # check Fillet_2
@@ -252,7 +252,7 @@ model.testNbSubShapes(Fillet_2, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Fillet_2, GeomAPI_Shape.FACE, [45])
 model.testNbSubShapes(Fillet_2, GeomAPI_Shape.EDGE, [168])
 model.testNbSubShapes(Fillet_2, GeomAPI_Shape.VERTEX, [336])
-model.testResultsVolumes(Fillet_2, [28339.715350479829794494435191154])
+model.testResultsVolumes(Fillet_2, [28339.746210508856165688484907150])
 
 Fillet_3 = model.addFillet(Part_1_doc, [model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_19")], "Fillet3")
 # check Fillet_3
@@ -262,7 +262,7 @@ model.testNbSubShapes(Fillet_3, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Fillet_3, GeomAPI_Shape.FACE, [47])
 model.testNbSubShapes(Fillet_3, GeomAPI_Shape.EDGE, [176])
 model.testNbSubShapes(Fillet_3, GeomAPI_Shape.VERTEX, [352])
-model.testResultsVolumes(Fillet_3, [28338.609830057110229972749948502])
+model.testResultsVolumes(Fillet_3, [28338.641671687521011335775256157])
 
 Fillet_4 = model.addFillet(Part_1_doc, [model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_11")], "Fillet3")
 # check Fillet_4
@@ -272,7 +272,7 @@ model.testNbSubShapes(Fillet_4, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Fillet_4, GeomAPI_Shape.FACE, [49])
 model.testNbSubShapes(Fillet_4, GeomAPI_Shape.EDGE, [184])
 model.testNbSubShapes(Fillet_4, GeomAPI_Shape.VERTEX, [368])
-model.testResultsVolumes(Fillet_4, [28347.280717884430487174540758133])
+model.testResultsVolumes(Fillet_4, [28347.312910383880080189555883408])
 
 Fillet_5 = model.addFillet(Part_1_doc, [model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_9")], "Fillet2")
 # check Fillet_5
@@ -282,7 +282,7 @@ model.testNbSubShapes(Fillet_5, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.FACE, [51])
 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.EDGE, [192])
 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.VERTEX, [384])
-model.testResultsVolumes(Fillet_5, [28343.655816829603281803429126740])
+model.testResultsVolumes(Fillet_5, [28343.688540020142681896686553955])
 
 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [], model.selection(), "D4_out/2", "D4_out/2", [model.selection("SOLID", "Fillet_5_1")])
 Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
@@ -330,7 +330,7 @@ model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.FACE, [55])
 model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.EDGE, [214])
 model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.VERTEX, [428])
-model.testResultsVolumes(ExtrusionCut_2, [28317.789547563083033310249447823])
+model.testResultsVolumes(ExtrusionCut_2, [28317.815904764789593173190951347])
 
 Folder_1 = model.addFolder(Part_1_doc, Fillet_1, Fillet_5)
 
@@ -386,9 +386,9 @@ model.testNbResults(RevolutionCut_1, 1)
 model.testNbSubResults(RevolutionCut_1, [0])
 model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.FACE, [59])
-model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.EDGE, [242])
-model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.VERTEX, [484])
-model.testResultsVolumes(RevolutionCut_1, [28297.246041844206047244369983673])
+model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.EDGE, [240])
+model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.VERTEX, [480])
+model.testResultsVolumes(RevolutionCut_1, [28297.263961183885840000584721565])
 
 RevolutionCut_2 = model.addRevolutionCut(Part_1_doc, [], model.selection("EDGE", "PartSet/OX"), 360, 0, [model.selection("SOLID", "RevolutionCut_1_1")])
 Sketch_5 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
@@ -420,9 +420,9 @@ model.testNbResults(RevolutionCut_2, 1)
 model.testNbSubResults(RevolutionCut_2, [0])
 model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.FACE, [60])
-model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.EDGE, [246])
-model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.VERTEX, [492])
-model.testResultsVolumes(RevolutionCut_2, [28288.868184623894194373860955238])
+model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.EDGE, [244])
+model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.VERTEX, [488])
+model.testResultsVolumes(RevolutionCut_2, [28288.886350037606462137773633003])
 
 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), 0, False)
 Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "RevolutionCut_2_1"), model.selection("FACE", "Plane_2")])
@@ -431,8 +431,8 @@ model.testNbResults(Partition_1, 1)
 model.testNbSubResults(Partition_1, [2])
 model.testNbSubShapes(Partition_1, GeomAPI_Shape.SOLID, [2])
 model.testNbSubShapes(Partition_1, GeomAPI_Shape.FACE, [127])
-model.testNbSubShapes(Partition_1, GeomAPI_Shape.EDGE, [738])
-model.testNbSubShapes(Partition_1, GeomAPI_Shape.VERTEX, [1476])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.EDGE, [736])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.VERTEX, [1472])
 model.testResultsVolumes(Partition_1, [28288.886256640704232268035411835])
 
 Result = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPSOLID", "Partition_1_1"))
@@ -471,8 +471,8 @@ model.testNbResults(Result, 1)
 model.testNbSubResults(Result, [0])
 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
-model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
-model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
+model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [366])
+model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
 model.testResultsVolumes(Result, [22968.704503291784931207075715065])
 
 Param_Drill1Loc.setValue(15)
@@ -481,8 +481,8 @@ model.testNbResults(Result, 1)
 model.testNbSubResults(Result, [0])
 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
-model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
-model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
+model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [366])
+model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
 model.testResultsVolumes(Result, [22969.259323538735770853236317635])
 
 Param_Drill1Holder.setValue(16)
@@ -490,8 +490,8 @@ model.do()
 model.testNbSubResults(Result, [0])
 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
-model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
-model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
+model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [366])
+model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
 model.testResultsVolumes(Result, [22969.553506208951148437336087227])
 
 Param_Drill2Loc.setValue(7.5)
@@ -500,8 +500,8 @@ model.testNbResults(Result, 1)
 model.testNbSubResults(Result, [0])
 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
-model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
-model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
+model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [366])
+model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
 model.testResultsVolumes(Result, [22969.986144881491782143712043762])
 
 Param_Drill2Radius.setValue(1.9)
@@ -510,8 +510,8 @@ model.testNbResults(Result, 1)
 model.testNbSubResults(Result, [0])
 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
-model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
-model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
+model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [366])
+model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
 model.testResultsVolumes(Result, [22956.808010807682876475155353546])
 
 Param_Fillet1.setValue(3)
diff --git a/test.models/tests.set b/test.models/tests.set
new file mode 100644 (file)
index 0000000..198d6a5
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright (C) 2021-2024  CEA, EDF
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SET(TEST_NAMES
+            angle30.py
+            bearing_puller.py
+            bobine_film_reel.py
+            bracket32.py
+            bushing.py
+            case24.py
+            clothespin.py
+            coronavirus.py
+            CSWA.py
+            ecran.py
+            flange.py
+            gear.py
+            idler_plate.py
+            piece_02.py
+            piece_09.py
+            piece_12.py
+            plug.py
+            sprocket.py
+            stair_with_cycle.py
+            visor_support.py
+            wheel_rim.py
+)
index 6bd3b6fd1cdf6aefae25e7e883a07000c068dd58..4be5eafc6348a31d2cd336b4a1ac57b61420d06b 100644 (file)
@@ -360,7 +360,7 @@ model.testNbSubShapes(Fillet_1, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.FACE, [5])
 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.EDGE, [18])
 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.VERTEX, [36])
-model.testResultsVolumes(Fillet_1, [13.34526088678])
+model.testResultsVolumes(Fillet_1, [13.345256419562657512756231881])
 
 Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Fillet_1_1")], model.selection("FACE", "PartSet/YOZ"), keepOriginal = True, keepSubResults = True)
 Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Chamfer_1_1")], [model.selection("COMPOUND", "Symmetry_1_1")], keepSubResults = True)
index dd35a62f726a0a042372f11322148787f20b7636..9fda02a26426a83a71a7296987db38f97ff271c6 100644 (file)
@@ -213,6 +213,6 @@ model.testNbSubShapes(Boolean_1, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Boolean_1, GeomAPI_Shape.FACE, [35])
 model.testNbSubShapes(Boolean_1, GeomAPI_Shape.EDGE, [162])
 model.testNbSubShapes(Boolean_1, GeomAPI_Shape.VERTEX, [324])
-model.testResultsVolumes(Boolean_1, [2052731.260104598477482795715332031])
+model.testResultsVolumes(Boolean_1, [2052720.339581762673333287239074707])
 
 assert(model.checkPythonDump())