Hello,
I need to export a STP file and Points file in inch units. I have both the Preferences -> Import/Export -> STEP -> Units for export of STEP -> nches and the Preferences -> General -> Units -> User System -> Imperical dcimal (in/lb). Both will export in milimeters
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16131 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
File attachment link won't upload because of file size but below is a download to the STP file i'm importing.
https://leisfs.lundeng.com/link/Ii3DkVTffkUVjySamQpJHE
This part is 57.99 inches x 54.00 inches (see attached)
Thanks,
Exporting STP file in inches
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Exporting STP file in inches
Hi gwlund, welcome.
Hmmm... I'm not sure it's possible. But anyway, the question is why ?
STL is an exchange format so there should be no inconvenience that it is exported in standard millimeters.
Hmmm... I'm not sure it's possible. But anyway, the question is why ?
STL is an exchange format so there should be no inconvenience that it is exported in standard millimeters.
Re: Exporting STP file in inches
Since the preferences dialog for STEP export has a drop-down box for "Units for export of STEP" I would assume it worked at one point.
- pl7i92LCNC
- Posts: 208
- Joined: Tue Mar 12, 2019 3:03 pm
- Location: RLP DE
Re: Exporting STP file in inches
does it work ?
and if can you please mark this tread as solved so other users will Click your tread as first
and if can you please mark this tread as solved so other users will Click your tread as first
Re: Exporting STP file in inches
What format do you mean when talking about "Points file"?
The settings Preferences -> General -> Units -> User System -> Imperial decimal (in/lb) only affects the graphical user interface and doesn't control any import or export. Independent of what unit you choose the internal unit for length in FreeCAD is always in mm.
The file box_in.step has these lines:
From the latter file you can see that units are based in inch and it also contains the conversion factor to later compute the coordinates in mm.
Now when you search for the CARTESIAN_POINT entities you can easily see that they are converted in inch.
Tested with:
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17696 (Git)
Build type: Release
Branch: master
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
The settings Preferences -> General -> Units -> User System -> Imperial decimal (in/lb) only affects the graphical user interface and doesn't control any import or export. Independent of what unit you choose the internal unit for length in FreeCAD is always in mm.
I did the following test.I have both the Preferences -> Import/Export -> STEP -> Units for export of STEP -> Inches
- Create a standard box in Part wb
- Set export unit of STEP to mm and save the box to a step file box_mm.step
- Set export unit of STEP to in and save the box to a step file box_in.step
- Open the two files in a text editor or a diff tool to see the changes
Code: Select all
#346 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );
#347 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );
#348 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() );
Code: Select all
#346 = ( CONVERSION_BASED_UNIT('INCH',#348) LENGTH_UNIT() NAMED_UNIT(
#347) );
#347 = DIMENSIONAL_EXPONENTS(1.,0.,0.,0.,0.,0.,0.);
#348 = LENGTH_MEASURE_WITH_UNIT(25.4,#349);
#349 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );
#350 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );
#351 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() );
Now when you search for the CARTESIAN_POINT entities you can easily see that they are converted in inch.
Tested with:
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17696 (Git)
Build type: Release
Branch: master
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Re: Exporting STP file in inches
Thanks for the response. Interesting to see your results when exporting a natively drawn part. My problem manifests when first importing a STP file (link in the original post) which is in mm (SI units) and then trying to export it to at STP file in inches (Imperial units).
Not sure why it wouldn't work just like your test but it does not.
The output STP does not have any reference to INCH units like you show in your example
When exporting as Points I mean using the Points WB to export to an ASCII points file. It also is hard-coded to use mm apparently.
Not sure why it wouldn't work just like your test but it does not.
The output STP does not have any reference to INCH units like you show in your example
Code: Select all
#42017 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );
#42018 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );
#42019 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() );
#42020 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-07),#42017,
'distance_accuracy_value','confusion accuracy');