diff --git a/src/ifcgeom/mapping/IfcCurveSegment.cpp b/src/ifcgeom/mapping/IfcCurveSegment.cpp index 01458b975c..7c312c19aa 100644 --- a/src/ifcgeom/mapping/IfcCurveSegment.cpp +++ b/src/ifcgeom/mapping/IfcCurveSegment.cpp @@ -428,7 +428,7 @@ public: } else if (segment_type_ == ST_VERTICAL) { - eval_ = [px, py, dx, dy](double u) { + eval_ = [py, dx, dy](double u) { // https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcGradientCurve.htm // the parameter, u, is the parameter of the BaseCurve (u = plan view distance along base curve) @@ -486,11 +486,9 @@ public: auto x = position[0]; auto y = position[1]; - //auto z = position[2]; auto dx = slope[0]; auto dy = slope[1]; - //auto dz = slope[2]; Eigen::Matrix4d m; if (segment_type == ST_HORIZONTAL) { diff --git a/src/ifcgeom/mapping/IfcLinearPlacement.cpp b/src/ifcgeom/mapping/IfcLinearPlacement.cpp index 6e205bc3d3..45f3e46010 100644 --- a/src/ifcgeom/mapping/IfcLinearPlacement.cpp +++ b/src/ifcgeom/mapping/IfcLinearPlacement.cpp @@ -29,11 +29,15 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcLinearPlacement* inst) { // attributes was similar to IfcAxis2PlacementLinear. IFC 4.1 and IFC 4.2 have been withdrawn so I'm not going to try to implement linear placement for them. // For this reason the preprocessor skips this code if SCHEMA_HAS_IfcAxis2PlacementLinear is not defined #if defined SCHEMA_HAS_IfcAxis2PlacementLinear - // the following is taken from IfcLocalPlacement and tweaked a little - // assumes that PlacementRelTo is relative to another IfcLinearPlacement - IfcSchema::IfcLinearPlacement* current = (IfcSchema::IfcLinearPlacement*)inst; - auto m4 = taxonomy::make(); + // the following is taken from IfcLocalPlacement and tweaked a little + // assumes that PlacementRelTo is relative to another IfcLinearPlacement + IfcSchema::IfcLinearPlacement* current = (IfcSchema::IfcLinearPlacement*)inst; + auto m4 = taxonomy::make(); +#if defined SCHEMA_HAS_IfcAxis2PlacementLinear + // IfcLinearPlacement was added in IFC 4.1 but it had an Orientation attribute of type IfcOrientationExpression, which when combined with other + // attributes was similar to IfcAxis2PlacementLinear. IFC 4.1 and IFC 4.2 have been withdrawn so I'm not going to try to implement linear placement for them. + // For this reason the preprocessor skips this code if SCHEMA_HAS_IfcAxix2PlacementLinear is not defined for (;;) { IfcSchema::IfcAxis2PlacementLinear* relplacement = current->RelativePlacement(); @@ -80,10 +84,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcLinearPlacement* inst) { } } - // @todo: rb - not sure what this means... it came from IfcLocalPlacement - // m4->components() = offset_and_rotation_ * m4->components(); + // @todo: rb - not sure what this means... it came from IfcLocalPlacement + // m4->components() = offset_and_rotation_ * m4->components(); - return m4; + return m4; #else // The IFC specification does not provided a description of the optional