This commit is contained in:
Andrej730
2025-04-29 15:05:25 +05:00
parent 1856eeddeb
commit ecf461e1e0
7 changed files with 47 additions and 31 deletions
@@ -69,10 +69,10 @@ def create_axis_curve(
grid = [i for i in file.get_inverse(grid_axis) if i.is_a("IfcGrid")][0]
grid_matrix_i = np.linalg.inv(ifcopenshell.util.placement.get_local_placement(grid.ObjectPlacement))
grid_axis.AxisCurve = file.createIfcPolyline(
(
file.createIfcCartesianPoint(ifc_safe_vector_type(grid_matrix_i @ p1)),
file.createIfcCartesianPoint(ifc_safe_vector_type(grid_matrix_i @ p2)),
grid_axis.AxisCurve = file.create_entity(
"IfcPolyline"(
file.create_entity("IfcCartesianPoint", ifc_safe_vector_type(grid_matrix_i @ p1)),
file.create_entity("IfcCartesianPoint", ifc_safe_vector_type(grid_matrix_i @ p2)),
)
)
@@ -50,20 +50,15 @@ def create_grid_axis(
:param axis_tag: The name of the axis, that would typically be labeled
on drawings or described on site during coordination, such as A, B,
C, 1, 2, 3, etc. Defaults to "A".
:type axis_tag: str, optional
:param same_sense: Determines whether the direction of the axis's line
is reversed. True means the direction the geometry is defined in
represents the direction of the axis. False means the direction is
reversed. Leave as True if unsure. Defaults to "True".
:type same_sense: bool, optional
:param uvw_axes: Choose from "UAxes", "VAxes" or "WAxes" depending on
which set of axes the new axis you are adding should belong to.
Defaults to "UAxes".
:type uvw_axes: str, optional
:param grid: The IfcGrid you are adding the axis to.
:type grid: ifcopenshell.entity_instance
:return: The newly created IfcGridAxis
:rtype: ifcopenshell.entity_instance
Example: