How to Constrain Custom Length Property With Lower and Upper Bound?

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: How to Constrain Custom Length Property With Lower and Upper Bound?

Post by DeepSOIC »

gbroques wrote: Sat Jan 25, 2020 11:03 pm There is a getPropertyByName method on Part::PartFeature already
I wonder if anyone uses it. If the new interface is implemented, I guess getPropertyByName can be marked deprecated, and be eventually removed.
User avatar
gbroques
Posts: 167
Joined: Thu Jan 23, 2020 3:28 am
Location: St. Louis, Missouri

Re: How to Constrain Custom Length Property With Lower and Upper Bound?

Post by gbroques »

DeepSOIC wrote: Sat Jan 25, 2020 11:15 pm
gbroques wrote: Sat Jan 25, 2020 11:03 pm There is a getPropertyByName method on Part::PartFeature already
I wonder if anyone uses it. If the new interface is implemented, I guess getPropertyByName can be marked deprecated, and be eventually removed.
We could also add getPropertyValueByName and getPropertyObjectByName, and deprecate getPropertyByName in favor of getPropertyValueByName.

In the mean-time, I suppose if I really wanted to set lower and upper bounds, then I could use PropertyFloatConstraint.

I would just weigh the desire for custom bounds against the desire for units. :|

---

Thanks again for being so responsive. I appreciate the insight.
Post Reply