Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Merge profiles

2 REPLIES 2
Reply
Message 1 of 3
copypastestd
872 Views, 2 Replies

Merge profiles

Hello there,

 

I am wondering, is it possible to merge profiles, to make one profile?

 

For example, I have draw some complicated geometry sketch via code, and in fufure I will work only with whole sketch (I don't need inner lines).

 

May be it is possible to delete all inner lines (or modify them to the constructions lines), or some like that?

Right now I use such code:

profs = adsk.core.ObjectCollection.create()
        
    for prof in sketch.profiles:
        profs.add(prof)

 

It works, but this is not what exactly I need.

Merge.JPG

 

 

Tags (2)
2 REPLIES 2
Message 2 of 3
ekinsb
in reply to: copypastestd

Profiles represent closed areas within a sketch.  The creation of profiles doesn't change the sketch in any way.  It's common that the curves in a profile will not have a 1-to-1 correspondence with the sketch entities.  In the example show below I drew two overlapping circles.  This results in three profiles with each one defined by two arcs.  The arcs don't exist in the sketch but were calculated as a result of the profile analysis.  The API provides access to each of these arcs as a ProfileCurve object along with the real sketch circle that it was extracted from. I think you could do some geometric analysis to find all of the profile curves that are geometrically identical to another profile curve and ignore those.  That should leave you with the outer shape.  There isn't a simple way to geometrically compare them so it would take a fair amount of code to implement something like that.

 

Profiles.png

 

 

 

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 3
copypastestd
in reply to: ekinsb

Tnx for your reply.

 

I was thinking about some algoritm which find all inner lines and trim them from sketch.

 

trim.jpg

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report