X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPythonAPI%2Fexamples%2FPlatine.py;h=a21d55eed5d1e1bbf39f8d875c8289460c40745d;hb=05cb54cb247bda099b1dc9218e3382e79becb40c;hp=c84684334f4e982325f2b277427adb5a6478c142;hpb=b2b5748a4c0284ae254cd10bffb9551e1a6d8f2d;p=modules%2Fshaper.git diff --git a/src/PythonAPI/examples/Platine.py b/src/PythonAPI/examples/Platine.py index c84684334..a21d55eed 100644 --- a/src/PythonAPI/examples/Platine.py +++ b/src/PythonAPI/examples/Platine.py @@ -54,8 +54,6 @@ def vertical_body(): # Create extrusion body = model.addExtrusion(part, sketch.selectFace(), "E") - model.do() - return body def bottom_body(): @@ -68,7 +66,7 @@ def bottom_body(): geom_points = [geom.Pnt2d(*p) for p in points] left, top, v2, h2, v1, h1, right, bottom = model.addPolygon(sketch, *geom_points) - points = [(P - 20, 16 + 16 / 2), (P - 20, 16), (P - 20, 16 + 16)] + points = [(P - 20, 16 + 16 / 2), (P - 20, 16 + 16), (P - 20, 16)] points = [(p[0], -p[1]) for p in points] # as we look to back of the face center, start, end = [geom.Pnt2d(*p) for p in points] arc = sketch.addArc(center, start, end, True) @@ -97,10 +95,9 @@ def bottom_body(): sketch.setCoincident(left_e.startPoint(), left.endPoint()) sketch.setCoincident(left_e.endPoint(), left.startPoint()) - model.do() #!!! - # Dimensions - sketch.setLength(v1, 16) + #sketch.setLength(v1, 16) + sketch.setLength(v2, 32) sketch.setLength(h2, 20) sketch.setLength(right, 16) sketch.setLength(top, "P") @@ -162,8 +159,6 @@ def body_3(): # Create extrusion body = model.addExtrusion(part, sketch.selectFace(), "-(L-22)") - model.do() #!!! - return body def body_4(): @@ -189,8 +184,6 @@ def body_4(): # Create extrusion body = model.addExtrusion(part, sketch.selectFace(), "-12") - model.do() #!!! - return body @@ -218,3 +211,5 @@ b4 = body_4() boolean = model.addFuse(part, boolean.result() + b4.result()) model.end() + +assert(model.checkPythonDump())