R14 ACAD Compatibilty Testing

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
wandererfan
Veteran
Posts: 6324
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: R14 ACAD Compatibilty Testing

Post by wandererfan »

My bad. :oops: Had $MODEL_SPACE instead of *MODEL_SPACE.
Attachments
exportBasicShapesR14v3spline.dxf
(5.15 KiB) Downloaded 36 times
exportBasicShapesR14v3poly.dxf
(6.23 KiB) Downloaded 40 times
exportBasicShapesR12v3.dxf
(7.89 KiB) Downloaded 37 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: R14 ACAD Compatibilty Testing

Post by easyw-fc »

wandererfan wrote: Thu Jun 28, 2018 7:56 pm My bad. :oops: Had $MODEL_SPACE instead of *MODEL_SPACE.
exportBasicShapesR14v3poly.dxf

Code: Select all

The following error was encountered while reading
in TEXT starting at line 1024:
Unexpected DXF group code: 73
Invalid or incomplete DXF input -- drawing discarded.
exportBasicShapesR14v3spline.dxf

Code: Select all

The following error was encountered while reading
in TEXT starting at line 866:
Unexpected DXF group code: 73
Invalid or incomplete DXF input -- drawing discarded.
exportBasicShapesR12v3.dxf

Code: Select all

Table name missing on line 62.
Invalid or incomplete DXF input -- drawing discarded.
Press ENTER to continue:
Regenerating model.
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: R14 ACAD Compatibilty Testing

Post by jaisejames »

for spline & poly [attached corrected file]
73 code in text is not supported.
DICTIONARY is not available.

for basic shape
extra table line
dimstyle added 3, 4,5,6,7 codes
Attachments
exportBasicShapesR14v3spline_mod.dxf
(5.3 KiB) Downloaded 37 times
exportBasicShapesR14v3poly_mod.dxf
(6.38 KiB) Downloaded 72 times
exportBasicShapesR12v3_mod.dxf
(7.9 KiB) Downloaded 56 times
User avatar
wandererfan
Veteran
Posts: 6324
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: R14 ACAD Compatibilty Testing

Post by wandererfan »

If I could prevail upon your patience once again, here are new versions. Thanks again.
Attachments
outR14splinev5.dxf
(5.34 KiB) Downloaded 39 times
outR14polyv5.dxf
(6.43 KiB) Downloaded 39 times
outR12v5.dxf
(7.9 KiB) Downloaded 37 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: R14 ACAD Compatibilty Testing

Post by easyw-fc »

wandererfan wrote: Sat Jun 30, 2018 8:14 pm If I could prevail upon your patience once again, here are new versions. Thanks again.
I cannot open none of them in DWGTV nor in LibreCAD

outR14splinev5.dxf
outR12v5.dxf
outR14polyv5.dxf
User avatar
wandererfan
Veteran
Posts: 6324
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: R14 ACAD Compatibilty Testing

Post by wandererfan »

!@##@$#$%%!!!
Attachments
outR14splinev6.dxf
(5.34 KiB) Downloaded 41 times
outR14polyv6.dxf
(6.42 KiB) Downloaded 40 times
outR12v6.dxf
(7.87 KiB) Downloaded 42 times
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: R14 ACAD Compatibilty Testing

Post by NormandC »

All three files open without a hitch in LibreCAD v2.1.2 and QCad 3.15.3.

I'm at home so I can't test with DWG TrueView.
User avatar
wandererfan
Veteran
Posts: 6324
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: R14 ACAD Compatibilty Testing

Post by wandererfan »

NormandC wrote: Sun Jul 01, 2018 4:42 pm All three files open without a hitch in LibreCAD v2.1.2 and QCad 3.15.3.

I'm at home so I can't test with DWG TrueView.
When I have my act together :oops: , I test against DraftSight, LibreCad and QCad. But we've certainly had cases where a file passed all three, then crashed and burned in Autodesk s/w. So, if you're not too busy on Tuesday , a run through DWG TrueView would be great, thanks.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: R14 ACAD Compatibilty Testing

Post by easyw-fc »

wandererfan wrote: Sun Jul 01, 2018 6:16 pm a run through DWG TrueView would be great, thanks.
I can open all 3 in LC, but unfortunately I'm not able to load the 3 files in DWGTV.

ATM the exporting is working well for LibreCAD also with Bsplines ...

You may consider to use a python library to export your entities to DXF.
http://ezdxf.readthedocs.io/en/latest/t ... wings.html
The following examples are generating a Line and a BSpline file that can be displayed in DWGTV.

Code: Select all

import ezdxf

dwg = ezdxf.new('R2010')  # create a new DXF R2010 drawing, official DXF version name: 'AC1024'

msp = dwg.modelspace()  # add new entities to the model space
msp.add_line((0, 0), (10, 0))  # add a LINE entity
dwg.saveas('line.dxf')

Code: Select all

import ezdxf

dwg = ezdxf.new('AC1015')  # splines requires the DXF R2000 format or later

fit_points = [(0, 0, 0), (750, 500, 0), (1750, 500, 0), (2250, 1250, 0)]
msp = dwg.modelspace()
msp.add_spline(fit_points)

dwg.saveas("simple_spline.dxf")
The lib is able to load and to save in many DXF format version. It can also handle R12.
http://ezdxf.readthedocs.io/en/latest/r12writer.html
http://ezdxf.readthedocs.io/en/latest/i ... f-versions

Code: Select all

from random import random
from ezdxf.r12writer import r12writer

with r12writer("quick_and_dirty_dxf_r12.dxf") as dxf:
    dxf.add_line((0, 0), (17, 23))
    dxf.add_circle((0, 0), radius=2)
    dxf.add_arc((0, 0), radius=3, start=0, end=175)
    dxf.add_solid([(0, 0), (1, 0), (0, 1), (1, 1)])
    dxf.add_point((1.5, 1.5))
    dxf.add_polyline([(5, 5), (7, 3), (7, 6)])  # 2d polyline
    dxf.add_polyline([(4, 3, 2), (8, 5, 0), (2, 4, 9)])  # 3d polyline
    dxf.add_text("test the text entity", align="MIDDLE_CENTER")

May be you can handle your entities and pass those to this lib for the exporting...
The library can be installed with pip and could be deployed with the FC installer.
Attachments
quick_and_dirty_dxf_r12.dxf
(793 Bytes) Downloaded 35 times
line.dxf
(20.29 KiB) Downloaded 32 times
simple_spline.dxf
(18.95 KiB) Downloaded 39 times
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: R14 ACAD Compatibilty Testing

Post by NormandC »

easyw-fc wrote: Sun Jul 01, 2018 8:27 pm The library can be installed with pip and could be deployed with the FC installer.
This is undesirable on Linux. You're adding another method of installing besides the operating system's method. I hate it, one of the reasons being pip is CLI only. And it's almost certain to create trouble with some Linux distributions. Linux distros don't look kindly to bundling third-party libraries either.

So ezdxf would need to be packaged in all Linux distros that provide FreeCAD. :|

Oh, and then there's the fact that ezdxf is dropping Python 2 support. https://ezdxf.mozman.at/dropping-python2-support.html
Post Reply