ifcopenshell.alignment
¶
Module Contents¶
- class ifcopenshell.alignment.IfcAlignmentHelper(file: ifcopenshell.file = None, filename: str = None, creator: str = None, organization: str = None, application: str = None, project_globalid=None, project_name: str = None)¶
Create a new IfcAlignment including horizontal and vertical alignments by PI points.
Currently only supports horizontal lines and circular arcs (no spirals or other transitions) Currently only supports parabolic vertical curves. Does not yet accommodate cant alignment considerations.
@param file: An existing model that the alignment will be added to @param filename: Name for a new model to be created that will contain the alignment @param creator: Name of the actor creating the file @param organization: Name of the creator’s organization @param application: Name of the authoring application @param project_globalid: value for the file’s IfcProject.GlobalId attribute @param project_name: value for the file’s IfcProject.Name attribute
- add_alignment(name: str, hpoints: Sequence[Sequence[float]], radii: Sequence[float], include_geometry: bool = True, description: str = None, start_station: float = 1000.0)¶
Create a new alignment with a horizontal alignment using the PI layout method
- add_vertical_alignment(name: str, description: str, vpoints: Sequence[Sequence[float]], vclengths: Sequence[Sequence[float]], include_geometry: bool = True)¶
Create a vertical alignment using the PI layout method.
@param name: value for Name attribute @param description: value for Description attribute @param vpoints: (distance_along, Z_height) pairs denoting the location of the vertical PIs, including start and end. @param vclengths: radii values to use for transition @param include_geometry: optionally create the alignment geometric representation as well as the semantic business logic
- save_file(filename) None ¶
- ifcopenshell.alignment.evaluate_representation(shape_rep: ifcopenshell.entity_instance, dist_along: float) numpy.ndarray ¶
Calculate the 4x4 geometric transform at a point on an alignment segment @param shape_rep: The representation shape (composite curve, gradient curve, or segmented reference curve) to evaluate @param dist_along: The distance along this representation at the point of interest (point to be calculated)
- ifcopenshell.alignment.evaluate_segment(segment: ifcopenshell.entity_instance, dist_along: float) numpy.ndarray ¶
Calculate the 4x4 geometric transform at a point on an alignment segment @param segment: The segment containing the point that we would like to @param dist_along: The distance along this segment at the point of interest (point to be calculated)
- ifcopenshell.alignment.generate_vertices(rep_curve: ifcopenshell.entity_instance, distance_interval: float = 5.0) numpy.ndarray ¶
Generate vertices along an alignment
@param rep_curve: The alignment’s representation curve to use to generate vertices.
Note: rep_curve must be IfcCompositeCurve, IfcGradientCurve, or IfcSegmentedReferenceCurve
@param distance_interval: The distance between points along the alignment at which to generate the points
- ifcopenshell.alignment.name_segments(prefix: str, segments: Sequence[ifcopenshell.entity_instance]) None ¶
Sets the segment name like (“H1” for horizontal, “V1” for vertical, “C1” for cant)
- ifcopenshell.alignment.print_structure(alignment, indent=0)¶
Debugging function to print alignment decomposition
- ifcopenshell.alignment.f = None¶