Derive 2D footprint from 3D model
-
Hi,
I'm trying to extract a 2D footprint for an arbitrary 3D model. The models may be composed of multiple discontiguous sections, potentially at different elevations.
I'm thinking of the footprint extraction process in two steps. Step 1 would be determining the 2D projection of the model, potentially producing multiple polygons if the model was discontiguous. Step 2 would be to combine the polygons into a single convex hull. I've implemented Andrew's monotone chain algorithm for computing covxex hulls in the past and understand that step.
I'm unsure how to accomplish step 1 and was hoping that someone could point me in the right direction. I've looked at the Section Plan tool, which seems great but has limited support in the API for retrieving the section plane geometry.I've thought about raytracing but that seems like overkill. I've thought about trying to do this with a Boolean intersection but that has issues since the model may not be solid.
Any pointers would be greatly appreciated.
Thanks,
Josh -
Maybe I'm missing something, you may be talking api, but,
Camera/Standard Views/Top, Camera/Parallel Projection will give you a 2d plan. -
I think OP wants a polygon representing the footprint, not a picture.
-
Can you not just set the view you want (any view) and then do a 2D dwg export. This "flattens" the model. Reinsert or open the exported DWG back into SU.
Maybe I am missing what you want as well. -
@josh_blomberg said:
Hi,
I'm trying to extract a 2D footprint for an arbitrary 3D model. The models may be composed of multiple discontiguous sections, potentially at different elevations.
Something like this?
-
What if you use intersect faces with model?
Rightclick your model's geometry even at different heights and a plane or surface or any other geometry that intersects it and rightclick on any of the selected and run intersect faces...
Depending on your context you can intersect Selected faces with:
- Current context (if you're inside a group/component you can restrict to that context)
- Rest of the model (even if you're inside a context and the rest of model is out of that context);
- Selection (you intersect your selected objects with themselves)
What you can also do is use sandbox tools (if you can't find it on toolbars you must activate it under sketchup preferences > extensions):
Select the faces you want to project on the ground and hit drape tool.
Advertisement