File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,11 @@ namespace webifc::geometry{
178
178
this ->pth = tinynurbs::surfacePoint (*this ->nurbs , 1.0 , 0.0 );
179
179
this ->ptv = tinynurbs::surfacePoint (*this ->nurbs , 0.0 , 1.0 );
180
180
181
+ if (std::isnan (pth.x ) || std::isnan (pth.y ) ||std::isnan (pth.z ) ) {
182
+ spdlog::error (" pth isnan: ({}/{}/{})" , pth.x , pth.y , pth.z );
183
+ return ;
184
+ }
185
+
181
186
// Compute distances for further use.
182
187
this ->dh = glm::distance (ptc, pth);
183
188
this ->dv = glm::distance (ptc, ptv);
@@ -313,6 +318,12 @@ namespace webifc::geometry{
313
318
double rads = (i / rotations) * pi2;
314
319
double incU = glm::sin (rads) / mul_divisor;
315
320
double incV = glm::cos (rads) / mul_divisor;
321
+
322
+ if (std::isnan (pr)) {
323
+ spdlog::error (" Invalid pr {} " ,pr);
324
+ break ;
325
+ }
326
+
316
327
if (pr > 1 ) incV *= pr;
317
328
else incU /= pr;
318
329
while (true )
Original file line number Diff line number Diff line change @@ -507,6 +507,11 @@ namespace webifc::parsing {
507
507
{
508
508
depth--;
509
509
}
510
+ else if (t == IfcTokenType::LINE_END)
511
+ {
512
+ spdlog::error (" [GetSetArgument[{}]) unexpected LINE_END token" , GetCurrentLineExpressID ());
513
+ break ;
514
+ }
510
515
else
511
516
{
512
517
tapeOffsets.push_back (offset);
@@ -522,7 +527,7 @@ namespace webifc::parsing {
522
527
}
523
528
else
524
529
{
525
- spdlog::error (" [GetSetArgument[]) unexpected token" , GetCurrentLineExpressID ());
530
+ spdlog::error (" [GetSetArgument[{} ]) unexpected token" , GetCurrentLineExpressID ());
526
531
}
527
532
}
528
533
You can’t perform that action at this time.
0 commit comments