+ Make sure that number of Points and Normals is the same
This commit is contained in:
parent
09b896f40e
commit
530ea288f2
|
@ -127,12 +127,15 @@ void ViewProviderFemConstraintFixed::updateData(const App::Property* prop)
|
|||
*/
|
||||
|
||||
if (strcmp(prop->getName(),"Points") == 0) {
|
||||
const std::vector<Base::Vector3d>& points = pcConstraint->Points.getValues();
|
||||
const std::vector<Base::Vector3d>& normals = pcConstraint->Normals.getValues();
|
||||
if (points.size() != normals.size())
|
||||
return;
|
||||
std::vector<Base::Vector3d>::const_iterator n = normals.begin();
|
||||
|
||||
// Note: Points and Normals are always updated together
|
||||
pShapeSep->removeAllChildren();
|
||||
|
||||
const std::vector<Base::Vector3d>& points = pcConstraint->Points.getValues();
|
||||
const std::vector<Base::Vector3d>& normals = pcConstraint->Normals.getValues();
|
||||
std::vector<Base::Vector3d>::const_iterator n = normals.begin();
|
||||
/*
|
||||
SoMultipleCopy* cp = static_cast<SoMultipleCopy*>(pShapeSep->getChild(0));
|
||||
cp->matrix.setNum(points.size());
|
||||
|
|
Loading…
Reference in New Issue
Block a user