Skip to content

Commit b0dac5f

Browse files
committed
Merge branch 'main' into infra
2 parents a4acf4e + 75afb61 commit b0dac5f

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

src/wasm/geometry/IfcGeometryLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ namespace webifc::geometry
12791279
// because these calls cannot be reordered we have to use intermediate variables
12801280
double x = _loader.GetDoubleArgument();
12811281
double y = _loader.GetDoubleArgument();
1282-
double z = _loader.GetDoubleArgument();
1282+
double z = _loader.GetOptionalDoubleParam(0);
12831283
glm::dvec3 point(x, y, z);
12841284
return point;
12851285
}

src/wasm/parsing/IfcLoader.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ namespace webifc::parsing {
372372
if (_lines[i]->tapeOffset > pos) break;
373373
prevLine = i;
374374
}
375-
return prevLine-1;
375+
return prevLine+1;
376376
}
377377

378378
uint32_t IfcLoader::GetRefArgument() const
@@ -491,12 +491,7 @@ namespace webifc::parsing {
491491
{
492492
_tokenStream->Read<uint32_t>();
493493
}
494-
else if (t == IfcTokenType::STRING || t == IfcTokenType::INTEGER || t == IfcTokenType::REAL)
495-
{
496-
uint16_t length = _tokenStream->Read<uint16_t>();
497-
_tokenStream->Forward(length);
498-
}
499-
else if (t == IfcTokenType::LABEL)
494+
else if (t == IfcTokenType::STRING || t == IfcTokenType::INTEGER || t == IfcTokenType::REAL || t == IfcTokenType::LABEL || t == IfcTokenType::ENUM)
500495
{
501496
uint16_t length = _tokenStream->Read<uint16_t>();
502497
_tokenStream->Forward(length);
@@ -550,12 +545,7 @@ namespace webifc::parsing {
550545
{
551546
_tokenStream->Read<uint32_t>();
552547
}
553-
else if (t == IfcTokenType::STRING || t == IfcTokenType::INTEGER || t == IfcTokenType::REAL)
554-
{
555-
uint16_t length = _tokenStream->Read<uint16_t>();
556-
_tokenStream->Forward(length);
557-
}
558-
else if (t == IfcTokenType::LABEL)
548+
else if (t == IfcTokenType::STRING || t == IfcTokenType::INTEGER || t == IfcTokenType::REAL || t == IfcTokenType::LABEL || t == IfcTokenType::ENUM)
559549
{
560550
uint16_t length = _tokenStream->Read<uint16_t>();
561551
_tokenStream->Forward(length);
@@ -646,7 +636,7 @@ namespace webifc::parsing {
646636

647637
double IfcLoader::GetOptionalDoubleParam(double defaultValue = 0) const
648638
{
649-
if (GetTokenType() ==IfcTokenType::REAL)
639+
if (GetTokenType() == IfcTokenType::REAL)
650640
{
651641
StepBack();
652642
return GetDoubleArgument();

0 commit comments

Comments
 (0)