Open *.Dwg with Qcad Pro in FCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- thomas-neemann
- Veteran
- Posts: 11939
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Open *.Dwg with Qcad Pro in FCAD
here is a posibility for 3D-DWG
https://forum.freecadweb.org/viewtopic. ... 10#p417264
edit
via ifc
https://www.youtube.com/watch?v=UkLlxGo5ZPE
https://forum.freecadweb.org/viewtopic. ... 10#p417264
edit
via ifc
https://www.youtube.com/watch?v=UkLlxGo5ZPE
Last edited by thomas-neemann on Tue Jan 25, 2022 9:43 am, edited 1 time in total.
Re: Open *.Dwg with Qcad Pro in FCAD
On windows, there's a file called dwg2dwg.bat, which contains the following info:yorik wrote: ↑Mon Jan 24, 2022 12:55 pm Can you check if any error message appears in the report window?
Other thing to test is with a file path that has no spaces or special characters in it, does it work any better?
the syntax of dwg2dwg is very simple, so one can also test in a terminal:
C:\path\to\...\dwg2dwg.exe -o "C:\path\to\some\file.dxf" "C:\path\to\some\file.dwg"
Code: Select all
@echo off
qcadcmd.com -no-gui -allow-multiple-instances -autostart scripts\Pro\Tools\Dwg2Dwg\Dwg2Dwg.js %0 %*
specificying the dwg2dwg.bat file in freecad
tested dwg2dwg.bat in the command prompt and it works:
Code: Select all
C:\Users\dimitar\Documents\_apps\qcad-3.27.1-pro-win64\dwg2dwg.bat -o c:\users\dimitar.pouchnikov\desktop\test1.dxf c:\users\dimitar\desktop\test1.dwg
QCAD version 3.27.1
18:44:31: Debug: Input file: c:\users\dimitar\desktop\test1.dwg
18:44:31: Debug: Output file: c:\users\dimitar\desktop\test1.dxf
18:44:31: Debug: DXF/DWG Release: R27
18:44:31: Debug: calling odInitialize
18:44:31: Debug: dropped global XDATA (no res buf): "ViewportCenter"
Warning: old and new property values for property "Arrow block" have different types: QString vs. int
Conversion finished.
Code: Select all
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\dimitar\Documents\_apps\FreeCAD_0.20.26858_Win-LPv12.5.4_vc17.x-x86-64\Mod\Draft\importDWG.py", line 106, in insert
doc = importDXF.insert(dxf, docname)
File "C:\Users\dimitar\Documents\_apps\FreeCAD_0.20.26858_Win-LPv12.5.4_vc17.x-x86-64\Mod\Draft\importDXF.py", line 2845, in insert
Import.readDXF(filename)
<class 'RuntimeError'>: File doesn't exist
- ragohix769
- Posts: 568
- Joined: Sat Jul 18, 2020 7:04 am
- Location: Rome - Italy
Re: Open *.Dwg with Qcad Pro in FCAD
I'm on Linux, and pointing on dwg2dwg, create a freeze (or illimited waiting) on Fcad while opening a dwg file. I've not tested using it directly by shell console, I'll try.
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
- ragohix769
- Posts: 568
- Joined: Sat Jul 18, 2020 7:04 am
- Location: Rome - Italy
Re: Open *.Dwg with Qcad Pro in FCAD
Yes base geometry normally is good with ODA, but text, quotation, layers, etc etc, not so good (in my experience, at least). With Qcad I've opened some Dwg that ODA was imported not so good (pity I cannot post it here, because these are works/files from other clients, not mine), and Qcad it's really fast, you can erase things very quickly. What is not good with Qcad, IMHO, is that a lot of times texts imported (only from dwg made with recent Autocad versions) are giant (in my experience, I repeat).
I really hate dwg and lock-in/proprietary standard.
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
- thomas-neemann
- Veteran
- Posts: 11939
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Open *.Dwg with Qcad Pro in FCAD
that's the way it is with me too, so in my opinion freecad will change the cad landscape as radically as linux changed the server landscape.
Re: Open *.Dwg with Qcad Pro in FCAD
Thanks for testing guys! What I can gather so far:
- on windows one has to use the dwg2dwg.bat
- on linux too, the dwg2dwg util is a bash script. Unded the hood it launches the qcad main executable with the -no-gui option and executes a Dwg2Dwg.js script.
- the script works on windows too when used in a terminal
So most probably the problem is when FreeCAD calls the dwg2dwg script. I'll add more debugging info to importDWG.py so we can look further
- on windows one has to use the dwg2dwg.bat
- on linux too, the dwg2dwg util is a bash script. Unded the hood it launches the qcad main executable with the -no-gui option and executes a Dwg2Dwg.js script.
- the script works on windows too when used in a terminal
So most probably the problem is when FreeCAD calls the dwg2dwg script. I'll add more debugging info to importDWG.py so we can look further
- ragohix769
- Posts: 568
- Joined: Sat Jul 18, 2020 7:04 am
- Location: Rome - Italy
Re: Open *.Dwg with Qcad Pro in FCAD
I've tested more (I'm on Linux) the dwg2dwg lib, and yes it works in the end (but importing directly in Fcad by Qcad pro lib, it's really really slow, it' takes a lot of minutes on my Ryzen7 workstation with 32 GB of ram)yorik wrote: ↑Tue Jan 25, 2022 10:34 am Thanks for testing guys! What I can gather so far:
- on windows one has to use the dwg2dwg.bat
- on linux too, the dwg2dwg util is a bash script. Unded the hood it launches the qcad main executable with the -no-gui option and executes a Dwg2Dwg.js script.
- the script works on windows too when used in a terminal
So most probably the problem is when FreeCAD calls the dwg2dwg script. I'll add more debugging info to importDWG.py so we can look further
But it import "only" geometry, al text and all layers and other thing in dwg, are gone. So at the end it's more useful (to get all the info in the dwg), IMHO, to open the dwg with Qcad pro directly, preprocess all the info that you need there (it's very quickly BTW, Qcad pro it's really a good SW) and then export to dxf to import in Fcad. It's not a very good process, because you need a lot of work to setup all in Fcad and continue working on dwg from other people, and I really hate this, but this workaround it's working.
Of course having more debugging info will be very useful to have a better import. But the big issue here for what I see, IMHO, it's having a better dxf importer/exporter that can get/send all the 2d info in a Fcad file.
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
Re: Open *.Dwg with Qcad Pro in FCAD
Do you use the legacy python dxf importer?ragohix769 wrote: ↑Tue Jan 25, 2022 11:42 am but importing directly in Fcad by Qcad pro lib, it's really really slow, it' takes a lot of minutes on my Ryzen7 workstation with 32 GB of ram
The newer, c++ one is super fast, specially with the "group layers into blocks" option... Here are my settings:
- thomas-neemann
- Veteran
- Posts: 11939
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Open *.Dwg with Qcad Pro in FCAD
usually the dwg is not 1:1, then the text would be unusable when scaling. if you work with image everything is thereragohix769 wrote: ↑Tue Jan 25, 2022 11:42 am ...But it import "only" geometry, al text ..... are gone. ...
test dwg file https://dwgmodels.com/250-apartment-bui ... cades.html
btw: in this example you can see that the beams in dwg files are often cheated
- ragohix769
- Posts: 568
- Joined: Sat Jul 18, 2020 7:04 am
- Location: Rome - Italy
Re: Open *.Dwg with Qcad Pro in FCAD
I use the legacy, maybe it's time to use the newer one!yorik wrote: ↑Tue Jan 25, 2022 11:52 amDo you use the legacy python dxf importer?ragohix769 wrote: ↑Tue Jan 25, 2022 11:42 am but importing directly in Fcad by Qcad pro lib, it's really really slow, it' takes a lot of minutes on my Ryzen7 workstation with 32 GB of ram
The newer, c++ one is super fast, specially with the "group layers into blocks" option... Here are my settings:
Screenshot from 2022-01-25 12-50-54.png
I'll test it with your settings, thanks a lot for the tips
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same