Skip to content

Commit 7fb66cc

Browse files
antonymarionerossignon
authored andcommitted
Update Mesh.cc
1 parent 609e0df commit 7fb66cc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Mesh.cc

+6-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ int Mesh::extractFaceMesh(const TopoDS_Face& face, bool qualityNormals)
187187
double fV = uv.Y();
188188

189189
GeomLProp_SLProps faceprop(surface, fU, fV, 2, gp::Resolution());
190-
normal = faceprop.Normal();
190+
if (faceprop.IsNormalDefined()){
191+
normal = faceprop.Normal();
192+
}
191193

192194
if (normal.SquareMagnitude() > 1.0e-10) {
193195
normal.Normalize();
@@ -212,7 +214,9 @@ int Mesh::extractFaceMesh(const TopoDS_Face& face, bool qualityNormals)
212214
SrfProp.Parameters(1, fU, fV);
213215

214216
GeomLProp_SLProps faceprop(surface, fU, fV, 2, gp::Resolution());
215-
normal = faceprop.Normal();
217+
if (faceprop.IsNormalDefined()){
218+
normal = faceprop.Normal();
219+
}
216220

217221
if (normal.SquareMagnitude() > 1.0e-10) {
218222
normal.Normalize();

0 commit comments

Comments
 (0)