How to select the geometry for 'contour2d'- operation

How to select the geometry for 'contour2d'- operation

maurizio_manzi
Advocate Advocate
526 Views
3 Replies
Message 1 of 4

How to select the geometry for 'contour2d'- operation

maurizio_manzi
Advocate
Advocate

Hello,
for pocket2d I select the geometry:

operationInput = setup.operations.createInput('pocket2d')
operationInput.tool = tool
op_2Dpocket = setup.operations.add(operationInput)
cadcontours = op_2Dpocket.parameters.itemByName('pockets').value
selection = cadcontours.getCurveSelections()
Geometry = [mySketch.sketchCurves.item(0)]
chain = selection.createNewChainSelection() # Use chain selection
chain.inputGeometry = Geometry
cadcontours.applyCurveSelections(selection) # The default is closed chain,so just apply the chain.
 
How to select the geometry for 'contour2d'- operations ?
cadcontours = op_2Dpocket.parameters.itemByName('pockets').value # <--- 'pockets' is not allowed for contour2d.
Where can I find a list of these "names" in the API help? These are not parameters and are not displayed in the cam with the shift key.


Best regards
Maurizio
 
0 Likes
Accepted solutions (2)
527 Views
3 Replies
Replies (3)
Message 2 of 4

BrianEkins
Mentor
Mentor
Accepted solution

How the geometry is defined is described in this article in the API help.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-A08218F6-3885-4677-9CAD-7234BCEE85CC#CadCont...

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 4

kandennti
Mentor
Mentor
Accepted solution

Hi @maurizio_manzi .

 

I sometimes have trouble displaying the parameter name with the shift key once, but it appears after a few times.

1.png

0 Likes
Message 4 of 4

maurizio_manzi
Advocate
Advocate

Hello,
Thank you very much.

 
Best regards
Maurizio
 
0 Likes