logo
NOTICE:  This is the new PunchCAD forum. You should have received an email with your new password around August 27, 2014. If you did not, or would like it reset, simply use the Lost Password feature, and enter Answer as the security answer.
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
blowlamp  
#1 Posted : Thursday, March 26, 2009 6:23:33 AM(UTC)
blowlamp

Rank: Senior Member

Joined: 6/28/2008(UTC)
Posts: 648

DXF's don't seem to save inch/mm units reliably. Only DXF R12 imports correctly into my CAM package, the other versions only import as inch units.

All the best, Martin.
posh.de  
#2 Posted : Thursday, March 26, 2009 9:53:06 AM(UTC)
posh.de

Rank: Senior Member

Joined: 2/23/2007(UTC)
Posts: 484
Germany

Thanks: 28 times
Was thanked: 50 time(s) in 36 post(s)
Originally Posted by: blowlamp Go to Quoted Post
DXF's don't seem to save inch/mm units reliably.


the [URL="http://www.dailyautocad.com/autocad/understanding-scale-concept-and-units-in-autocad/"]DXF/DWG format does in general not incorporate information concerning the units[/URL] used by the creator but only dimensionless coordinate values, you can call it DWG units, of the contained entities.

thus importing DXF/DWG data into a CAx application, the (assumed) unit used by the creator of the drawing must be configured manually prior the import either by selecting the unit in the program settings or sometimes being asked for during the import process.

you can of course adjust afterwards by simply checking an entity for a known length and scale appropriately.

hth,
Norbert
blowlamp  
#3 Posted : Thursday, March 26, 2009 11:20:54 AM(UTC)
blowlamp

Rank: Senior Member

Joined: 6/28/2008(UTC)
Posts: 648

Point taken Norbert, but ViaCAD does give the option to save in metric or imperial, and coupled with the fact that DXF R12 saves correctly, I thought it would neaten things up a bit if ViaCAD was consistent in its actions.

All the best, Martin.
Tim Olson  
#4 Posted : Thursday, March 26, 2009 2:30:31 PM(UTC)
Tim Olson

Rank: Senior Member

Joined: 2/2/2007(UTC)
Posts: 5,447
United States

Was thanked: 502 time(s) in 353 post(s)
Originally Posted by: blowlamp Go to Quoted Post
DXF's don't seem to save inch/mm units reliably. Only DXF R12 imports correctly into my CAM package, the other versions only import as inch units.

All the best, Martin.


Hi Martin

If you can zip and send me a small file not exporting to the correct units that would help us track this down. Send to [email protected].

To test our DWG files, we validate using AutoDesk's DWG TrueView.


Tim
Tim Olson
IMSI Design/Encore
posh.de  
#5 Posted : Friday, March 27, 2009 4:36:13 AM(UTC)
posh.de

Rank: Senior Member

Joined: 2/23/2007(UTC)
Posts: 484
Germany

Thanks: 28 times
Was thanked: 50 time(s) in 36 post(s)
Originally Posted by: blowlamp Go to Quoted Post
Point taken Norbert, but ViaCAD does give the option to save in metric or imperial...


ah, understand, have tried to reproduce by exporting a 1" square to DXF 2000 from SFX v5.5.831 Win with no success, exports "1" with imperial unit (inch) and "25.4" with metrical unit (mm) selected.

Thus maybe already fixed/vanished for recent releases?

To check the DXF files, I validate using a [URL="http://www.ultraedit.com/"]text editor[/URL].

Norbert
ttrw  
#6 Posted : Friday, March 27, 2009 5:14:27 AM(UTC)
ttrw

Rank: Senior Member

Joined: 4/1/2007(UTC)
Posts: 1,583

Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: posh.de Go to Quoted Post

To check the DXF files, I validate using a [URL="http://www.ultraedit.com/"]text editor[/URL].


How do you do that then, Norbert? I'm curious! :D

(PS- I suppose TextEdit in OS X, for us Mac users is okay to use too?)
posh.de  
#7 Posted : Friday, March 27, 2009 5:56:59 AM(UTC)
posh.de

Rank: Senior Member

Joined: 2/23/2007(UTC)
Posts: 484
Germany

Thanks: 28 times
Was thanked: 50 time(s) in 36 post(s)
Originally Posted by: ttrw Go to Quoted Post
How do you do that...


• create a single line starting at 0/0/0 and length 1" resp. 25.4mm
• export to DXF (not DWG b'cause binary)
• open with arbitrary text editor e.g. from the OS
• do a search for "LINE" (single word)
• the approx. second hit should show the definition of the line structure, something like:

Code:
LINE<br> 5<br>6B<br>330<br>1F<br>100<br>AcDbEntity<br> 8<br>Layer1<br> 6<br>VOLLINIE<br> 62<br> 150<br>100<br>AcDbLine<br> 10<br>0.0<br> 20<br>0.0<br> 30<br>0.0<br> 11<br>25.4<br> 21<br>0.0<br> 31<br>0.0<br> 0<br>


• below parameter '11' (= legth) you will find *tataaa* the length :cool:

cheers,
Norbert

Originally Posted by: ttrw Go to Quoted Post
(PS- I suppose TextEdit in OS X, for us Mac users is okay to use too?)


P.S.: sure, or the better and free [URL="http://www.barebones.com/products/textwrangler/"]BB TextWrangler[/URL].
ttrw  
#8 Posted : Friday, March 27, 2009 6:37:55 AM(UTC)
ttrw

Rank: Senior Member

Joined: 4/1/2007(UTC)
Posts: 1,583

Was thanked: 2 time(s) in 2 post(s)
yep- works in TextEdit :)

(and it didn't cost an extra $49 either :D )
ttrw attached the following image(s):
25mm line TextEdit.png (19kb) downloaded 5 time(s).

You cannot view/download attachments. Try to login or register.
posh.de  
#9 Posted : Friday, March 27, 2009 7:51:46 AM(UTC)
posh.de

Rank: Senior Member

Joined: 2/23/2007(UTC)
Posts: 484
Germany

Thanks: 28 times
Was thanked: 50 time(s) in 36 post(s)
Originally Posted by: ttrw Go to Quoted Post
(and it didn't cost an extra $49 either :D )


yep, as [URL="http://www.barebones.com/products/textwrangler/download.html"]free[/URL] TextWrangler (not BBEdit) too :D

Norbert
jdi000  
#10 Posted : Friday, March 27, 2009 9:45:28 AM(UTC)
jdi000

Rank: Administration

Joined: 7/29/2007(UTC)
Posts: 1,862
United States

Thanks: 1 times
Was thanked: 87 time(s) in 81 post(s)
Originally Posted by: blowlamp Go to Quoted Post
Point taken Norbert, but ViaCAD does give the option to save in metric or imperial, and coupled with the fact that DXF R12 saves correctly, I thought it would neaten things up a bit if ViaCAD was consistent in its actions.

All the best, Martin.



Hi, Martin

Another thing that might be going on is the $Measurement header in the dxf file this header was added after version 12. Some programs (cad/cam) read the $Measurement header to help pick units when loading a file. When I export a 1" line as mm its getting converted to 25.4 in the line header that Norbert is referring to but the $Measurement header is always 0 on output. This should probably be changed to toggle to 1 for metric when outputting dxf/dwg from VC/Shark.

Try opening your dxf file and changing the 0 to 1 in the $Measurement section and see what happens in the cam program.


Regards

Jason
jdi000 attached the following image(s):
measurementheader.jpg (37kb) downloaded 5 time(s).
measurementheaderindxf.jpg (17kb) downloaded 5 time(s).

You cannot view/download attachments. Try to login or register.
Windows 11, 10
blowlamp  
#11 Posted : Friday, March 27, 2009 11:30:50 AM(UTC)
blowlamp

Rank: Senior Member

Joined: 6/28/2008(UTC)
Posts: 648

Jason.
You are a star. That indeed was the problem I was/am having and changing the setting you describe makes the CAM program switch correctly between units. So thanks to both you and Norbert for helping to pin it down.

Tim, any chance of getting this update into ViaCAD Please?


Thanks all, Martin.
jdi000  
#12 Posted : Friday, March 27, 2009 12:29:57 PM(UTC)
jdi000

Rank: Administration

Joined: 7/29/2007(UTC)
Posts: 1,862
United States

Thanks: 1 times
Was thanked: 87 time(s) in 81 post(s)
>>>>Martin, Glad your up and running


Tim

Your outputting the dxf file with the right conversion done on the geometry but are you toggling the $Measurement header? I think this is only toggling from english to metric its not defining units but measurement system, AutoCAD uses this more for dimensioning I think, but it seems other software is using it to help determine english vs metric systems to decide to apply any conversions to geometry.

Thanks

Jason
Windows 11, 10
Tim Olson  
#13 Posted : Friday, March 27, 2009 12:38:21 PM(UTC)
Tim Olson

Rank: Senior Member

Joined: 2/2/2007(UTC)
Posts: 5,447
United States

Was thanked: 502 time(s) in 353 post(s)
Hi Jason

>>but are you toggling the $Measurement header?

No I was not. I added in code to change this field based on metric or english and now testing with TrueView for all the different cases.

So far it seems to work very well.

Many thanks Jason!

Tim
Tim Olson
IMSI Design/Encore
blowlamp  
#14 Posted : Monday, April 27, 2009 5:02:03 PM(UTC)
blowlamp

Rank: Senior Member

Joined: 6/28/2008(UTC)
Posts: 648

Working well so far in 833:)
Thanks for fixing, Tim.

Martin.
Tim Olson  
#15 Posted : Tuesday, April 28, 2009 1:14:26 PM(UTC)
Tim Olson

Rank: Senior Member

Joined: 2/2/2007(UTC)
Posts: 5,447
United States

Was thanked: 502 time(s) in 353 post(s)
Originally Posted by: blowlamp Go to Quoted Post
Working well so far in 833:)
Thanks for fixing, Tim.

Martin.


Excellent, thanks for confirming.

FYI in build 834 we've got another big improvement coming to the DWG translators regarding improved support for multi-line text from AutoCAD.


Tim
Tim Olson
IMSI Design/Encore
jdi000  
#16 Posted : Tuesday, April 28, 2009 3:18:46 PM(UTC)
jdi000

Rank: Administration

Joined: 7/29/2007(UTC)
Posts: 1,862
United States

Thanks: 1 times
Was thanked: 87 time(s) in 81 post(s)
Originally Posted by: Tim Olson Go to Quoted Post
Excellent, thanks for confirming.

FYI in build 834 we've got another big improvement coming to the DWG translators regarding improved support for multi-line text from AutoCAD.


Tim



Excellent!!
Windows 11, 10
Users browsing this topic
Guest (4)
Forum Jump  
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.