Sketcher: Change nomenclature relating to Block constraint
This commit is contained in:
@@ -55,7 +55,7 @@ enum ConstraintType {
|
||||
Symmetric = 14,
|
||||
InternalAlignment = 15,
|
||||
SnellsLaw = 16,
|
||||
Blocked = 17,
|
||||
Block = 17,
|
||||
NumConstraintTypes // must be the last item!
|
||||
};
|
||||
|
||||
|
||||
@@ -72,8 +72,8 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
this->getConstraintPtr()->First = FirstIndex;
|
||||
return 0;
|
||||
}
|
||||
else if (strcmp("Blocked",ConstraintType) == 0) {
|
||||
this->getConstraintPtr()->Type = Blocked;
|
||||
else if (strcmp("Block",ConstraintType) == 0) {
|
||||
this->getConstraintPtr()->Type = Block;
|
||||
this->getConstraintPtr()->First = FirstIndex;
|
||||
return 0;
|
||||
}
|
||||
@@ -489,7 +489,7 @@ std::string ConstraintPy::representation(void) const
|
||||
case Coincident : result << "'Coincident'>";break;
|
||||
case Horizontal : result << "'Horizontal' (" << getConstraintPtr()->First << ")>";break;
|
||||
case Vertical : result << "'Vertical' (" << getConstraintPtr()->First << ")>";break;
|
||||
case Blocked : result << "'Blocked' (" << getConstraintPtr()->First << ")>";break;
|
||||
case Block : result << "'Block' (" << getConstraintPtr()->First << ")>";break;
|
||||
case Radius : result << "'Radius'>";break;
|
||||
case Parallel : result << "'Parallel'>";break;
|
||||
case Tangent :
|
||||
|
||||
@@ -1310,6 +1310,7 @@ int Sketch::addConstraint(const Constraint *constraint)
|
||||
}
|
||||
break;
|
||||
case Sketcher::None: // ambiguous enum value
|
||||
case Sketcher::Block: // handled separately while adding geometry
|
||||
case NumConstraintTypes:
|
||||
break;
|
||||
}
|
||||
@@ -1334,7 +1335,7 @@ int Sketch::addConstraints(const std::vector<Constraint *> &ConstraintList, std:
|
||||
|
||||
int cid = 0;
|
||||
for (std::vector<Constraint *>::const_iterator it = ConstraintList.begin();it!=ConstraintList.end();++it,++cid) {
|
||||
if (!unenforceableConstraints[cid] && (*it)->Type != Blocked) {
|
||||
if (!unenforceableConstraints[cid] && (*it)->Type != Block) {
|
||||
rtn = addConstraint (*it);
|
||||
}
|
||||
else {
|
||||
@@ -1357,7 +1358,7 @@ void Sketch::getBlockedGeometry(std::vector<bool> & blockedGeometry, std::vector
|
||||
int i = 0;
|
||||
for (std::vector<Constraint *>::const_iterator it = ConstraintList.begin();it!=ConstraintList.end();++it,++i) {
|
||||
switch((*it)->Type) {
|
||||
case Blocked:
|
||||
case Block:
|
||||
{
|
||||
int geoid = (*it)->First;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user