Skip to content

Commit

Permalink
Merge pull request #542 from jdegenstein/dev
Browse files Browse the repository at this point in the history
Update github actions to nodejs 20, and enable parallel execution where available in OCCT
  • Loading branch information
jdegenstein authored Feb 6, 2024
2 parents f06f4fa + 2db88da commit 4641d1d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-macos-arm64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: "composite"
steps:
- name: python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install requirements
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: "composite"
steps:
- name: python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install requirements
Expand All @@ -18,4 +18,4 @@ runs:
pip install mypy
pip install pytest
pip install pylint
pip install .
pip install .
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup/
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -37,7 +37,7 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-macos-arm64/
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion src/build123d/mesher.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _mesh_shape(
theLinDeflection=linear_deflection,
isRelative=True,
theAngDeflection=angular_deflection,
isInParallel=False,
isInParallel=True,
)

ocp_mesh_vertices = []
Expand Down
8 changes: 5 additions & 3 deletions src/build123d/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ def export_stl(
bool: Success
"""
mesh = BRepMesh_IncrementalMesh(
self.wrapped, tolerance, True, angular_tolerance
self.wrapped, tolerance, True, angular_tolerance, True
)
mesh.Perform()

Expand Down Expand Up @@ -1972,7 +1972,9 @@ def is_valid(self) -> bool:
Returns:
"""
return BRepCheck_Analyzer(self.wrapped).IsValid()
chk = BRepCheck_Analyzer(self.wrapped)
chk.SetParallel(True)
return chk.IsValid()

def bounding_box(self, tolerance: float = None) -> BoundBox:
"""Create a bounding box for this Shape.
Expand Down Expand Up @@ -2789,7 +2791,7 @@ def mesh(self, tolerance: float, angular_tolerance: float = 0.1):
"""

if not BRepTools.Triangulation_s(self.wrapped, tolerance):
BRepMesh_IncrementalMesh(self.wrapped, tolerance, True, angular_tolerance)
BRepMesh_IncrementalMesh(self.wrapped, tolerance, True, angular_tolerance, True)

def tessellate(
self, tolerance: float, angular_tolerance: float = 0.1
Expand Down

0 comments on commit 4641d1d

Please sign in to comment.