Skip to content

Commit

Permalink
Fixes transition code of last segment of vertical alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
RickBrice committed May 6, 2024
1 parent 9de173d commit e0a9f44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/examples/IfcAlignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ int main() {

// Zero-length terminator
auto vertical_terminator_segment = create_gradient(vpoe, -0.5 / 100, 0.0);
vertical_terminator_segment.first->setTransition(Schema::IfcTransitionCode::IfcTransitionCode_DISCONTINUOUS);
vertical_curve_segments->push(vertical_terminator_segment.first);
vertical_segments->push(vertical_terminator_segment.second);

Expand Down
8 changes: 6 additions & 2 deletions src/ifcparse/IfcAlignmentHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ std::tuple<typename aggregate_of<Ifc4x3_add2::IfcObjectDefinition>::ptr, typenam
alignment_segment = new Ifc4x3_add2::IfcAlignmentSegment(IfcParse::IfcGlobalId(), nullptr, boost::none, boost::none, boost::none, nullptr, nullptr, design_parameters);
horizontal_segments->push(alignment_segment);
if (include_geometry) {
horizontal_curve_segments->push(mapAlignmentHorizontalSegment(design_parameters).first);
auto segment = mapAlignmentHorizontalSegment(design_parameters).first;
segment->setTransition(Ifc4x3_add2::IfcTransitionCode::IfcTransitionCode_DISCONTINUOUS);
horizontal_curve_segments->push(segment);
}

Ifc4x3_add2::IfcCompositeCurve* composite_curve = nullptr;
Expand Down Expand Up @@ -306,7 +308,9 @@ std::tuple<typename aggregate_of<Ifc4x3_add2::IfcObjectDefinition>::ptr, typenam
alignment_segment = new Ifc4x3_add2::IfcAlignmentSegment(IfcParse::IfcGlobalId(), nullptr, boost::none, boost::none, boost::none, nullptr, nullptr, design_parameters);
vertical_segments->push(alignment_segment);
if (include_geometry) {
vertical_curve_segments->push(mapAlignmentVerticalSegment(design_parameters).first);
auto segment = mapAlignmentVerticalSegment(design_parameters).first;
segment->setTransition(Ifc4x3_add2::IfcTransitionCode::IfcTransitionCode_DISCONTINUOUS);
vertical_curve_segments->push(segment);
}

Ifc4x3_add2::IfcGradientCurve* gradient_curve = nullptr;
Expand Down

0 comments on commit e0a9f44

Please sign in to comment.