Get an outline (outer boundary) of a model

Get an outline (outer boundary) of a model

Anonymous
Not applicable
1,165 Views
5 Replies
Message 1 of 6

Get an outline (outer boundary) of a model

Anonymous
Not applicable

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.

 

 

0 Likes
1,166 Views
5 Replies
Replies (5)
Message 2 of 6

Vladimir.Ananyev
Alumni
Alumni

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

0 Likes
Message 3 of 6

Anonymous
Not applicable

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.

0 Likes
Message 4 of 6

adam.nagy
Autodesk Support
Autodesk Support

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
0 Likes
Message 5 of 6

Anonymous
Not applicable

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.

0 Likes
Message 6 of 6

adam.nagy
Autodesk Support
Autodesk Support

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
0 Likes