Compare commits

..

4 Commits

4 changed files with 3511 additions and 365 deletions

View File

@ -1,6 +1,7 @@
# Cosplay
This is the design repository for NorCal Hakkero Factory No. 1.
This is the design repository for NorCal Hakkero Factory No. 1, where we use
parametric CAD to make cosplay props.
## Development
@ -15,6 +16,12 @@ and this should succeed
python3 -c "import nhf"
```
To visualize an object, create a file `visualize.py`, and run `cq-editor`:
``` sh
python3 -m cq_editor visualize.py
```
## Testing
Run all tests with

View File

@ -214,7 +214,7 @@ class Submodel:
def write_to(self, obj, path: str):
x = self._method(obj)
assert isinstance(x, Model), f"Unexpected type: {type(x)}"
x.build_all(path, prefix=False)
x.build_all(path)
@classmethod
def methods(cls, subject):
@ -271,17 +271,11 @@ class Model:
total += 1
return total
def build_all(
self,
output_dir: Union[Path, str] = "build",
prefix: bool = True,
verbose=1):
def build_all(self, output_dir: Union[Path, str] = "build", verbose=1):
"""
Build all targets in this model and write the results to file
"""
output_dir = Path(output_dir)
if prefix:
output_dir = output_dir / self.name
targets = Target.methods(self)
for t in targets.values():
file_name = t.file_name

3845
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -8,13 +8,21 @@ readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
cadquery = {git = "https://github.com/CadQuery/cadquery.git"}
build123d = "^0.5.0"
numpy = "^1.26.4"
#build123d = "^0.5.0"
numpy = ">=2,<3"
colorama = "^0.4.6"
# cadquery dependency
multimethod = "^1.12"
scipy = "^1.14.0"
typish = "^1.9.3"
[tool.poetry.group.dev.dependencies]
cq-editor = {git = "https://github.com/CadQuery/CQ-editor.git"}
pyqt5 = "^5.15.11"
logbook = "^1.8.0"
spyder = "^5"
pyqtgraph = "^0.13.7"
[build-system]
requires = ["poetry-core"]