Sketcher: Support for detecting expressions in constraints
This commit is contained in:
@@ -5839,6 +5839,15 @@ int SketchObject::changeConstraintsLocking(bool bLock)
|
||||
return cntSuccess;
|
||||
}
|
||||
|
||||
bool SketchObject::constraintHasExpression(int constrid)
|
||||
{
|
||||
App::ObjectIdentifier spath = this->Constraints.createPath(constrid);
|
||||
|
||||
App::PropertyExpressionEngine::ExpressionInfo expr_info = this->getExpression(spath);
|
||||
|
||||
return (expr_info.expression != 0);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief SketchObject::port_reversedExternalArcs finds constraints that link to endpoints of external-geometry arcs,
|
||||
|
||||
@@ -265,6 +265,8 @@ public:
|
||||
bool isPointOnCurve(int geoIdCurve, double px, double py);
|
||||
double calculateConstraintError(int ConstrId);
|
||||
int changeConstraintsLocking(bool bLock);
|
||||
/// returns whether a given constraint has an associated expression or not
|
||||
bool constraintHasExpression(int constrid);
|
||||
|
||||
///porting functions
|
||||
int port_reversedExternalArcs(bool justAnalyze);
|
||||
|
||||
Reference in New Issue
Block a user