Part Design draft angle does not accept units
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Part Design draft angle does not accept units
I tried to get the graft angle from an expression with unit '10 deg'. The dialog accepted the units but when I confirmed with "OK" I got an unexpected error message "std::bad_cast".
Then I tried to do that using the property panel and got the explanation, units are not expected here!
It looks like a bug, I do not know what's the expected behavior. Is there a way to allow units and maintain compatibility with documents that do not use units?- Attachments
-
- err2.png (49.55 KiB) Viewed 881 times
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Part Design draft angle does not accept units
The property type chosen for the Angle is FloatConstraint rather than Angle, not sure why. A workaround is to add /deg to your formula.
For example, suppose you have an angle constraint in a sketch you want to refer to for the draft angle.
Instead of
Sketch.Constraints.my_angle
you would use
Sketch.Constraints.my_angle/deg
For example, suppose you have an angle constraint in a sketch you want to refer to for the draft angle.
Instead of
Sketch.Constraints.my_angle
you would use
Sketch.Constraints.my_angle/deg
Last edited by TheMarkster on Mon Aug 12, 2019 9:41 pm, edited 1 time in total.
Re: Part Design draft angle does not accept units
I know the work-around. Looking for a real fix.
Re: Part Design draft angle does not accept units
Typo?
Sketch.Constraints.my_angle/deg
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Part Design draft angle does not accept units
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am