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.
Hope AssemblyComponentDefinition.RangeBox property could help you.
It gives you rectangular box that is guaranteed to enclose this assembly object.
Cheers,
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.
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,
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.
I think so, but you could also check the effect of the various settings in the UI to make sure.