Assembly: Fix lengths cannot be negative (#24625)
* Assembly: Fix lengths cannot be negative * Update PropertyUnits.cpp * Update PropertyUnits.h * Update JointObject.py
This commit is contained in:
@@ -518,7 +518,12 @@ TYPESYSTEM_SOURCE(App::PropertyLength, App::PropertyQuantityConstraint)
|
||||
PropertyLength::PropertyLength()
|
||||
{
|
||||
setUnit(Base::Unit::Length);
|
||||
setConstraints(&LengthStandard);
|
||||
enableNegative(false);
|
||||
}
|
||||
|
||||
void PropertyLength::enableNegative(bool on)
|
||||
{
|
||||
setConstraints(on ? nullptr : &LengthStandard);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
@@ -863,3 +868,4 @@ PropertyYoungsModulus::PropertyYoungsModulus()
|
||||
{
|
||||
setUnit(Base::Unit::YoungsModulus);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user