Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I try to create a torial helix using the addIn oft Patric Rainsberry that makes a linear heilx and write some math into:
His code is open and downloadable here:
http://tapnair.github.io/HelixGenerator/
His code is open and downloadable here:
http://tapnair.github.io/HelixGenerator/
At the start the user has to select a plane. The relevant code is:
# Create the Selection input to have a planar face or construction plane selected.
selection_input = inputs.addSelectionInput('plane', 'Plane', 'Select sketch plane.')
selection_input.addSelectionFilter('PlanarFaces')
selection_input.addSelectionFilter('ConstructionPlanes')
selection_input.setSelectionLimits(1, 1)
But in an empty document in Fusion 360 there is no plane visible so the user does not know what to select.
So it would be nice to make origins visible by code or use a standard plane so the helix appears
I would like to write something like:
if inputs.plane == 0: # if there is no plane selected
if inputs.plane == 0: # if there is no plane selected
plane = root_comp.xYConstructionPlane
So the helix is done by default on the xYConstructionPlane as long as the user does not select an other plane.
But my problem is: The script stops. No command is executed as long as the user does not do a selection.
But my problem is: The script stops. No command is executed as long as the user does not do a selection.
The selection option in the user commands stops the AddIn.
I do not understand the script good enough to solve this.
Solved! Go to Solution.
