Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get an outline (outer boundary) of a model

5 REPLIES 5
Reply
Message 1 of 6
drvce
835 Views, 5 Replies

Get an outline (outer boundary) of a model

Hello all,

 

I have a model that I would like to get an outline of. My idea was to project the model onto a plane and then somehow only keep the outer boundary of the projection, that is delete all inner edges. Is this approach valid? Any other ideas how I can get the outline?

 

So far, I can get the projection fine, but I have no clue how to keep only the outer boundary. Is such thing even possible with the API? I have searched online extensively and wasn't able to find an answer.

 

The reason why I want to obtain the outline is so that I can sweep the model along a path and visualise its collision path.

 

I have attached both the image of the model and its projection for your reference.

 

Any help would be greatly appreciated. 

 

Cheers.

 

 

5 REPLIES 5
Message 2 of 6
Vladimir.Ananyev
in reply to: drvce

Hope AssemblyComponentDefinition.RangeBox property could help you.

It gives you rectangular box that is guaranteed to enclose this assembly object.

 

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 6
drvce
in reply to: Vladimir.Ananyev

Hi Vladimir,

 

Thank you for your reply.

 

Yes, the RangeBox property is the closest thing I could find to getting an outline.

 

I am now trying to come up with a way of using this RangeBox information and the projection I already have to, if not find the exact outline, then at least make it tighter than the coarse bounding box.

 

Cheers.

Message 4 of 6
adam.nagy
in reply to: drvce

Hi,

 

I'm not aware of a function that would simply give back the outline of something, but I was thinking that maybe creating a drawing view for the document might produce less lines, so might be easier to find the outer boundary.

 

Cheers, 



Adam Nagy
Autodesk Platform Services
Message 5 of 6
drvce
in reply to: adam.nagy

Hi Adam,

 

Thank you for your suggestion.

 

I've taken the drawing view approach once I've realised how slow it was to project each edge separately on a model of that size.

Model Projection.png in my original post is actually a result of adding a base view with DrawingViewStyleEnum.kHiddenLineRemovedDrawingViewStyle. Correct me if I am wrong, but I think that is the style that outputs the fewest number of lines.

 

Cheers.

Message 6 of 6
adam.nagy
in reply to: drvce

I think so, but you could also check the effect of the various settings in the UI to make sure.



Adam Nagy
Autodesk Platform Services

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

Post to forums  

Autodesk Design & Make Report