From 37d4ee97e7480ab542351ba1f08571ff2bb93b3d Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 10 Jul 2025 11:30:09 +0500 Subject: [PATCH] alignment - fix missing imports --- .../ifcopenshell/api/alignment/_add_segment_to_curve.py | 1 + .../ifcopenshell/api/alignment/_add_segment_to_layout.py | 3 +++ .../ifcopenshell/api/alignment/_add_zero_length_segment.py | 1 + .../ifcopenshell/api/alignment/add_stationing_referent.py | 3 ++- .../ifcopenshell/api/alignment/create_alignment.py | 4 ++++ .../ifcopenshell/api/alignment/create_layout_segment.py | 1 - .../ifcopenshell/api/alignment/distance_along_from_station.py | 2 +- .../ifcopenshell/api/alignment/get_alignment_station.py | 1 + .../ifcopenshell/api/alignment/get_layout_curve.py | 4 +--- .../api/alignment/layout_horizontal_alignment_by_pi_method.py | 2 -- .../api/alignment/layout_vertical_alignment_by_pi_method.py | 2 -- .../ifcopenshell/api/cogo/add_survey_point.py | 2 ++ .../test/api/alignment/test_add_segment_to_layout.py | 1 + .../test/api/alignment/test_add_stationing_to_alignment.py | 1 + .../test/api/alignment/test_add_vertical_alignment.py | 1 + .../test/api/alignment/test_create_alignment.py | 2 +- .../test/api/alignment/test_create_alignment_by_pi_method.py | 1 + .../test/api/alignment/test_create_layout_segment.py | 2 +- .../test/api/alignment/test_distance_along_from_station.py | 1 + .../test/api/alignment/test_get_alignment.py | 1 + .../test/api/alignment/test_get_basis_curve.py | 1 + src/ifcopenshell-python/test/api/alignment/test_get_curve.py | 2 ++ .../test/api/alignment/test_get_layout_curve.py | 2 ++ .../test/api/alignment/test_has_zero_length_segment.py | 2 +- .../test/api/alignment/test_horizontal_layout_by_pi_method.py | 1 + .../test/api/alignment/test_name_segments.py | 1 + .../test/api/alignment/test_referent_names.py | 1 + .../alignment/test_update_curve_segment_transition_code.py | 1 + .../test/api/alignment/test_vertical_layout_by_pi_method.py | 1 + .../test/api/cogo/test_add_survey_point.py | 1 + .../test/api/cogo/test_assign_survey_point.py | 1 + .../test/api/cogo/test_edit_survey_point.py | 1 + src/ifcopenshell-python/test/util/test_stationing.py | 1 + 33 files changed, 39 insertions(+), 13 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py index 8a61111d34..e58ce1ce08 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py @@ -18,6 +18,7 @@ import ifcopenshell import ifcopenshell.geom +import ifcopenshell.util.unit import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper import numpy as np from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py index 7d103743d8..d0f6552dc6 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py @@ -19,6 +19,9 @@ import ifcopenshell import ifcopenshell.api.alignment import ifcopenshell.api.nest +import ifcopenshell.geom +import ifcopenshell.util.stationing +import ifcopenshell.util.unit from ifcopenshell import ifcopenshell_wrapper import numpy as np import math diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_zero_length_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_zero_length_segment.py index bf6fcd8cc4..aa8c95e4ef 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_zero_length_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_zero_length_segment.py @@ -19,6 +19,7 @@ import ifcopenshell import ifcopenshell.api.alignment import ifcopenshell.api.nest +import ifcopenshell.util.stationing from ifcopenshell import entity_instance from ifcopenshell.api.alignment._get_segment_start_point_label import _get_segment_start_point_label diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py index 49f30dcbb2..8751280fa2 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py @@ -20,8 +20,9 @@ import ifcopenshell import ifcopenshell.api.alignment import ifcopenshell.api.nest import ifcopenshell.api.pset -import ifcopenshell.util.stationing +import ifcopenshell.geom import ifcopenshell.guid +import ifcopenshell.util.unit from ifcopenshell import entity_instance from ifcopenshell import ifcopenshell_wrapper import numpy as np diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment.py index c93cbba29c..0a4526829c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_alignment.py @@ -17,7 +17,11 @@ # along with IfcOpenShell. If not, see . import ifcopenshell +import ifcopenshell.api.aggregate import ifcopenshell.api.alignment +import ifcopenshell.api.nest +import ifcopenshell.util.stationing + from ifcopenshell import entity_instance from ifcopenshell.api.alignment._create_geometric_representation import _create_geometric_representation diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py index 16113c3636..e002b8b223 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py @@ -18,7 +18,6 @@ import ifcopenshell import ifcopenshell.api.alignment -import ifcopenshell.api.alignment.get_alignment import ifcopenshell.geom from ifcopenshell import entity_instance import math diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/distance_along_from_station.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/distance_along_from_station.py index 63b7d9063e..e67b468c75 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/distance_along_from_station.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/distance_along_from_station.py @@ -17,7 +17,7 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.util.element +import ifcopenshell.api.alignment from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_station.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_station.py index 69a34d09a0..aa129e7889 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_station.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_station.py @@ -17,6 +17,7 @@ # along with IfcOpenShell. If not, see . import ifcopenshell +import ifcopenshell.util.element from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_curve.py index 1aa1a5a8ec..033a8919ac 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_curve.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_curve.py @@ -17,11 +17,9 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.util +import ifcopenshell.api.alignment from ifcopenshell import entity_instance -import ifcopenshell.util.representation - def get_layout_curve(layout: entity_instance) -> entity_instance: """ diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_horizontal_alignment_by_pi_method.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_horizontal_alignment_by_pi_method.py index 17d918adb3..0ed3c0dfd1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_horizontal_alignment_by_pi_method.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_horizontal_alignment_by_pi_method.py @@ -22,8 +22,6 @@ from ifcopenshell import entity_instance import math from collections.abc import Sequence -import ifcopenshell.api.alignment.create_layout_segment - def layout_horizontal_alignment_by_pi_method( file: ifcopenshell.file, layout: entity_instance, hpoints: Sequence[Sequence[float]], radii: Sequence[float] diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_vertical_alignment_by_pi_method.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_vertical_alignment_by_pi_method.py index d0bc3a20a9..73470467af 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_vertical_alignment_by_pi_method.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_vertical_alignment_by_pi_method.py @@ -23,8 +23,6 @@ from ifcopenshell import entity_instance import math from collections.abc import Sequence -import ifcopenshell.api.alignment.create_layout_segment - def layout_vertical_alignment_by_pi_method( file: ifcopenshell.file, layout: entity_instance, vpoints: Sequence[Sequence[float]], lengths: Sequence[float] diff --git a/src/ifcopenshell-python/ifcopenshell/api/cogo/add_survey_point.py b/src/ifcopenshell-python/ifcopenshell/api/cogo/add_survey_point.py index c7aded6bb5..fee6b377b1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cogo/add_survey_point.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cogo/add_survey_point.py @@ -17,6 +17,8 @@ # along with IfcOpenShell. If not, see . import ifcopenshell +import ifcopenshell.api.spatial +import ifcopenshell.util.representation from ifcopenshell import entity_instance import typing diff --git a/src/ifcopenshell-python/test/api/alignment/test_add_segment_to_layout.py b/src/ifcopenshell-python/test/api/alignment/test_add_segment_to_layout.py index 78edd9d9e0..44dfb3c29b 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_add_segment_to_layout.py +++ b/src/ifcopenshell-python/test/api/alignment/test_add_segment_to_layout.py @@ -19,6 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit from ifcopenshell.api.alignment._add_segment_to_layout import _add_segment_to_layout diff --git a/src/ifcopenshell-python/test/api/alignment/test_add_stationing_to_alignment.py b/src/ifcopenshell-python/test/api/alignment/test_add_stationing_to_alignment.py index 5849f2f1c9..d4d75b31d5 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_add_stationing_to_alignment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_add_stationing_to_alignment.py @@ -19,6 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit import ifcopenshell.util.element diff --git a/src/ifcopenshell-python/test/api/alignment/test_add_vertical_alignment.py b/src/ifcopenshell-python/test/api/alignment/test_add_vertical_alignment.py index 957379abee..a2385c0ef4 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_add_vertical_alignment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_add_vertical_alignment.py @@ -19,6 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit def test_add_vertical_alignment(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_create_alignment.py b/src/ifcopenshell-python/test/api/alignment/test_create_alignment.py index 2e5ec28f4d..4281ff529c 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create_alignment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create_alignment.py @@ -18,8 +18,8 @@ import pytest import ifcopenshell.api.alignment -import ifcopenshell.api.alignment.get_layout_segments import ifcopenshell.api.context +import ifcopenshell.api.unit def test_create_alignment(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_create_alignment_by_pi_method.py b/src/ifcopenshell-python/test/api/alignment/test_create_alignment_by_pi_method.py index 17f37ded98..db8ed9bb89 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create_alignment_by_pi_method.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create_alignment_by_pi_method.py @@ -19,6 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit def test_create_alignment_pi_method(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_create_layout_segment.py b/src/ifcopenshell-python/test/api/alignment/test_create_layout_segment.py index f7d8f98432..6713f0f78a 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create_layout_segment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create_layout_segment.py @@ -19,7 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context -from ifcopenshell import entity_instance +import ifcopenshell.api.unit import math diff --git a/src/ifcopenshell-python/test/api/alignment/test_distance_along_from_station.py b/src/ifcopenshell-python/test/api/alignment/test_distance_along_from_station.py index 28d2216a9f..d5c8518259 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_distance_along_from_station.py +++ b/src/ifcopenshell-python/test/api/alignment/test_distance_along_from_station.py @@ -19,6 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit def test_distance_along_from_station(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py b/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py index ed9a1d2d33..b1d5ac720e 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py @@ -19,6 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit def test_get_alignment(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_get_basis_curve.py b/src/ifcopenshell-python/test/api/alignment/test_get_basis_curve.py index 8541212291..659b9db343 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_get_basis_curve.py +++ b/src/ifcopenshell-python/test/api/alignment/test_get_basis_curve.py @@ -20,6 +20,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit def _test_horizontal(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_get_curve.py b/src/ifcopenshell-python/test/api/alignment/test_get_curve.py index e74de3458f..0229317c3f 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_get_curve.py +++ b/src/ifcopenshell-python/test/api/alignment/test_get_curve.py @@ -17,6 +17,8 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.alignment +import ifcopenshell.api.context +import ifcopenshell.api.unit def test_get_curve(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_get_layout_curve.py b/src/ifcopenshell-python/test/api/alignment/test_get_layout_curve.py index 0c457988c1..1e5326070d 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_get_layout_curve.py +++ b/src/ifcopenshell-python/test/api/alignment/test_get_layout_curve.py @@ -17,6 +17,8 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.alignment +import ifcopenshell.api.context +import ifcopenshell.api.unit def test_get_layout_curve(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_has_zero_length_segment.py b/src/ifcopenshell-python/test/api/alignment/test_has_zero_length_segment.py index 370101ad14..9ce42a817e 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_has_zero_length_segment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_has_zero_length_segment.py @@ -17,8 +17,8 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.alignment -import ifcopenshell.api.alignment.has_zero_length_segment import ifcopenshell.api.context +import ifcopenshell.api.unit def _test_horizontal(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_horizontal_layout_by_pi_method.py b/src/ifcopenshell-python/test/api/alignment/test_horizontal_layout_by_pi_method.py index 61b1ba20ca..fd3321b425 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_horizontal_layout_by_pi_method.py +++ b/src/ifcopenshell-python/test/api/alignment/test_horizontal_layout_by_pi_method.py @@ -19,6 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit # other test cases cover the typical vertical by PI method (test_create_alignment_by_pi_method) diff --git a/src/ifcopenshell-python/test/api/alignment/test_name_segments.py b/src/ifcopenshell-python/test/api/alignment/test_name_segments.py index 0a95d0dfec..89629b78c9 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_name_segments.py +++ b/src/ifcopenshell-python/test/api/alignment/test_name_segments.py @@ -19,6 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit def test_name_segments(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_referent_names.py b/src/ifcopenshell-python/test/api/alignment/test_referent_names.py index d48a82c697..835233f227 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_referent_names.py +++ b/src/ifcopenshell-python/test/api/alignment/test_referent_names.py @@ -20,6 +20,7 @@ import pytest from pytest import fixture import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit @pytest.fixture(scope="module") diff --git a/src/ifcopenshell-python/test/api/alignment/test_update_curve_segment_transition_code.py b/src/ifcopenshell-python/test/api/alignment/test_update_curve_segment_transition_code.py index 778bf2d69c..2b6accf037 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_update_curve_segment_transition_code.py +++ b/src/ifcopenshell-python/test/api/alignment/test_update_curve_segment_transition_code.py @@ -19,6 +19,7 @@ import pytest from ifcopenshell.api.alignment._update_curve_segment_transition_code import _update_curve_segment_transition_code import ifcopenshell.api.context +import ifcopenshell.api.unit def _test1(): diff --git a/src/ifcopenshell-python/test/api/alignment/test_vertical_layout_by_pi_method.py b/src/ifcopenshell-python/test/api/alignment/test_vertical_layout_by_pi_method.py index 65a5de4642..be9f9b55a3 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_vertical_layout_by_pi_method.py +++ b/src/ifcopenshell-python/test/api/alignment/test_vertical_layout_by_pi_method.py @@ -19,6 +19,7 @@ import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context +import ifcopenshell.api.unit # other test cases cover the typical vertical by PI method (test_create_alignment_by_pi_method) diff --git a/src/ifcopenshell-python/test/api/cogo/test_add_survey_point.py b/src/ifcopenshell-python/test/api/cogo/test_add_survey_point.py index c5fe9e195c..068fef52a8 100644 --- a/src/ifcopenshell-python/test/api/cogo/test_add_survey_point.py +++ b/src/ifcopenshell-python/test/api/cogo/test_add_survey_point.py @@ -17,6 +17,7 @@ # along with IfcOpenShell. If not, see . import pytest +import ifcopenshell.api.aggregate import ifcopenshell.api.alignment import ifcopenshell.api.context import ifcopenshell.api.cogo diff --git a/src/ifcopenshell-python/test/api/cogo/test_assign_survey_point.py b/src/ifcopenshell-python/test/api/cogo/test_assign_survey_point.py index 0f957eb98d..39e7823af9 100644 --- a/src/ifcopenshell-python/test/api/cogo/test_assign_survey_point.py +++ b/src/ifcopenshell-python/test/api/cogo/test_assign_survey_point.py @@ -17,6 +17,7 @@ # along with IfcOpenShell. If not, see . import pytest +import ifcopenshell.api.aggregate import ifcopenshell.api.alignment import ifcopenshell.api.context import ifcopenshell.api.cogo diff --git a/src/ifcopenshell-python/test/api/cogo/test_edit_survey_point.py b/src/ifcopenshell-python/test/api/cogo/test_edit_survey_point.py index 5a8b1b3a75..17038f533b 100644 --- a/src/ifcopenshell-python/test/api/cogo/test_edit_survey_point.py +++ b/src/ifcopenshell-python/test/api/cogo/test_edit_survey_point.py @@ -17,6 +17,7 @@ # along with IfcOpenShell. If not, see . import pytest +import ifcopenshell.api.aggregate import ifcopenshell.api.alignment import ifcopenshell.api.context import ifcopenshell.api.cogo diff --git a/src/ifcopenshell-python/test/util/test_stationing.py b/src/ifcopenshell-python/test/util/test_stationing.py index 931db5d33b..dc0a03ced7 100644 --- a/src/ifcopenshell-python/test/util/test_stationing.py +++ b/src/ifcopenshell-python/test/util/test_stationing.py @@ -17,6 +17,7 @@ # along with IfcOpenShell. If not, see . import ifcopenshell +import ifcopenshell.api.unit import ifcopenshell.util.stationing as sta