diff --git a/.github/workflows/build_osx.yml b/.github/workflows/build_osx.yml index 4c6cb9312c..c758470a79 100644 --- a/.github/workflows/build_osx.yml +++ b/.github/workflows/build_osx.yml @@ -53,7 +53,7 @@ jobs: python ../nix/cache_dependencies.py unpack - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.22 + uses: hendrikmuhs/ccache-action@v1.2.23 with: key: mac-${{ matrix.arch }} diff --git a/.github/workflows/build_pyodide.yml b/.github/workflows/build_pyodide.yml index a5e80a32df..050b542cff 100644 --- a/.github/workflows/build_pyodide.yml +++ b/.github/workflows/build_pyodide.yml @@ -29,7 +29,7 @@ jobs: python ../IfcOpenShell/nix/cache_dependencies.py unpack - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.22 + uses: hendrikmuhs/ccache-action@v1.2.23 with: key: ubuntu-22.04-${{ runner.arch }} diff --git a/.github/workflows/build_rocky.yml b/.github/workflows/build_rocky.yml index a1aa611826..0de26089f6 100644 --- a/.github/workflows/build_rocky.yml +++ b/.github/workflows/build_rocky.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Set up uv - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 - name: Install Python # Installs latest Python version so it's preferred by uv over Rocky's system Python. @@ -54,7 +54,7 @@ jobs: uv run ../nix/cache_dependencies.py unpack - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.22 + uses: hendrikmuhs/ccache-action@v1.2.23 with: key: ubuntu-22.04-${{ runner.arch }}-rockylinux9 diff --git a/.github/workflows/build_rocky_arm.yml b/.github/workflows/build_rocky_arm.yml index a5cbea640d..e7401f1f63 100644 --- a/.github/workflows/build_rocky_arm.yml +++ b/.github/workflows/build_rocky_arm.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Set up uv - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 - name: Install Python # Installs latest Python version so it's preferred by uv over Rocky's system Python. @@ -54,7 +54,7 @@ jobs: uv run ../nix/cache_dependencies.py unpack - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.22 + uses: hendrikmuhs/ccache-action@v1.2.23 with: key: ubuntu-22.04-${{ runner.arch }}-rockylinux9 diff --git a/.github/workflows/build_win.yml b/.github/workflows/build_win.yml index 7880296a2a..5b976f7886 100644 --- a/.github/workflows/build_win.yml +++ b/.github/workflows/build_win.yml @@ -52,7 +52,7 @@ jobs: } - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.22 + uses: hendrikmuhs/ccache-action@v1.2.23 with: key: win-${{ matrix.arch }} # Windows ccache needs ~1GB diff --git a/.github/workflows/ci-ifcopenshell-docker.yml b/.github/workflows/ci-ifcopenshell-docker.yml index df672139b8..50978c9d6f 100644 --- a/.github/workflows/ci-ifcopenshell-docker.yml +++ b/.github/workflows/ci-ifcopenshell-docker.yml @@ -35,7 +35,7 @@ jobs: - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.22 + uses: hendrikmuhs/ccache-action@v1.2.23 - name: Build ifcopenshell diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a49c92fcd7..ea7fb590e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,7 @@ jobs: libhdf5-dev libcgal-dev libeigen3-dev - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.22 + uses: hendrikmuhs/ccache-action@v1.2.23 with: key: ubuntu-22.04-${{ runner.arch }} diff --git a/.github/workflows/publish-bonsai-releases.yml b/.github/workflows/publish-bonsai-releases.yml index 25d9a67d41..6d423deadf 100644 --- a/.github/workflows/publish-bonsai-releases.yml +++ b/.github/workflows/publish-bonsai-releases.yml @@ -7,9 +7,9 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v7 - run: uv run .github/scripts/publish-bonsai-releases.py env: diff --git a/pyodide/build_pyodide.sh b/pyodide/build_pyodide.sh index e7f399adfd..8afbb3fcce 100755 --- a/pyodide/build_pyodide.sh +++ b/pyodide/build_pyodide.sh @@ -1,6 +1,11 @@ #!/usr/bin/bash set -ex +PYODIDE_VERSION=0.29.3 +PYODIDE_BUILD_VERSION=0.33.0 +PYODIDE_XBUILDENV_ROOT="${HOME}/.cache/.pyodide-xbuildenv-${PYODIDE_BUILD_VERSION}" +PYODIDE_XBUILDENV="${PYODIDE_XBUILDENV_ROOT}/${PYODIDE_VERSION}" + # Script is assuming that it will be possible to execute it multiple times # therefore we're clearing venv each time and ignoring existing 'emsdk' folder. @@ -11,15 +16,15 @@ source .venv/bin/activate # Install pyodide cross build environment. # Instructions: https://pyodide.org/en/stable/development/building-packages.html -uv pip install pyodide-build +uv pip install "pyodide-build==${PYODIDE_BUILD_VERSION}" # `uv run` is required, so xbuildenv would skip using `pip`. -uv run pyodide xbuildenv install +uv run pyodide xbuildenv install "${PYODIDE_VERSION}" uv run pyodide xbuildenv install-emscripten -EMSDK_ROOT=$(pyodide config get emscripten_dir) -[ -f ${EMSDK_ROOT}/emsdk_env.sh ] && source ${EMSDK_ROOT}/emsdk_env.sh -[ -f ${EMSDK_ROOT}/../../emsdk_env.sh ] && source ${EMSDK_ROOT}/../../emsdk_env.sh +EMSDK_ROOT="${PYODIDE_XBUILDENV}/emsdk" +source "${EMSDK_ROOT}/emsdk_env.sh" which emcc +emcc --version mkdir -p packages/ifcopenshell VERSION=`cat IfcOpenShell/VERSION` diff --git a/pyproject.toml b/pyproject.toml index 45c0b357a8..37aed2dded 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,9 +3,9 @@ name = "IfcOpenShell" version = "0.0.0" dependencies = [ "black==26.3.1", - "ruff==0.15.10", + "ruff==0.15.12", "poethepoet", - "ty==0.0.29", + "ty==0.0.32", "gersemi==0.26.1", ] diff --git a/src/bonsai/bonsai/bim/module/material/operator.py b/src/bonsai/bonsai/bim/module/material/operator.py index 7587a7e4ed..8a54478179 100644 --- a/src/bonsai/bonsai/bim/module/material/operator.py +++ b/src/bonsai/bonsai/bim/module/material/operator.py @@ -630,7 +630,7 @@ class EditAssignedMaterial(bpy.types.Operator, tool.Ifc.Operator): slab.DumbSlabPlaner().regenerate_from_layer_set(layer_set) if material_set_usage.is_a("IfcMaterialProfileSetUsage"): - if "CardinalPoint" in attributes: + if "CardinalPoint" in attributes and attributes["CardinalPoint"] is not None: attributes["CardinalPoint"] = int(attributes["CardinalPoint"]) ifcopenshell.api.material.edit_profile_usage( self.file, diff --git a/src/bonsai/bonsai/bim/module/model/wall.py b/src/bonsai/bonsai/bim/module/model/wall.py index 4d0c9b3de7..b5d2f5fa77 100644 --- a/src/bonsai/bonsai/bim/module/model/wall.py +++ b/src/bonsai/bonsai/bim/module/model/wall.py @@ -468,14 +468,16 @@ class ChangeExtrusionXAngle(bpy.types.Operator, tool.Ifc.Operator): existing_x_angle = 0 if tool.Cad.is_x(existing_x_angle, 0, tolerance=0.001) else existing_x_angle existing_x_angle = 0 if tool.Cad.is_x(existing_x_angle, pi, tolerance=0.001) else existing_x_angle - coord_list = builder.get_polyline_coords(extrusion.SweptArea.OuterCurve) - coord_list = [ - (p[0], p[1] * abs(cos(existing_x_angle))) for p in coord_list - ] # Reset the transformation and returns to the original points with 0 degrees - coord_list = [ - (p[0], p[1] * abs(1 / cos(x_angle))) for p in coord_list - ] # Apply the transformation for the new x_angle - builder.set_polyline_coords(extrusion.SweptArea.OuterCurve, coord_list) + profiles = extrusion.SweptArea.Profiles if extrusion.SweptArea.is_a("IfcCompositeProfileDef") else [extrusion.SweptArea] + for profile in profiles: + coord_list = builder.get_polyline_coords(profile.OuterCurve) + coord_list = [ + (p[0], p[1] * abs(cos(existing_x_angle))) for p in coord_list + ] # Reset the transformation and returns to the original points with 0 degrees + coord_list = [ + (p[0], p[1] * abs(1 / cos(x_angle))) for p in coord_list + ] # Apply the transformation for the new x_angle + builder.set_polyline_coords(profile.OuterCurve, coord_list) # The extrusion direction calculated previously default to the positive direction # Here we set the extrusion direction to negative if that's the case diff --git a/src/bonsai/bonsai/tool/drawing.py b/src/bonsai/bonsai/tool/drawing.py index 86113b9c95..232e963359 100644 --- a/src/bonsai/bonsai/tool/drawing.py +++ b/src/bonsai/bonsai/tool/drawing.py @@ -1756,6 +1756,10 @@ class Drawing(bonsai.core.tool.Drawing): # For section/elevation views, elevate the segment vertically if not (points := helper.elevate_segment(bounds, [v1, v2])): return + elif target_view == "MODEL_VIEW": + # For model views, clip to XY bounds and keep Z (3D line at true elevation) + if not (points := helper.clip_segment(bounds, [v1, v2])): + return else: return diff --git a/src/bonsai/docs/reference/project_overview/project_info.rst b/src/bonsai/docs/reference/project_overview/project_info.rst index f2fe105f8c..ffe33427a6 100644 --- a/src/bonsai/docs/reference/project_overview/project_info.rst +++ b/src/bonsai/docs/reference/project_overview/project_info.rst @@ -58,7 +58,7 @@ Fields Class** based on the IFC Schema version. **Unit System** - Choose between metric and imperial units of measurement when creating a project. + Choose between metric and imperial units of measurement when creating a project. Project data is stored in this Unit System and displayed according to e.g. Length Unit, Area Unit, Volume Unit. Properly changing the Unit System after project creation requires conversion. See `Blender Manual : Scene Properties : Units `_ for a description of changing the display units e.g. from Feet to Adaptive (enable Separate Units option) for Feet-and-Inches. **Length Unit** Depending on the unit system, choose the default unit to be used for all length measurements. Lengths are used for moving objects around in the 3D scene, as well as lengths, widths, height, and depth quantity take-off data. diff --git a/src/ifcopenshell-python/ifcopenshell/simple_spf b/src/ifcopenshell-python/ifcopenshell/simple_spf index ed50b756c4..9400d243d8 160000 --- a/src/ifcopenshell-python/ifcopenshell/simple_spf +++ b/src/ifcopenshell-python/ifcopenshell/simple_spf @@ -1 +1 @@ -Subproject commit ed50b756c4035290d50eb2d928f89423f3aa0947 +Subproject commit 9400d243d880dace57490949d74ab1932ce99a09