Skip to content

Commit

Permalink
remove cadquery as mandatory dependency (due to downstream NLOPT depe…
Browse files Browse the repository at this point in the history
…ndency barring 3.12) and add guard on imports
  • Loading branch information
peterdsharpe committed Mar 4, 2024
1 parent 6546aac commit 52afc8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion aerosandbox/geometry/airplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,11 @@ def generate_cadquery_geometry(self,
Returns: A CADQuery Workplane object containing the CAD geometry of the airplane.
"""
import cadquery as cq
try:
import cadquery as cq
except ModuleNotFoundError:
raise ModuleNotFoundError(
"The `cadquery` library is required to use this function. Please install it with `pip install cadquery`.")

solids = []

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
'pyvista >= 0.31',
'trimesh >= 3',
'sympy >= 1',
'cadquery >= 2',
'shapely >= 2',
],
"test": [
Expand Down

0 comments on commit 52afc8a

Please sign in to comment.