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)
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()
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")
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"))
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()
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"))
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()
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"))
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()
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"))
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()
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"))
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()
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()
from salome.shaper import model
from GeomAPI import *
+from GeomAlgoAPI import *
model.begin()
partSet = model.moduleDocument()
from salome.shaper import model
from GeomAPI import *
+from GeomAlgoAPI import *
model.begin()
partSet = model.moduleDocument()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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())