From 0d950617b260171d10f826919ec0fc17f90d333c Mon Sep 17 00:00:00 2001 From: azv Date: Sat, 3 Nov 2018 14:06:40 +0300 Subject: [PATCH] Update unit tests for ModelHighAPI module --- src/ModelHighAPI/Test/Test2488.py | 14 +++++++------- src/ModelHighAPI/Test/TestDeflectionDump.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ModelHighAPI/Test/Test2488.py b/src/ModelHighAPI/Test/Test2488.py index d89e4c754..59b7b443d 100644 --- a/src/ModelHighAPI/Test/Test2488.py +++ b/src/ModelHighAPI/Test/Test2488.py @@ -55,9 +55,9 @@ SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_1.result(), 6.2) SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_8.result(), 4) SketchConstraintLength_5 = Sketch_1.setLength(SketchLine_5.result(), 2) model.do() -Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_3r-SketchLine_4r-SketchLine_5r-SketchLine_7r-SketchLine_8f")], model.selection("EDGE", "PartSet/OZ"), 360, 0) -Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_1")) -SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "Revolution_1_1/Generated_Face_2&Revolution_1_1/Generated_Face_1__cc"), False) +Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_8f-SketchLine_7r-SketchLine_5r-SketchLine_4r-SketchLine_3r-SketchLine_1r")], model.selection("EDGE", "PartSet/OZ"), 360, 0) +Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1")) +SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1]__cc"), False) SketchPoint_1 = SketchProjection_3.createdFeature() SketchCircle_1 = Sketch_2.addCircle(0, 0, 4.75) SketchCircle_1.setAuxiliary(True) @@ -73,7 +73,7 @@ SketchLine_9 = Sketch_2.addLine(0, 0, 4.113620667973598, 2.375000000005359) SketchLine_9.setAuxiliary(True) SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_9.startPoint()) SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchCircle_2.center(), SketchLine_9.endPoint()) -SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), False) +SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/SketchLine_1"), False) SketchLine_10 = SketchProjection_4.createdFeature() SketchConstraintAngle_1 = Sketch_2.setAngleBackward(SketchLine_9.result(), SketchLine_10.result(), 30) SketchMultiRotation_1 = Sketch_2.addRotation([SketchCircle_2.results()[1]], SketchCircle_1.center(), 120, 3) @@ -173,9 +173,9 @@ SketchProjection_5 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OY" SketchLine_15 = SketchProjection_5.createdFeature() SketchConstraintCoincidence_28 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_15.result()) model.do() -ExtrusionCut_1_objects_1 = [model.selection("WIRE", "Sketch_2/Wire-SketchCircle_3_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_9_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_6_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_18_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_17_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchCircle_14_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_15_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_5_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_4_2f")] -ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_1_objects_1, model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")]) -ExtrusionCut_2_objects_1 = [model.selection("WIRE", "Sketch_2/Wire-SketchCircle_11_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchCircle_10_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchCircle_8_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchCircle_7_2f")] +ExtrusionCut_1_objects_1 = [model.selection("WIRE", "Sketch_2/Face-SketchCircle_3_2f_wire"), model.selection("FACE", "Sketch_2/Face-SketchCircle_9_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_6_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_18_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_17_2f"), model.selection("WIRE", "Sketch_2/Face-SketchCircle_14_2f_wire"), model.selection("FACE", "Sketch_2/Face-SketchCircle_15_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_5_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_4_2f")] +ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_1_objects_1, model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")]) +ExtrusionCut_2_objects_1 = [model.selection("WIRE", "Sketch_2/Face-SketchCircle_11_2f-SketchCircle_15_2r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchCircle_10_2f-SketchCircle_14_2r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchCircle_8_2f-SketchCircle_9_2r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchCircle_7_2f-SketchCircle_6_2r_wire")] ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_2_objects_1, model.selection(), 0, 0.75, [model.selection("SOLID", "ExtrusionCut_1_1")]) model.do() model.end() diff --git a/src/ModelHighAPI/Test/TestDeflectionDump.py b/src/ModelHighAPI/Test/TestDeflectionDump.py index aebb48e50..b52f97bc8 100644 --- a/src/ModelHighAPI/Test/TestDeflectionDump.py +++ b/src/ModelHighAPI/Test/TestDeflectionDump.py @@ -28,7 +28,7 @@ Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-325.90051457976, -18.010291595197, 258.003584159371) model.do() Sketch_1.result().setDeflection(5e-006) -Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f")], model.selection(), 10, 0) +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")], model.selection(), 10, 0) Extrusion_1.result().setDeflection(0.5) model.end() -- 2.39.2