continued from Dxf Export of Dimension
as @jaisejames suggested, I think spline support in R12 is sketchy at best. If you set import/export preferences to "splines as polylines" you should get a better result.
continued from Dxf Export of Dimension
I know that R12 doesn't support splineswandererfan wrote: ↑Thu Jun 14, 2018 4:04 pm as @jaisejames suggested, I think spline support in R12 is sketchy at best. If you set import/export preferences to "splines as polylines" you should get a better result.
Looks like the "legacy" dxf processor exports splines as polylines now, so I don't see how we're losing anything.easyw-fc wrote: ↑Thu Jun 14, 2018 4:18 pm I know that R12 doesn't support splines
Then there is the option in case a spline is encountered, to let the exporter ask to convert spline to poly line or change the format to R14 at least to support spline.
That would be a nice option, instead of being forced to loose bspline support in FC for dxf.
We are loosing what we have gained with the macro to export the TechDraw Viewswandererfan wrote: ↑Thu Jun 14, 2018 5:47 pm Looks like the "legacy" dxf processor exports splines as polylines now, so I don't see how we're losing anything.
I would suggest an option to export as R12 or to switch to a modern way (2010)wandererfan wrote: ↑Thu Jun 14, 2018 5:47 pm I've found specs for R14 and what I think is R24 (ACAD2010). Is there any point in trying to support all the intermediate versions or should the "modern" version be the newest I can find?
May be this lib can help ( ezdxf )wandererfan wrote: ↑Thu Jun 14, 2018 5:47 pm Looks like the "legacy" dxf processor exports splines as polylines now, so I don't see how we're losing anything.
I've found specs for R14 and what I think is R24 (ACAD2010). Is there any point in trying to support all the intermediate versions or should the "modern" version be the newest I can find?
read/write/new support for DXF versions: R12, R2000, R2004, R2007, R2010, R2013 and R2018
additional read support for DXF versions R13/R14 (upgraded to R2000)
additional read support for older DXF versions than R12 (upgraded to R12)
preserves third-party DXF content
additional fast DXF R12 writer, that creates just an ENTITIES section with support for the basic DXF entities
Code: Select all
(*m_ofs) << " 0" << endl;
(*m_ofs) << "TEXT" << endl;
(*m_ofs) << " 8" << endl;
(*m_ofs) << layer_name << endl;
(*m_ofs) << " 39" << endl;
(*m_ofs) << 0 << endl; //thickness
(*m_ofs) << " 10" << endl; //first alignment point
(*m_ofs) << location1[0] << endl;
(*m_ofs) << " 20" << endl;
(*m_ofs) << location1[1] << endl;
(*m_ofs) << " 30" << endl;
(*m_ofs) << location1[2] << endl;
Code: Select all
(*m_ofs) << " 0" << endl;
(*m_ofs) << "TEXT" << endl;
(*m_ofs) << " 5" << endl;
(*m_ofs) << "101" << endl; // continues counter [hex digit] say start from 101 for all table, block, entity
(*m_ofs) << "100" << endl;
(*m_ofs) << "AcDbEntity" << endl;
(*m_ofs) << " 8" << endl;
(*m_ofs) << layer_name << endl;
(*m_ofs) << "100" << endl;
(*m_ofs) << "AcDbText" << endl;
(*m_ofs) << " 39" << endl;
(*m_ofs) << 0 << endl; //thickness
(*m_ofs) << " 10" << endl; //first alignment point
(*m_ofs) << location1[0] << endl;
(*m_ofs) << " 20" << endl;
(*m_ofs) << location1[1] << endl;
(*m_ofs) << " 30" << endl;
(*m_ofs) << location1[2] << endl;
I'm attaching a very simple example that will generate a wrong DXF because the view will produce splines.
you have a poly line not a spline on your dxf file... that is why it is not crashingjaisejames wrote: ↑Tue Jun 19, 2018 10:23 am It is working here. No crash librecad.
OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.13971 (Git)
Build type: Release
Branch: master
Hash: 8e4dd8ca8496595d4718dc24c872f7ed668b2521
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/India (en_IN)