Skip to content

Commit

Permalink
Fixes problem with IfcCurveSegment.Placement direction for parabolic …
Browse files Browse the repository at this point in the history
…vertical curves
  • Loading branch information
RickBrice committed May 2, 2024
1 parent 7af9944 commit c93704f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/examples/IfcAlignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ std::pair<typename Schema::IfcCurveSegment*, typename Schema::IfcAlignmentSegmen

auto curve_segment = new Schema::IfcCurveSegment(
Schema::IfcTransitionCode::IfcTransitionCode_CONTSAMEGRADIENT,
new Schema::IfcAxis2Placement2D(p, new Schema::IfcDirection(std::vector<double>{1.0, 0.0})),
new Schema::IfcAxis2Placement2D(p, new Schema::IfcDirection(std::vector<double>{sqrt(1 - start_slope * start_slope), start_slope})),
new Schema::IfcLengthMeasure(0.0),
new Schema::IfcLengthMeasure(length),
parent_curve);
Expand Down
2 changes: 1 addition & 1 deletion src/ifcparse/IfcAlignmentHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ std::pair<Ifc4x3_add2::IfcCurveSegment*, Ifc4x3_add2::IfcCurveSegment*> mapAlign

auto curve_segment = new Ifc4x3_add2::IfcCurveSegment(
Ifc4x3_add2::IfcTransitionCode::IfcTransitionCode_CONTSAMEGRADIENT,
new Ifc4x3_add2::IfcAxis2Placement2D(new Ifc4x3_add2::IfcCartesianPoint({start_distance_along,start_height}), new Ifc4x3_add2::IfcDirection({1.0, 0.0})),
new Ifc4x3_add2::IfcAxis2Placement2D(new Ifc4x3_add2::IfcCartesianPoint({start_distance_along, start_height}), new Ifc4x3_add2::IfcDirection({sqrt(1.0 - start_gradient * start_gradient), start_gradient})),
new Ifc4x3_add2::IfcLengthMeasure(0.0),
new Ifc4x3_add2::IfcLengthMeasure(horizontal_length),
parent_curve);
Expand Down

0 comments on commit c93704f

Please sign in to comment.