Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Accessing a profile made of lines and curves

oafak
Enthusiast

Accessing a profile made of lines and curves

oafak
Enthusiast
Enthusiast

I have called API objects and functions in Python to create a closed path made of a spline and two straight lines. I want to simply revolve this along another line created the same way. I have been able to gain access to the profile with item(0). How do I gain access to this? A statement such as, 

 revProf = revPlane.profiles.item(0)
where revPlane is the plane created to receive the sketch items, does not appear to work. I have heard that there is a Path object that can do this, can someone please explain how it is done?

 

0 Likes
Reply
Accepted solutions (1)
1,190 Views
3 Replies
Replies (3)

oafak
Enthusiast
Enthusiast

Sorry could not edit the above: I meant "I have NOT" 

0 Likes

BrianEkins
Mentor
Mentor
Accepted solution

Profiles are automatically computed by Fusion as you add geometry to a sketch.  When you sketch interactively, it's the filled areas that are shown and when you create a feature like an extrusion or revolve, it's the profiles that you're selecting.

Profiles are owned by the sketch the geometry is in.  In your case you should be able to do something like:

prof = sk.profiles.item(0)

where sk is a variable referencing the sketch the line and curves were created in.  It's possible to have more than one profile in a sketch so in cases where you've created multiple overlapping geometries, you'll have to add some logic to figure out which profile you want.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

oafak
Enthusiast
Enthusiast

Many thanks Brian.

I did that but continue to get "Tool body creation failed error". The body creates easily when done manually with the profile in the simplified version that I have attached.

Another issue: How to extrude from an offset plane through a given distance. That simple problem escaped me in reading all the API examples given in the API "Samples".

oafak

 

 

 

0 Likes