Skip to main content
3 of 5
Simple example added
Malcolm
  • 319
  • 2
  • 5

2d dxf output of a 3d model

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.

Malcolm
  • 319
  • 2
  • 5