mybase = model.addSketch(mypart, model.defaultPlane("XOY"))
p1 = geom.Pnt2d(0, 0)
-p2 = geom.Pnt2d(0, 1)
-p3 = geom.Pnt2d(1, 1)
-p4 = geom.Pnt2d(1, 0)
+p2 = geom.Pnt2d(0, 25)
+p3 = geom.Pnt2d(25, 25)
+p4 = geom.Pnt2d(25, 0)
line = model.addPolygon(mybase, p1, p2, p3, p4)
mybase.setParallel(line[1], line[3])
mybase.setPerpendicular(line[0], line[3])
+mybase.setVertical(line[0])
+mybase.setFixed(line[0].startPoint())
+
mywidth = mybase.setLength(line[0], 50)
mylength = mybase.setDistance(line[0].startPoint(), line[2], 50)
-
+model.do()
# Creating the extrusion
mybox = model.addExtrusion(mypart, mybase.selectFace(), 50)
+model.do()
# Creating a cylinder on a face of the box
circle = mystand.addCircle(0, 25, 5)
mystand.setDistance(circle.center(), mystand.addLine(thisxmin), 10)
mystand.setDistance(circle.center(), mystand.addLine(thiszmax), 10)
+model.do()
myboss = model.addExtrusion(mypart, mystand.selectFace(), -5)
-
+model.do()
# Subtracting the cylinder to the box
model.begin()
mybase.setValue(mylength, 100)
-mybox.setSize(20)
+model.do()
+mybox.setSize(40)
model.end()
-assert(model.checkPythonDump())
\ No newline at end of file
+assert(model.checkPythonDump())