Message 1 of 9
Press selected faces by a script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to make a script that shrinks bodies by specified size by selecting it faces that should be moved. Like press/pull command or Extrude with a cut. I tried via extrude, but it does not work. Can you please help me how to do it? I am trying to do it in python...
selectedFace = ui.selectEntity('Select the fact to create a sketch', 'PlanarFaces').entity
face = adsk.fusion.BRepFace.cast(selectedFace)
distance = adsk.core.ValueInput.createByString('-2 mm')
extrudes = root.features.extrudeFeatures
extrudeInput = extrudes.createInput(face, adsk.fusion.FeatureOperations.CutFeatureOperation)
extrudeInput.setDistanceExtent(False, distance)
extrude = extrudes.add(extrudeInput)