Inspection: support of shape with edges only

This commit is contained in:
wmayer
2022-09-13 17:05:21 +02:00
parent 92294c448e
commit 061ec7f7b4
2 changed files with 26 additions and 3 deletions

View File

@@ -218,6 +218,14 @@ void ViewProviderInspection::updateData(const App::Property* prop)
Base::BoundBox3d bbox = data->getBoundBox();
accuracy = (float)((bbox.LengthX() + bbox.LengthY() + bbox.LengthZ())/300.0 * deviation);
data->getFaces(points, faces, accuracy);
if (points.empty()) {
std::vector<Base::Vector3d> normals_d;
data->getPoints(points, normals_d, accuracy);
normals.reserve(normals_d.size());
std::transform(normals_d.cbegin(), normals_d.cend(), std::back_inserter(normals), [](const Base::Vector3d& p){
return Base::toVector<float>(p);
});
}
}
}
else if (object->getTypeId().isDerivedFrom(pointId)) {