From f305d203baea0aeb8f88b0df6e5cc7fff81db5e9 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 25 Feb 2020 12:07:01 +0300 Subject: [PATCH] Adjust test cases. --- src/FeaturesPlugin/Test/Test2686.py | 10 +++++----- src/FeaturesPlugin/Test/Test2738.py | 2 +- .../Test/TestExtrusionCut_ByPlanesAndOffsets.py | 4 ++-- src/FeaturesPlugin/Test/TestExtrusionCut_BySize.py | 6 +++--- src/FeaturesPlugin/Test/TestExtrusionCut_ThroughAll.py | 6 +++--- .../Test/TestExtrusionFuse_ByPlanesAndOffsets.py | 4 ++-- src/FeaturesPlugin/Test/TestExtrusionFuse_BySize.py | 6 +++--- .../Test/TestExtrusionFuse_ThroughAll.py | 2 +- .../Test/TestMultiRotation_MultiLevelCompound_v95_4.py | 1 + .../TestMultiTranslation_MultiLevelCompound_v95_4.py | 1 + src/FeaturesPlugin/Test/TestRevolutionCut_ByAngle.py | 2 +- .../Test/TestRevolutionCut_ByPlanesAndOffsets.py | 4 ++-- .../Test/TestRevolutionCut_ThroughAll.py | 2 +- src/FeaturesPlugin/Test/TestRevolutionFuse_ByAngle.py | 4 ++-- .../Test/TestRevolutionFuse_ByPlanesAndOffsets.py | 4 ++-- .../Test/TestRevolutionFuse_ThroughAll.py | 2 +- src/FeaturesPlugin/Test/TestRevolution_ByAngle.py | 4 ++-- src/SketchPlugin/Test/TestChangeSketchPlane1.py | 4 ++-- src/SketchPlugin/Test/TestChangeSketchPlane2.py | 8 ++++---- 19 files changed, 39 insertions(+), 37 deletions(-) diff --git a/src/FeaturesPlugin/Test/Test2686.py b/src/FeaturesPlugin/Test/Test2686.py index 3598a7f65..05a18d9fd 100644 --- a/src/FeaturesPlugin/Test/Test2686.py +++ b/src/FeaturesPlugin/Test/Test2686.py @@ -171,11 +171,11 @@ SketchConstraintDistance_1 = Sketch_2.setDistance(SketchCircle_4.center(), Sketc SketchConstraintDistance_2 = Sketch_2.setDistance(SketchCircle_4.center(), SketchLine_18.endPoint(), 5.2, True) model.do() ExtrusionCut_1_objects_1 = [model.selection("WIRE", GeomAPI_Pnt(2.927018127601872, 2.325000000002457, 4)), model.selection("WIRE", GeomAPI_Pnt(1.848443178812738, 3.921770223029927, 4)), model.selection("WIRE", GeomAPI_Pnt(3.995574230355639, 0.2028301512488117, 4)), model.selection("WIRE_2", GeomAPI_Pnt(-3.148443178812729, 3.921770223029919, 4)), model.selection("WIRE", GeomAPI_Pnt(-5.127018127597639, 2.325000000000002, 4)), model.selection("WIRE_2", GeomAPI_Pnt(-5.29557423035565, 0.2028301512488154, 4)), model.selection("FACE", GeomAPI_Pnt(7.188472039842964e-12, -4.650000000090492, 4)), model.selection("FACE", GeomAPI_Pnt(4.259590630302756, -2.982597469025441, 4)), model.selection("FACE", GeomAPI_Pnt(3.276608177155966, -2.294305745404186, 4))] -ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_1_objects_1, model.selection(), model.selection("FACE", GeomAPI_Pnt(0, 0, 0)), 0, model.selection(), 0, [model.selection("SOLID", GeomAPI_Pnt(-7.561538823095622e-16, 6.008767139946657e-17, 2.62684985301323))]) +ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_1_objects_1, model.selection(), model.selection("FACE", GeomAPI_Pnt(0, 0, 0)), 0, model.selection(), 0, [model.selection("SOLID", GeomAPI_Pnt(0, 0, 2.542710267975591))]) ExtrusionCut_2_objects_1 = [model.selection("WIRE", GeomAPI_Pnt(-5.44557423035565, 0.2028301512488154, 4)), model.selection("WIRE", GeomAPI_Pnt(-3.298443178812729, 3.921770223029919, 4)), model.selection("WIRE", GeomAPI_Pnt(1.698443178812738, 3.921770223029927, 4)), model.selection("WIRE", GeomAPI_Pnt(3.845574230355639, 0.2028301512488117, 4))] -ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_2_objects_1, model.selection(), 0, 0.75, [model.selection("SOLID", GeomAPI_Pnt(0.06663461012735418, 0.05143712897449785, 2.675990079155852))]) +ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_2_objects_1, model.selection(), 0, 0.75, [model.selection("SOLID", GeomAPI_Pnt(-0.02796175964867624, -0.05417366434185267, 2.475075117094407))]) Axis_4 = model.addAxis(Part_1_doc, 0, -1, -10) -ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", GeomAPI_Pnt(-0.45, 5, 4))], model.selection("EDGE", GeomAPI_Pnt(0, -0.5, -5)), 10, 10, [model.selection("SOLID", GeomAPI_Pnt(0.06614791498027658, 0.06612435067467369, 2.67762623401837))]) +ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", GeomAPI_Pnt(-0.45, 5, 4))], model.selection("EDGE", GeomAPI_Pnt(0, -0.5, -5)), 10, 10, [model.selection("SOLID", GeomAPI_Pnt(-0.02818028507968423, -0.07071295235452894, 2.466088994028068))]) Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", GeomAPI_Pnt(-2.14713105154291, -4.124600374278729, 4)), model.selection("FACE", GeomAPI_Pnt(2.14713105154291, -4.124600374278742, 4))], model.selection(), model.selection("FACE", GeomAPI_Pnt(0, 0, 0)), 0, model.selection(), 0) Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOZ")) SketchLine_20 = Sketch_3.addLine(3.5, 2.508501119175777, 3.5, 4) @@ -204,8 +204,8 @@ SketchLine_27 = SketchProjection_12.createdFeature() SketchConstraintCoincidence_41 = Sketch_3.setCoincident(SketchLine_20.endPoint(), SketchLine_27.result()) model.do() Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", GeomAPI_Pnt(4.850000000000001, 0, 3.254250559587889))], model.selection("EDGE", "PartSet/OZ"), 360, 0) -Common_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", GeomAPI_Pnt(-2.14713105154291, -4.124600374278729, 2)), model.selection("SOLID", GeomAPI_Pnt(2.14713105154291, -4.124600374278742, 2))], [model.selection("SOLID", GeomAPI_Pnt(-1.278142456973851e-15, 2.734224632526547e-16, 3.386836255166113))]) -Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", GeomAPI_Pnt(0.06552679693747457, 0.1115566065149892, 2.681859907222054))], [model.selection("SOLID", GeomAPI_Pnt(-2.134018078943279, -4.099410579753945, 3.358593616213623)), model.selection("SOLID", GeomAPI_Pnt(2.134018071503405, -4.099410583757958, 3.358593616233432))]) +Common_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", GeomAPI_Pnt(-2.14713105154291, -4.124600374278729, 2)), model.selection("SOLID", GeomAPI_Pnt(2.14713105154291, -4.124600374278742, 2))], [model.selection("SOLID", GeomAPI_Pnt(-1.278142456973851e-15, 2.734224632526547e-16, 3.382519172194574))]) +Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", GeomAPI_Pnt(-0.02856815579589599, -0.09246122079397179, 2.463292892680745))], [model.selection("SOLID", GeomAPI_Pnt(-2.136430444927541, -4.104043624269158, 3.360182492861197)), model.selection("SOLID", GeomAPI_Pnt(2.136429748085782, -4.104043260947467, 3.360182494729003))]) model.do() model.testHaveNamingSubshapes(Cut_1, model, Part_1_doc) model.end() diff --git a/src/FeaturesPlugin/Test/Test2738.py b/src/FeaturesPlugin/Test/Test2738.py index dad6fe0d8..51db0cfa5 100644 --- a/src/FeaturesPlugin/Test/Test2738.py +++ b/src/FeaturesPlugin/Test/Test2738.py @@ -37,7 +37,7 @@ Partition_1 = model.addPartition(Part_1_doc, [model.selection("COMPOUND", "all-i Group_1 = model.addGroup(Part_1_doc, [model.selection("SOLID", (-34.12026714434272, 28.71281409244911, 1.5))]) Group_1.setName("Group_dechets") Group_1.result().setName("Group_dechets") -Group_2 = model.addGroup(Part_1_doc, [model.selection("SOLID", (-34.12026714434272, 28.71281409244911, 2.35984679315518))]) +Group_2 = model.addGroup(Part_1_doc, [model.selection("SOLID", (-34.12026714434272, 28.71281409244911, 2.554668601838412))]) Group_2.setName("Group_colis") Group_2.result().setName("Group_colis") LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("COMPSOLID", (-34.12026714434272, 28.71281409244911, 2.5))], model.selection("EDGE", "PartSet/OX"), "d", "nb", model.selection("EDGE", "PartSet/OY"), "d", "nb") diff --git a/src/FeaturesPlugin/Test/TestExtrusionCut_ByPlanesAndOffsets.py b/src/FeaturesPlugin/Test/TestExtrusionCut_ByPlanesAndOffsets.py index 2cfa2d224..18aaf96fc 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionCut_ByPlanesAndOffsets.py +++ b/src/FeaturesPlugin/Test/TestExtrusionCut_ByPlanesAndOffsets.py @@ -46,7 +46,7 @@ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.result(), Sk ExtrusionCut_1.setNestedSketch(Sketch_1) model.do() Shape = ExtrusionCut_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5, 5, 4.97049494) +checkMiddlePoint(Shape, 5, 5, 4.72168715) ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [], model.selection("EDGE", "Axis_1"), model.selection(), 0, model.selection("FACE", "ExtrusionCut_1_1/Modified_Face&Box_1_1/Left"), 0, [model.selection("SOLID", "ExtrusionCut_1_1")]) Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Front")) @@ -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, 5.00107093476, 4.96064972557, 4.9770664027) +checkMiddlePoint(Shape, 4.999955838, 4.99999192, 4.677925562) model.end() diff --git a/src/FeaturesPlugin/Test/TestExtrusionCut_BySize.py b/src/FeaturesPlugin/Test/TestExtrusionCut_BySize.py index 9458b5307..aac3b335c 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionCut_BySize.py +++ b/src/FeaturesPlugin/Test/TestExtrusionCut_BySize.py @@ -45,12 +45,12 @@ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.result(), Sk ExtrusionCut_1.setNestedSketch(Sketch_1) model.do() Shape = ExtrusionCut_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5, 5.004704015828, 5.02793455788) +checkMiddlePoint(Shape, 5, 5.08108724844, 4.8653571) ExtrusionCut_1.setDirection(model.selection("EDGE", "Axis_1")) model.do() Shape = ExtrusionCut_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5.00027719467643, 4.861055360637628, 5.101882685002874) +checkMiddlePoint(Shape, 4.99998635, 5.124949186, 4.8821269448) ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [], -5, [model.selection("SOLID", "ExtrusionCut_1_1")]) Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Front")) @@ -64,7 +64,7 @@ SketchCircle_3 = Sketch_3.addCircle(7, 2, 1.5) ExtrusionCut_3.setNestedSketch(Sketch_3) model.do() Shape = ExtrusionCut_3.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5.15104587473, 4.96021, 4.86946) +checkMiddlePoint(Shape, 4.826501151, 5.11493472, 4.9839082) model.end() diff --git a/src/FeaturesPlugin/Test/TestExtrusionCut_ThroughAll.py b/src/FeaturesPlugin/Test/TestExtrusionCut_ThroughAll.py index ce66b253f..871183764 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionCut_ThroughAll.py +++ b/src/FeaturesPlugin/Test/TestExtrusionCut_ThroughAll.py @@ -45,12 +45,12 @@ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.result(), Sk ExtrusionCut_1.setNestedSketch(Sketch_1) model.do() Shape = ExtrusionCut_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5.0, 5.0, 4.97049495) +checkMiddlePoint(Shape, 5.0, 5.0, 4.72168715343) ExtrusionCut_1.setDirection(model.selection("EDGE", "Axis_1")) model.do() Shape = ExtrusionCut_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 4.99796028, 5.00196717, 4.97487226) +checkMiddlePoint(Shape, 5.00004436, 4.999993, 5.001212) ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [], [model.selection("SOLID", "ExtrusionCut_1_1")]) Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Front")) @@ -64,7 +64,7 @@ SketchCircle_3 = Sketch_3.addCircle(7, 2, 1.5) ExtrusionCut_3.setNestedSketch(Sketch_3) model.do() Shape = ExtrusionCut_3.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 4.99787246, 4.92218515, 4.91081244) +checkMiddlePoint(Shape, 5.00008072, 5.079732577, 5.08050677) model.end() diff --git a/src/FeaturesPlugin/Test/TestExtrusionFuse_ByPlanesAndOffsets.py b/src/FeaturesPlugin/Test/TestExtrusionFuse_ByPlanesAndOffsets.py index 837dac081..77ce5da16 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionFuse_ByPlanesAndOffsets.py +++ b/src/FeaturesPlugin/Test/TestExtrusionFuse_ByPlanesAndOffsets.py @@ -46,7 +46,7 @@ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.result(), Sk ExtrusionFuse_1.setNestedSketch(Sketch_1) model.do() Shape = ExtrusionFuse_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5, 5, 5.421244124) +checkMiddlePoint(Shape, 5, 5, 5.3457661) ExtrusionFuse_2 = model.addExtrusionFuse(Part_1_doc, [], model.selection("EDGE", "Axis_1"), model.selection(), 0, model.selection("FACE", "ExtrusionFuse_1_1/Modified_Face&Box_1_1/Left&ExtrusionFuse_1_1/From_Face"), 0, [model.selection("SOLID", "ExtrusionFuse_1_1")]) Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Front")) @@ -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.88886637164, 4.89804988224, 2.94104936673) +checkMiddlePoint(Shape, 4.97994427, 4.995857948, 4.254078314) model.end() diff --git a/src/FeaturesPlugin/Test/TestExtrusionFuse_BySize.py b/src/FeaturesPlugin/Test/TestExtrusionFuse_BySize.py index 49cdfa03c..7287e8282 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionFuse_BySize.py +++ b/src/FeaturesPlugin/Test/TestExtrusionFuse_BySize.py @@ -45,12 +45,12 @@ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.result(), Sk ExtrusionFuse_1.setNestedSketch(Sketch_1) model.do() Shape = ExtrusionFuse_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5, 4.903914353, 5.273370165) +checkMiddlePoint(Shape, 5, 4.92385244, 5.178148828) ExtrusionFuse_1.setDirection(model.selection("EDGE", "Axis_1")) model.do() Shape = ExtrusionFuse_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5, 4.299736969, 5.70604613) +checkMiddlePoint(Shape, 5, 4.71213222, 5.287400476) ExtrusionFuse_2 = model.addExtrusionFuse(Part_1_doc, [], 3, [model.selection("SOLID", "ExtrusionFuse_1_1")]) Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Front")) @@ -64,7 +64,7 @@ SketchCircle_3 = Sketch_3.addCircle(5, -6, 3) ExtrusionFuse_3.setNestedSketch(Sketch_3) model.do() Shape = ExtrusionFuse_3.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5.31705479, 6.86583379, 5.82287969) +checkMiddlePoint(Shape, 5.17873875, 6.823505388, 5.484616493) model.end() diff --git a/src/FeaturesPlugin/Test/TestExtrusionFuse_ThroughAll.py b/src/FeaturesPlugin/Test/TestExtrusionFuse_ThroughAll.py index e84a50bbe..40c7fa8bf 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionFuse_ThroughAll.py +++ b/src/FeaturesPlugin/Test/TestExtrusionFuse_ThroughAll.py @@ -49,7 +49,7 @@ ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "F model.do() Shape = ExtrusionFuse_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 37.46245068, 23.05267081, 8.52187757) +checkMiddlePoint(Shape, 42.63716766, 25.85781486, 9.0373214) model.end() diff --git a/src/FeaturesPlugin/Test/TestMultiRotation_MultiLevelCompound_v95_4.py b/src/FeaturesPlugin/Test/TestMultiRotation_MultiLevelCompound_v95_4.py index 6f4691354..e30b014f5 100644 --- a/src/FeaturesPlugin/Test/TestMultiRotation_MultiLevelCompound_v95_4.py +++ b/src/FeaturesPlugin/Test/TestMultiRotation_MultiLevelCompound_v95_4.py @@ -19,6 +19,7 @@ from salome.shaper import model from GeomAPI import * +from GeomAlgoAPI import * model.begin() partSet = model.moduleDocument() diff --git a/src/FeaturesPlugin/Test/TestMultiTranslation_MultiLevelCompound_v95_4.py b/src/FeaturesPlugin/Test/TestMultiTranslation_MultiLevelCompound_v95_4.py index 4c87612e6..04dc14c4f 100644 --- a/src/FeaturesPlugin/Test/TestMultiTranslation_MultiLevelCompound_v95_4.py +++ b/src/FeaturesPlugin/Test/TestMultiTranslation_MultiLevelCompound_v95_4.py @@ -19,6 +19,7 @@ from salome.shaper import model from GeomAPI import * +from GeomAlgoAPI import * model.begin() partSet = model.moduleDocument() diff --git a/src/FeaturesPlugin/Test/TestRevolutionCut_ByAngle.py b/src/FeaturesPlugin/Test/TestRevolutionCut_ByAngle.py index ba79b8fe0..7b7957029 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionCut_ByAngle.py +++ b/src/FeaturesPlugin/Test/TestRevolutionCut_ByAngle.py @@ -44,7 +44,7 @@ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.result(), Sk RevolutionCut_1.setNestedSketch(Sketch_1) model.do() Shape = RevolutionCut_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 4.985950242219446, 4.993794269643578, 5.022028013265849) +checkMiddlePoint(Shape, 5.008053818, 5.07743277, 4.8949827) RevolutionCut_1.setAxis(model.selection("EDGE", "PartSet/OX")) model.do() diff --git a/src/FeaturesPlugin/Test/TestRevolutionCut_ByPlanesAndOffsets.py b/src/FeaturesPlugin/Test/TestRevolutionCut_ByPlanesAndOffsets.py index 0c14b1042..c7dd92631 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionCut_ByPlanesAndOffsets.py +++ b/src/FeaturesPlugin/Test/TestRevolutionCut_ByPlanesAndOffsets.py @@ -44,12 +44,12 @@ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.result(), Sk RevolutionCut_1.setNestedSketch(Sketch_1) model.do() Shape = RevolutionCut_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5, 5.15948561, 5.15948561) +checkMiddlePoint(Shape, 5, 4.760371965, 4.760372054) RevolutionCut_1.setPlanesAndOffsets(model.selection(), 0, model.selection("FACE", "Box_1_1/Bottom"), 3) model.do() Shape = RevolutionCut_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5, 5.23264, 5.07457446) +checkMiddlePoint(Shape, 5, 4.7759476985, 4.74444379) model.end() diff --git a/src/FeaturesPlugin/Test/TestRevolutionCut_ThroughAll.py b/src/FeaturesPlugin/Test/TestRevolutionCut_ThroughAll.py index 837f0a4ac..d14cd8843 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionCut_ThroughAll.py +++ b/src/FeaturesPlugin/Test/TestRevolutionCut_ThroughAll.py @@ -53,7 +53,7 @@ RevolutionCut_1.setNestedSketch(Sketch_1) model.do() Shape = RevolutionCut_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5.13562827, 5.0, 5.13562827) +checkMiddlePoint(Shape, 4.81498576, 5.0, 4.81498576) model.end() diff --git a/src/FeaturesPlugin/Test/TestRevolutionFuse_ByAngle.py b/src/FeaturesPlugin/Test/TestRevolutionFuse_ByAngle.py index dbf1a51f5..e85b557a4 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionFuse_ByAngle.py +++ b/src/FeaturesPlugin/Test/TestRevolutionFuse_ByAngle.py @@ -44,12 +44,12 @@ 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, 4.98623430526137, 4.892827903704557, 5.240928197091025) +checkMiddlePoint(Shape, 4.992334045, 4.926296368, 5.140838946) RevolutionFuse_1.setAxis(model.selection("EDGE", "PartSet/OX")) model.do() Shape = RevolutionFuse_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5, 3.5650977446, 5.63206191645) +checkMiddlePoint(Shape, 5, 4.21250167, 5.36769235) model.end() diff --git a/src/FeaturesPlugin/Test/TestRevolutionFuse_ByPlanesAndOffsets.py b/src/FeaturesPlugin/Test/TestRevolutionFuse_ByPlanesAndOffsets.py index 8eaee314c..f29a9ce7f 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionFuse_ByPlanesAndOffsets.py +++ b/src/FeaturesPlugin/Test/TestRevolutionFuse_ByPlanesAndOffsets.py @@ -44,12 +44,12 @@ 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, 1.31869538592, 1.538946730649) +checkMiddlePoint(Shape, 5.000000277, 2.2088446592, 2.5458802675) RevolutionFuse_1.setPlanesAndOffsets(model.selection(), 0, model.selection("FACE", "Box_1_1/Bottom"), 0) model.do() Shape = RevolutionFuse_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 5, 1.98775395252, 5.352665608174) +checkMiddlePoint(Shape, 5, 3.0990965, 5.350448567) model.end() diff --git a/src/FeaturesPlugin/Test/TestRevolutionFuse_ThroughAll.py b/src/FeaturesPlugin/Test/TestRevolutionFuse_ThroughAll.py index 2f1d34213..433a35921 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionFuse_ThroughAll.py +++ b/src/FeaturesPlugin/Test/TestRevolutionFuse_ThroughAll.py @@ -53,7 +53,7 @@ RevolutionFuse_1.setNestedSketch(Sketch_1) model.do() Shape = RevolutionFuse_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 7.01705635, 5.0, 7.01705635) +checkMiddlePoint(Shape, 6.3892968486, 5.0, 6.3892968486) model.end() diff --git a/src/FeaturesPlugin/Test/TestRevolution_ByAngle.py b/src/FeaturesPlugin/Test/TestRevolution_ByAngle.py index a493f41c8..fba05abc7 100644 --- a/src/FeaturesPlugin/Test/TestRevolution_ByAngle.py +++ b/src/FeaturesPlugin/Test/TestRevolution_ByAngle.py @@ -40,12 +40,12 @@ SketchCircle_1 = Sketch_1.addCircle(30, 20, 15) Revolution_1.setNestedSketch(Sketch_1) model.do() Shape = Revolution_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, -19.9197187127138, 19.9197187127138, 20) +checkMiddlePoint(Shape, -20.29227355, 20.29227355, 20) Revolution_1.setAxis(model.selection("EDGE", "PartSet/OY")) model.do() Shape = Revolution_1.results()[0].resultSubShapePair()[0].shape() -checkMiddlePoint(Shape, 14.2731178230633, 30, 14.2731178230633) +checkMiddlePoint(Shape, 14.5229101, 30, 14.5229101) model.end() diff --git a/src/SketchPlugin/Test/TestChangeSketchPlane1.py b/src/SketchPlugin/Test/TestChangeSketchPlane1.py index dd4105fba..9a892d647 100644 --- a/src/SketchPlugin/Test/TestChangeSketchPlane1.py +++ b/src/SketchPlugin/Test/TestChangeSketchPlane1.py @@ -61,7 +61,7 @@ model.testNbSubShapes(ExtrusionFuse_1, GeomAPI_Shape.EDGE, [30]) model.testNbSubShapes(ExtrusionFuse_1, GeomAPI_Shape.VERTEX, [60]) model.testResultsVolumes(ExtrusionFuse_1, [1028.2743338823]) -checkMiddlePoint(ExtrusionFuse_1, 4.96954097, 4.7867868, 5.0160782) +checkMiddlePoint(ExtrusionFuse_1, 4.972503122, 4.84876717, 5.0145146) # change plane and check error model.begin() @@ -85,7 +85,7 @@ model.testNbSubShapes(ExtrusionFuse_1, GeomAPI_Shape.EDGE, [30]) model.testNbSubShapes(ExtrusionFuse_1, GeomAPI_Shape.VERTEX, [60]) model.testResultsVolumes(ExtrusionFuse_1, [1028.2743338823]) -checkMiddlePoint(ExtrusionFuse_1, 4.96954097, 5.2132132, 5.0160782) +checkMiddlePoint(ExtrusionFuse_1, 4.972503122, 5.15123283, 5.0145146) # change plane removing features related to external objects model.begin() diff --git a/src/SketchPlugin/Test/TestChangeSketchPlane2.py b/src/SketchPlugin/Test/TestChangeSketchPlane2.py index 64c987269..f501b9d16 100644 --- a/src/SketchPlugin/Test/TestChangeSketchPlane2.py +++ b/src/SketchPlugin/Test/TestChangeSketchPlane2.py @@ -109,7 +109,7 @@ model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.EDGE, [78]) model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.VERTEX, [156]) model.testResultsVolumes(ExtrusionCut_1, [45760.2175339]) -checkMiddlePoint(ExtrusionCut_1, 22.06257655, 23.02586034, 15.3487259) +checkMiddlePoint(ExtrusionCut_1, 21.09174756, 23.41211647, 15.165448698) # change plane of Fuse's sketch model.begin() @@ -128,7 +128,7 @@ model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.EDGE, [68]) model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.VERTEX, [136]) model.testResultsVolumes(ExtrusionCut_1, [45778.45658456]) -checkMiddlePoint(ExtrusionCut_1, 22.09235516, 24.3480359, 15.39208928) +checkMiddlePoint(ExtrusionCut_1, 21.0948367, 23.919988, 15.169366862) # undo the change model.undo() @@ -149,7 +149,7 @@ model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.EDGE, [97]) model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.VERTEX, [194]) model.testResultsVolumes(ExtrusionCut_1, [45338.366732291]) -checkMiddlePoint(ExtrusionCut_1, 21.85567065, 23.317063, 15.12788294) +checkMiddlePoint(ExtrusionCut_1, 21.00046446, 23.51391548, 15.073978) # undo the change again model.undo() @@ -177,6 +177,6 @@ model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.EDGE, [76]) model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.VERTEX, [152]) model.testResultsVolumes(ExtrusionCut_1, [45760.15911273]) -checkMiddlePoint(ExtrusionCut_1, 22.09599822, 23.059247963, 15.3232676575) +checkMiddlePoint(ExtrusionCut_1, 21.08920837, 23.40914618, 15.16787737) assert(model.checkPythonDump()) -- 2.39.2