diff --git a/src/examples/IfcAlignment.cpp b/src/examples/IfcAlignment.cpp index 56c2711ffd..0aee9e0b0f 100644 --- a/src/examples/IfcAlignment.cpp +++ b/src/examples/IfcAlignment.cpp @@ -268,22 +268,7 @@ int main() auto footprint_shape_representation = new Schema::IfcShapeRepresentation(footprint_representation_subcontext, std::string("FootPrint"), std::string("Curve2D"), alignment_representation_items); file.addEntity(footprint_shape_representation); - // create the axis representation subcontext for CT 4.1.7.1.1.1 Alignment Geometry - Horizontal - auto axis2d_representation_subcontext = new Schema::IfcGeometricRepresentationSubContext(std::string("Axis"), std::string("Model"), geometric_representation_context, boost::none, Schema::IfcGeometricProjectionEnum::IfcGeometricProjection_MODEL_VIEW, boost::none); - file.addEntity(axis2d_representation_subcontext); - - // create axis curve 2d representation - auto axis2d_shape_representation = new Schema::IfcShapeRepresentation(axis2d_representation_subcontext, std::string("Axis"), std::string("Curve2D"), alignment_representation_items); - file.addEntity(axis2d_shape_representation); - - // there are two representations for the horizontal alignment (footprint and axis2d) - typename aggregate_of::ptr horizontal_representations(new aggregate_of()); - horizontal_representations->push(footprint_shape_representation); - horizontal_representations->push(axis2d_shape_representation); - - auto horizontal_product = new Schema::IfcProductDefinitionShape(std::string("Horizontal product definition shape"), boost::none, horizontal_representations); - - auto horizontal_alignment = new Schema::IfcAlignmentHorizontal(IfcParse::IfcGlobalId(), nullptr, std::string("Horizontal Alignment"), boost::none, boost::none, local_placement, horizontal_product); + auto horizontal_alignment = new Schema::IfcAlignmentHorizontal(IfcParse::IfcGlobalId(), nullptr, std::string("Horizontal Alignment"), boost::none, boost::none, nullptr, nullptr); file.addEntity(horizontal_alignment); // for the business logic, nest the individual horizontal alignment segment with the alignment @@ -361,7 +346,7 @@ int main() // create profile view axis model representation for the vertical profile - // start by defining a gradient curve composed of the vertical curve segments and associated with the horizont composite curve + // start by defining a gradient curve composed of the vertical curve segments and associated with the horizontal composite curve auto gradient_curve = new Schema::IfcGradientCurve(vertical_curve_segments, false, composite_curve, nullptr); // the gradient curve is a representation item @@ -373,25 +358,20 @@ int main() file.addEntity(axis_representation_subcontext); // create the axis representation - auto axis_shape_representation = new Schema::IfcShapeRepresentation(axis_representation_subcontext, std::string("Axis"), std::string("Curve3D"), profile_representation_items); - file.addEntity(axis_shape_representation); + auto axis3d_shape_representation = new Schema::IfcShapeRepresentation(axis_representation_subcontext, std::string("Axis"), std::string("Curve3D"), profile_representation_items); + file.addEntity(axis3d_shape_representation); - typename aggregate_of::ptr vertical_representations(new aggregate_of()); - vertical_representations->push(axis_shape_representation); - - auto vertical_product = new Schema::IfcProductDefinitionShape(std::string("Vertical product definition shape"), boost::none, vertical_representations); - - auto vertical_profile = new Schema::IfcAlignmentVertical(IfcParse::IfcGlobalId(), nullptr, std::string("Vertical Alignment"), boost::none, boost::none, local_placement, vertical_product); + auto vertical_profile = new Schema::IfcAlignmentVertical(IfcParse::IfcGlobalId(), nullptr, std::string("Vertical Alignment"), boost::none, boost::none, nullptr, nullptr); file.addEntity(vertical_profile); // for the business logic, nest the individual vertical curve segments with the vertical alignment auto nests_vertical_segments = new Schema::IfcRelNests(IfcParse::IfcGlobalId(), nullptr, boost::none, std::string("Nests vertical alignment segments with vertical alignment"), vertical_profile, vertical_segments); file.addEntity(nests_vertical_segments); - // the alignment has two representations, a plan view footprint and a 3d axis + // the alignment has two representations, a plan view footprint and a 3d curve typename aggregate_of::ptr alignment_representations(new aggregate_of()); - alignment_representations->push(footprint_shape_representation); // 2D alignment geometry - alignment_representations->push(axis_shape_representation); // 3D alignment geometry + alignment_representations->push(footprint_shape_representation); // 2D footprint + alignment_representations->push(axis3d_shape_representation); // 3D curve // create the alignment auto alignment_product = new Schema::IfcProductDefinitionShape(std::string("Alignment Product Definition Shape"), boost::none, alignment_representations);