- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I need a 3D-Sketch along a iso line.
I get the iso line and a reference to the sketches, but how can I "add" the iso line to a new sketch ?
It is possible ? If not, how can I linearize (with tolerance) the iso line, so that I can add many lines over point-3d to the sketch ?
Best regards
Maurizio Manzi
----------------------------------------------------------------
The script:
import adsk.core, adsk.fusion, adsk.cam, traceback
def run(context😞
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
ws: adsk.core.Workspace = ui.workspaces.itemById('FusionSolidEnvironment') # Referenz ws to design-Workspace
if ws:
ws.activate() # Activate design-Workspace
design = adsk.fusion.Design.cast(app.activeProduct) # CAST - Design Document
if not design:
ui.messageBox("Keine Konstruktion / No design document found")
return
# Loop around all solids in root.bRepBodies
root = design.rootComponent # Tree-root-directory
for solid in root.bRepBodies:
face = ui.selectEntity('Select a Face', 'Faces').entity
isocurve = face.geometry.evaluator.getIsoCurve(.5,False)
sketches = root.sketches # Get reference to root
sketch = sketches.add(root.xYConstructionPlane) # Add new sketch
# How to add 3D-Sketch along the isoline ?
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Solved! Go to Solution.