Punch! CAD
»
ViaCAD & Shark
»
Import/Export
»
DXF File conversion after import?
Rank: Senior Member
Joined: 3/21/2017(UTC)
Posts: 952
Thanks: 46 times Was thanked: 319 time(s) in 212 post(s)
I have a piece of software which converts pdf to dxf/dwg files. I have just done one and brought the dxf into VC to check and the sizes are off. So I did a simple test.
I created a 1" x 1" square on a pdf. Converted it brought this into Catia V5 and measured the edge in mm. I get 25.4
I bring the same file into Shark or VC (using mm as the format)and it measures 1mm x 1mm.
If I bring it in to Shark or VC using inch as the format it now measures 25.4 x 25.4.
All conversions are done in mm.
I have a slightly more complex drawing which I initially used, and a distance of 100mm measures 3.93mm (or 4 rounded up). I can provide that file but I need to get rid of the drawing border first. These are the videos attached, and the dwg of the 1 x 1 box. It might be something in the dwg converted file I'm not sure? Not sure how Catia would figure it out if there is something wrong with the dwg?
Any help would be appreciated.
Cheers
File Attachment(s):
CATIA V5 - DWG IMPORT.zip
(2,615kb) downloaded 2 time(s). VC DWG IMPORT.zip
(2,284kb) downloaded 1 time(s). 1 X 1 BOX.pdf
(3kb) downloaded 4 time(s). 1 X 1 BOX.dwg
(15kb) downloaded 2 time(s). You cannot view/download attachments. Try to login or register.
Rank: Senior Member
Joined: 2/23/2007(UTC)
Posts: 484
Thanks: 28 times Was thanked: 50 time(s) in 36 post(s)
in general, DXF/DWG coordinates are defined without units sothat the (assumed) drawing unit needs to be configured by the user before importing the data. Some importers are smart and try to extract the used drawing unit from the dimension style table of the DXF/DWG. 100 mm / 3.93 mm ~ 25.4 (= 1 inch) Configure inch in Shark/VC, import and go back to millimeters if desired.
Rank: Senior Member
Joined: 3/21/2017(UTC)
Posts: 952
Thanks: 46 times Was thanked: 319 time(s) in 212 post(s)
Thanks for the reply. I can change the units for sure to get around it, but is there a way to figure out what's going on in the file which is causing the mishap? I've just done the same conversion, pdf - dxf using inch, and brought that in and got the same results as shown above. I've tried the extract from file, and get the same results. So I believe something must be going on with the converted file? Cheers
Rank: Senior Member
Joined: 2/23/2007(UTC)
Posts: 484
Thanks: 28 times Was thanked: 50 time(s) in 36 post(s)
importing a DXF/DWG with geometry coordinates saved in the drawing unit "inch" with the model space unit configured to millimeters in Shark/VC will obviously lead to the claimed result, i.e. a line being defined as 3.93 (inch) long gets interpreted as a line being 3.93 millimeters long according to the configured model space unit.
1 user thanked posh.de for this useful post.
Rank: Senior Member
Joined: 2/2/2007(UTC)
Posts: 5,447
Was thanked: 502 time(s) in 353 post(s)
If you are importing an AutoCAD DWG/DXF file from 2000 or later, you can use the File : Import : Extract Units from File and not worry about units as they will be converted between the file and your current ViaCAD settings.
Your example file is in the R27 (2013) format and includes a unit descriptor tag marked as millimeter.
As Posh mentioned, some older AutoCAD files as well some 3rd party converters do not set the unit flag and require you set the Import drop down to get the units converted correctly.
I believe most of the major CAD guys are setting the unit flag correctly these days, especially if they are using the OpenDesign libs for conversion.
We write out log files for STEP, IGES, etc into the app user folder, perhaps we should dump a log out for DWG/DXF providing some insight to the source and settings of the incoming file.
Tim
Edited by user Thursday, April 12, 2018 3:52:40 PM(UTC)
| Reason: Not specified
Tim Olson IMSI Design/Encore
1 user thanked Tim Olson for this useful post.
Rank: Senior Member
Joined: 3/21/2017(UTC)
Posts: 952
Thanks: 46 times Was thanked: 319 time(s) in 212 post(s)
Morning,
Thank you very much for the insight here. It gave me some meat to send to the developers and they turned around an update over night and it now works fine. Tim I've attached the file if it's of interest to you to see any difference in them, also you mention a log file. Might be useful. Not always do we know where the files have come from, so should we encounter an issue at least we have something to look at and see if anything jumps out at us.
Is it a lot of bother to do the log files?
Cheers
File Attachment(s):
1 X 1 BOX.dxf
(73kb) downloaded 3 time(s). You cannot view/download attachments. Try to login or register.
Punch! CAD
»
ViaCAD & Shark
»
Import/Export
»
DXF File conversion after import?
Forum Jump
Punch! CAD
ViaCAD & Shark
- News and Announcements
- General
- 2D Drafting
- Surface Modeling
- Solid Modeling
- Subdivision Modeling
- Rendering & Display
- Import/Export
- Tips and Tutorials
- Suggestions
- Gallery
- PowerPack
- Punch Lounge
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.