mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Adds support for IfcLinearPlacement
This commit is contained in:
@@ -428,7 +428,7 @@ public:
|
|||||||
}
|
}
|
||||||
else if (segment_type_ == ST_VERTICAL) {
|
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
|
// 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)
|
// 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 x = position[0];
|
||||||
auto y = position[1];
|
auto y = position[1];
|
||||||
//auto z = position[2];
|
|
||||||
|
|
||||||
auto dx = slope[0];
|
auto dx = slope[0];
|
||||||
auto dy = slope[1];
|
auto dy = slope[1];
|
||||||
//auto dz = slope[2];
|
|
||||||
|
|
||||||
Eigen::Matrix4d m;
|
Eigen::Matrix4d m;
|
||||||
if (segment_type == ST_HORIZONTAL) {
|
if (segment_type == ST_HORIZONTAL) {
|
||||||
|
|||||||
@@ -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.
|
// 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
|
// For this reason the preprocessor skips this code if SCHEMA_HAS_IfcAxis2PlacementLinear is not defined
|
||||||
#if defined SCHEMA_HAS_IfcAxis2PlacementLinear
|
#if defined SCHEMA_HAS_IfcAxis2PlacementLinear
|
||||||
// the following is taken from IfcLocalPlacement and tweaked a little
|
// the following is taken from IfcLocalPlacement and tweaked a little
|
||||||
// assumes that PlacementRelTo is relative to another IfcLinearPlacement
|
// assumes that PlacementRelTo is relative to another IfcLinearPlacement
|
||||||
IfcSchema::IfcLinearPlacement* current = (IfcSchema::IfcLinearPlacement*)inst;
|
IfcSchema::IfcLinearPlacement* current = (IfcSchema::IfcLinearPlacement*)inst;
|
||||||
auto m4 = taxonomy::make<taxonomy::matrix4>();
|
auto m4 = taxonomy::make<taxonomy::matrix4>();
|
||||||
|
|
||||||
|
#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 (;;) {
|
for (;;) {
|
||||||
IfcSchema::IfcAxis2PlacementLinear* relplacement = current->RelativePlacement();
|
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
|
// @todo: rb - not sure what this means... it came from IfcLocalPlacement
|
||||||
// m4->components() = offset_and_rotation_ * m4->components();
|
// m4->components() = offset_and_rotation_ * m4->components();
|
||||||
|
|
||||||
return m4;
|
return m4;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// The IFC specification does not provided a description of the optional
|
// The IFC specification does not provided a description of the optional
|
||||||
|
|||||||
Reference in New Issue
Block a user