[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2025-03-05 20:11:25 +00:00
parent a970ccfe2d
commit 6d474fe35a

View File

@@ -75,16 +75,17 @@ def setup(doc=None, solvertype="ccxtools"):
body = doc.addObject("PartDesign::Body", "Body")
sketch = doc.addObject("Sketcher::SketchObject", "Sketch")
body.addObject(sketch)
sketch.AttachmentSupport = (doc.getObject('XY_Plane'),[''])
sketch.MapMode = 'FlatFace'
sketch.addGeometry(Part.Ellipse(App.Vector(40, 0, 0),
App.Vector(0, 20, 0),App.Vector(0, 0, 0)))
sketch.AttachmentSupport = (doc.getObject("XY_Plane"), [""])
sketch.MapMode = "FlatFace"
sketch.addGeometry(
Part.Ellipse(App.Vector(40, 0, 0), App.Vector(0, 20, 0), App.Vector(0, 0, 0))
)
sketch.exposeInternalGeometry(0)
sketch.addConstraint(Sketcher.Constraint('Distance',0,3,1,1,100))
sketch.addConstraint(Sketcher.Constraint('Angle',1,0))
sketch.addConstraint(Sketcher.Constraint('Distance',0,3,2,1,50))
sketch.addConstraint(Sketcher.Constraint('Coincident', 0, 3, -1, 1))
pad = body.Document.addObject("PartDesign::Pad","Pad")
sketch.addConstraint(Sketcher.Constraint("Distance", 0, 3, 1, 1, 100))
sketch.addConstraint(Sketcher.Constraint("Angle", 1, 0))
sketch.addConstraint(Sketcher.Constraint("Distance", 0, 3, 2, 1, 50))
sketch.addConstraint(Sketcher.Constraint("Coincident", 0, 3, -1, 1))
pad = body.Document.addObject("PartDesign::Pad", "Pad")
body.addObject(pad)
pad.Length = 1000
pad.Profile = sketch