Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Stuck trying to create a sketch, add a rectangle, and extrude.
What am I missing ?
# Create a new sketch on the xy plane.
sketches = rootComp.sketches
xyPlane = rootComp.xYConstructionPlane
sketch = sketches.add(xyPlane)
sketch.name = 'Dot Bridge ' + str(uLetterCount) + ' - ' + uLetter
uPointA = adsk.core.Point3D.create(posMaxX + 0.115, 0.1, 0)
uPointB = adsk.core.Point3D.create(posMaxX + 0.115 + 0.22, -1.5, 0)
uBridge = sketch.addTwoPointRectangle(uPointA, uPointB)
# Create an extrusion input
extrudes = rootComp.features.extrudeFeatures
extInput = extrudes.createInput(uBridge, adsk.fusion.FeatureOperations.JoinFeatureOperation)
distance = adsk.core.ValueInput.createByReal(uDotJoinHeight)
extInput.setDistanceExtent(False, distance)
extInput.isSolid = True
# Create the extrusion and add to timeline
ext = extrudes.add(extInput)
Solved! Go to Solution.