Mesh: Fix linter warnings
This commit is contained in:
@@ -71,7 +71,7 @@ App::DocumentObjectExecReturn* SegmentByMesh::execute()
|
||||
if (!kernel) {
|
||||
return new App::DocumentObjectExecReturn("No mesh specified.\n");
|
||||
}
|
||||
else if (mesh->isError()) {
|
||||
if (mesh->isError()) {
|
||||
return new App::DocumentObjectExecReturn("No valid mesh.\n");
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ App::DocumentObjectExecReturn* SegmentByMesh::execute()
|
||||
if (!toolmesh) {
|
||||
return new App::DocumentObjectExecReturn("No toolmesh specified.\n");
|
||||
}
|
||||
else if (tool->isError()) {
|
||||
if (tool->isError()) {
|
||||
return new App::DocumentObjectExecReturn("No valid toolmesh.\n");
|
||||
}
|
||||
|
||||
@@ -105,18 +105,17 @@ App::DocumentObjectExecReturn* SegmentByMesh::execute()
|
||||
}
|
||||
|
||||
std::vector<MeshCore::FacetIndex> faces;
|
||||
std::vector<MeshGeomFacet> aFaces;
|
||||
|
||||
MeshAlgorithm cAlg(rMeshKernel);
|
||||
if (cNormal.Length() > 0.1f) { // not a null vector
|
||||
if (cNormal.Length() > 0.1F) { // not a null vector
|
||||
cAlg.GetFacetsFromToolMesh(rToolMesh, cNormal, faces);
|
||||
}
|
||||
else {
|
||||
cAlg.GetFacetsFromToolMesh(rToolMesh, Base::Vector3f(0.0, 1.0f, 0.0f), faces);
|
||||
cAlg.GetFacetsFromToolMesh(rToolMesh, Base::Vector3f(0.0, 1.0F, 0.0F), faces);
|
||||
}
|
||||
|
||||
// if the clipping plane was set then we want only the visible facets
|
||||
if (cNormal.Length() > 0.1f) { // not a null vector
|
||||
if (cNormal.Length() > 0.1F) { // not a null vector
|
||||
// now we have too many facets since we have (invisible) facets near to the back clipping
|
||||
// plane, so we need the nearest facet to the front clipping plane
|
||||
//
|
||||
@@ -149,6 +148,8 @@ App::DocumentObjectExecReturn* SegmentByMesh::execute()
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<MeshGeomFacet> aFaces;
|
||||
aFaces.reserve(faces.size());
|
||||
for (MeshCore::FacetIndex it : faces) {
|
||||
aFaces.push_back(rMeshKernel.GetFacet(it));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user