Hi I have imported a 3d model into Mathematica converting it from a PLY or STL format. This works fine. By using the procedure in Slice through Graphics3D and modifying it slightly for a mesh region rather than a Graphics3D image I can get nice 2D elevations, planes and sections. The problem comes when I want to export those views in 2D via dxf into a cad program. It only seems to export the whole 3d model not just the 2d view. Any guidance as to how to get just the 2d view into a dxf format?
Here is a simple example. I first draw a tetrahedron
t = MeshRegion[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1,
2}}, {Tetrahedron[{1, 2, 3, 5}]}]
I then take a view of it. In this case the base
base = MeshRegion[t, ViewPoint -> {0, 0, -Infinity}]
I then export it as a dxf and reimport it.
Export["base.dxf", base]
Import["base.dxf"]
This gives me the whole model i.e. a 3d dxf file rather than just the 2d view which is what I want.
disk = DiscretizeGraphics@Disk[]; Export["disk.dxf", disk]
gives no errors, and I'm able to reimport the resulting file just fine. $\endgroup$MeshRegion
when you specify aViewPoint
. After evaluateing the linebase = .....
, try using your mouse to manipulate the result and you'll find it is still a 3D object, not 2D. Also, evaluateRegionEmbeddingDimension@base
$\endgroup$