Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
I am using "gear template generator" Gear template generator program to create a gear outline. I set the units to inches, diametral pitch to 12, number of teeth to 12. It draws a gear that is 1 inch in diameter. looks great. I export it to a dxf file.
I then try to bring it into CREO using the instructions here: Create gears for 3D printing with PTC Creo Elements/Direct Modeling Express 6 and Gear Generator - YouTube
I select a workplane, select File->Open, in the popup, I select "File Type" to be "Import 2D to Workplane (...dxf...)". I then select the .dxf file.
No matter what I do, it always shows up as a 1mm diameter gear.
If I set the units in creo to be inches, the gear shows up as 0.04". If I set the units in creo to mm, the gear shows up as 1mm.
I have tried editing the file at C:\Program Files\PTC\Creo Elements\Direct Modeling Express 6.0\dxfdwg\DXFDWG.con, changing these two lines:
CustomUnits OFF
Units mm
I have tried CustomUnits ON and OFF. and I have tried Units mm and inch.
I have tried setting File->Settings->System->Length to inches and mm.
No matter what I do, I get a gear that is way too small.
How do I tell CREO what units the DXF file is?
Either that, or once I get the DXF into CREO as a 2D outline, is there a way to scale it?
Hello,
the answer to the last question is easy. See image 1
The rest is not so simple.
Would you upload the DXF?
If you can not find the button for attachment of a file. picture 2
You have to use the advanced editor for the attachment of a file.
I used the German setting, but the buttons should be at the same place.
Have you contacted the author of the program? He's a hard working guy and would likely be interested if there is a problem.
The DXF file should have the scale built in. It's a text file you can open with notepad. You can see the header explained in http://www.autodesk.com/techpubs/autocad/acad2000/dxf/header_section_group_codes_dxf_02.htm
I see units mentioned several times so it may require a few separate changes.
David Schenken: The DXF file should have the scale built in.
Hm. That's concerning. The help file for the gear generator here:
Specifically says:
Note, however, that on importing DXF, the units are not specified inside the file. Typically, one must indicate to the importing program what units are represented in the file.
It also says:
The DXF export does not include units.
I did edit the file with notepad. I didn't see anything with units.
[eta]
The wikipedia article about DXF format says: "DXF coordinates are always without dimensions so that the reader or user needs to know the drawing unit or has to extract it from the textual comments in the sheets."
If it is always without dimensions, I would think it would import the dxf assuming the units are the same as whatever is set in the CREO space, but it doesn't seem to do that.
Greg
Hello Greg,
In the DXFDWG.con file you might want to try this as the settings:
Units inch
UnitsScale 25.4
This should hopefully bring the drawing in at the right scale.
Regards,
Thom
The Wikipedia article is outdated/incomplete.
The following, for example, from http://stackoverflow.com/questions/21128943/units-vs-real-world
DXF files are by no means 'unitless', so in the case where you absolutely need to know the units, you will need to read the $INSUNITS
group code value, and to double-check it, you can also read the $MEASUREMENT
group code value.
The R2000 dxf spec, or any of the other versions, contain all the info you need on what those values mean. If you go to the 'HEADER Section Group Codes' page, and search for 'units', you will be able to find the listing of all the unit types. For example:
$INSUNITS 70 4
indicates that the dxf file is using metric units, specifically millimeters, as the base unit. So any dimensional or coordinate value stored by the dxf file will be in millimeters.
Default drawing units for AutoCAD DesignCenter blocks: 0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches; 9 = Mils; 10 = Yards; 11 = Angstroms; 12 = Nanometers; 13 = Microns; 14 = Decimeters; 15 = Decameters; 16 = Hectometers; 17 = Gigameters; 18 = Astronomical units; 19 = Light years; 20 = Parsecs
This entry is from an export from Creo based on a drawing in MM.
$INSUNITS
70
4
0