How to change units in FreeCAD? (forRadius less than 0.01mm)

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
daidalosnet
Posts: 5
Joined: Thu Jan 31, 2013 9:07 pm

How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby daidalosnet » Thu Jan 31, 2013 9:09 pm

I need do draw cylinders with a radius of 0.001 mm, but FreeCAD limits me to a minimum radius of 0.01mm.

I know the accuracy is even more than a micron, but how do I change the settings that I can work with such a radius?
By the way: Points instead of units would be fine too as long as the relations would be correct.

Thanks!
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby jmaustpc » Thu Jan 31, 2013 11:16 pm

Hi daidalosnet
daidalosnet wrote:I need do draw cylinders with a radius of 0.001 mm, but FreeCAD limits me to a minimum radius of 0.01mm.

I know the accuracy is even more than a micron, but how do I change the settings that I can work with such a radius?
By the way: Points instead of units would be fine too as long as the relations would be correct.

Thanks!
As of right now, from a GUI users perspective one can not adjust either the units or the maximum precision (number of decimal places) of the the gui input fields.

However FreeCAD can already make these parts (at 0.001 size box for example), if you enter the data via the Python command line or by running a script/macro.

For example if you create a new macro, paste the following into it, run the macro, then hit "zoom to view all" you will see a box 0.001 cubed.

Code: Select all

from FreeCAD import Base
from FreeCAD import Part
bb = Part.makeBox(0.001,0.001,0.001,Base.Vector(0,-2,0))
Part.show(bb)
You can also translate Units with a script.

If you only want to use the gui, then the only thing I can suggest is that you scale your whole model, e.g. multiply all dimensions by 10.

After 0.13 is released we could consider how to change these two issues, if there is enough interest.

Jim
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby NormandC » Fri Feb 01, 2013 2:23 am

jmaustpc wrote:As of right now, from a GUI users perspective one can not adjust either the units or the maximum precision (number of decimal places) of the the gui input fields.
This is not entirely true in v0.13.

In Tools --> Edit Parameters, under the Units folder you can create a new key for decimal values.

Right-click in the right pane and select New --> New integer item. Name it to "Decimals", and set desired value (4 for 0.0001 precision)

Image

After that, in the Data tab, values will show with 4 digits after decimal point.

Image

But only the Property fields in the Data tab get these 4 digits. In PartDesign, the GUI input fields in the task panel are hard-coded to 2 digits.
daidalosnet
Posts: 5
Joined: Thu Jan 31, 2013 9:07 pm

Re: How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby daidalosnet » Fri Feb 01, 2013 3:34 am

Thank you two for the answers! I think Normandc's solution was the easiest to implement for me! Thanks!
User avatar
bejant
Posts: 5871
Joined: Thu Jul 11, 2013 3:06 pm

Re: How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby bejant » Fri Jul 12, 2013 9:52 pm

In referring to normandc's post of Fri Feb 01, 2013 2:23 am:
But only the Property fields in the Data tab get these 4 digits. In PartDesign, the GUI input fields in the task panel are hard-coded to 2 digits.
I am trying to become familiar with FreeCad and am wondering if I (a non-programmer) might be able to change the GUI input field to accept up to 4 decimal places, and if so, how? The reason for this is because I anticipate that after I create a part I will scale it by a factor of 2.54 or 25.4 so my inaccuracies will become compounded.

Or maybe I'm approaching this in a manner that is completely wrong?

FWIW, for now I am working primarily in the Part, Draft, and Drawing Workbenches.

Thanks in advance for any assistance you might be able to provide.


OS: Windows XP
Platform: 32-bit
Version: 0.13.1828
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.3.0
User avatar
bejant
Posts: 5871
Joined: Thu Jul 11, 2013 3:06 pm

Re: How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby bejant » Fri Jul 12, 2013 9:58 pm

I forgot to mention that for now my workaround is just to create parts that are 100x larger! ;)
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby NormandC » Sat Jul 13, 2013 5:02 am

Scaling is always a bad idea in CAD. The only valid use I can think of is for plastic-injected molds where you need to make your mold about 3% bigger to allow for plastic shrinkage.

Scaling to convert to metric is a bad idea, just model in metric to begin with.
bejant wrote:I am trying to become familiar with FreeCad and am wondering if I (a non-programmer) might be able to change the GUI input field to accept up to 4 decimal places, and if so, how?
Us users cannot change it, as I said it is hard coded.

Blessed will be the day when Americans stop using that prehistoric and illogical unit system and convert to what the rest of the whole damn world use... :roll:
oldestfox
Posts: 98
Joined: Sun Jun 30, 2013 2:15 pm
Location: Southeast Texas, USA

Re: How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby oldestfox » Sat Jul 13, 2013 7:21 pm

I also had my concerns about the precision of FreeCAD.
Blessed will be the day when Americans stop using that prehistoric and illogical unit system and convert to what the rest of the whole damn world use...
I agree 1000 percent. (precision?) It's just that, that would be a *far more monumental* task than putting US units in FreeCAD in the first place. ;)

I normally don't need 4 place precision with inches. If FreeCAD had 4 place precision as the norm then I could just draft in mm*1000 and call it inches. Then if I wanted to export a .stl for example, I could just go in and scale my drawing to true metric (/25.4). Then there would just be one instance of rounding inaccuracy. Probably close enough unless I was designing a "brain surgery robot". :o
In PartDesign, the GUI input fields in the task panel are hard-coded to 2 digits.
Couldn't 3 or 4 digits be hard-coded instead of the 2? Or is there some underlying reason that it must remain 2?
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby NormandC » Sat Jul 13, 2013 7:50 pm

Or is there some underlying reason that it must remain 2?
0.01mm amounts to 0.0004". That's pretty darn precise and good enough... in millimeters. (internally FreeCAD is a lot more precise FYI)

I recommend you place a feature request if you want more than 2 digits, here in the forum it's just talk that will be forgotten in a few days. It's better to use the bug tracker.

https://sourceforge.net/apps/mantisbt/f ... n_page.php
It's just that, that would be a *far more monumental* task than putting US units in FreeCAD in the first place. ;)
And if an American had actually stepped up to do the work, FreeCAD would already support US/imperial units.

This has been requested for freaking years. Yet most FreeCAD developers are Europeans who have no use for imperial units (with good reason); the country from where come the most FreeCAD downloads on Sourceforge is the USA. Go figure. Are there so few able programmers in the USA compared to Europe, willing to help out? Or is that too socialistic an endeavour? ;)
danielfalck
Posts: 395
Joined: Fri Oct 07, 2011 8:58 pm
Location: Beaverton,Oregon, USA
Contact:

Re: How to change units in FreeCAD? (forRadius less than 0.01mm)

Postby danielfalck » Sat Jul 13, 2013 8:12 pm

I work in both metric and imperial units here (I work in the bike industry). We often times work with dimensions/tolerances in the .002mm or smaller range (grinding precision cylindrical features). I'm going to guess that there a lot of folks in the scientific world out there using much smaller units than that. Maybe adding a preferences feature to the dialogs in Sketcher that allows any reasonable amount of precision to the right of the decimal point would be good- if it doesn't cause the constraints engine to crash.