TechDraw: export View to DXF
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: TechDraw: export View to DXF
Looks like __objs__ is a list of DocumentObjects with a Shape property. Need to either give DrawViewPart a Shape property or
make a version of "importDXF.export" that takes raw edges as input.
make a version of "importDXF.export" that takes raw edges as input.
Re: TechDraw: export View to DXF
have you seen @ row 1935 of importDXF.pywandererfan wrote: ↑Mon Mar 19, 2018 5:59 pm Looks like __objs__ is a list of DocumentObjects with a Shape property. Need to either give DrawViewPart a Shape property or
make a version of "importDXF.export" that takes raw edges as input.
Code: Select all
elif (len(exportList) == 1) and (exportList[0].isDerivedFrom("TechDraw::DrawPage")):
# page: special hack-export! (see below)
exportPage(exportList[0],filename)
Code: Select all
def exportPage(page,filename):
Code: Select all
elif view.isDerivedFrom("TechDraw::DrawViewDraft"):
geom = Draft.getDXF(view)
block,insert,blockcount = getViewBlock(geom,view,blockcount)
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: TechDraw: export View to DXF
Looks like only for DraftView with Svg to Dxf conversion, but I'll look deeper.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: TechDraw: export View to DXF
How does this file look in 2.13? It was converted by importDXF.export.
- Attachments
-
- export.dxf
- (13.64 KiB) Downloaded 124 times
Re: TechDraw: export View to DXF
This is how it looks in LibreCAD 2.2.0-alpha.
- Attachments
-
- FC_wandererfan_export_lcad22a.png (6.2 KiB) Viewed 2110 times
Re: TechDraw: export View to DXF
it is perfect!wandererfan wrote: ↑Tue Mar 20, 2018 11:53 pmHow does this file look in 2.13? It was converted by importDXF.export.
The good news are that this format is also directly compatible/readable with Adobe products, where the old export was not
Very nice and useful addition! Looking forward to see it in the main stream
Re: TechDraw: export View to DXF
Hi,wandererfan wrote: ↑Tue Mar 20, 2018 11:53 pmHow does this file look in 2.13? It was converted by importDXF.export.
Are you going to PR this to FC 0.18?
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: TechDraw: export View to DXF
Hallo group,
I'm having a problem with the DXF export of Architectural section and I think that my issue is similar, this is the post:
https://forum.freecadweb.org/viewtopic.php?f=3&t=36131
Have you some advices?
Thank you
I'm having a problem with the DXF export of Architectural section and I think that my issue is similar, this is the post:
https://forum.freecadweb.org/viewtopic.php?f=3&t=36131
Have you some advices?
Thank you
Re: TechDraw: export View to DXF
Hi @wanderfan
I realized that I can read a DXF using the new readDXF function.
Code: Select all
import Import
Import.readDXF.__doc__
'readDXF(filename,[document,ignore_errors]): Imports a DXF file into the given document. ignore_errors is True by default.'
Code: Select all
Import.writeDXFObject.__doc__
'writeDXFObject([objects],filename [,version,usePolyline,optionSource]): Exports DocumentObject(s) to a DXF file.'
But If I read back the DXF with Import.readDXF I miss the bsplines...
Could it be possible to add bsplines also on Import.readDXF function?
here a sample Thanks
Maurice