Compare commits

..

No commits in common. "4f48955c81a8a2e606eed95fa6806fb2e0462d43" and "2a405f916a83dbb3f5cd8eb8e03457eeeb4b6484" have entirely different histories.

4 changed files with 4040 additions and 2800 deletions

View File

@ -1,74 +1,34 @@
# Cosplay
This is the design repository for NorCal Hakkero Factory No. 1, where we use
parametric CAD to make cosplay props. We design cosplay props based on an
engineering point of view.
parametric CAD to make cosplay props.
> NorCal Hakkero Factory № 1
>
> 北加国営八卦炉第一工場
Most cosplay schematics are created with Blender, CadQuery, and Inkscape.
## Development
Install `uv`, and then execute
``` sh
uv sync
Most cosplay schematics are created with Blender, CadQuery, and Inkscape. To
enter into a CadQuery environment, install `poetry` and use
```sh
poetry install
poetry shell
```
To get a development environment, run
``` sh
uv venv
and this should succeed
```sh
python3 -c "import nhf"
```
Then, either follow the instruction to activate this venv, or install `direnv`
and create the file
``` sh
# .envrc
source .venv/bin/activate
```
Test the environment with `python3 -c "import nhf"`
To visualize an object, create a file `visualize.py`, and run `cq-editor`:
``` sh
python3 -m cq_editor visualize.py
```
### Folder Structure
- `nhf/parts/`: Ready-made parts
- `nhf/$WORK/$CHARACTER`: Design for an individual character
For each individual character, the `__init__.py` script stores the overall build
entry point and the entry point for all unit tests.
### Testing
## Testing
Run all tests with
``` sh
unittest-parallel
```
## Troubleshooting
### Wayland
If there is the error
```
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 3 (X_GetWindowAttributes)
Resource id in failed request: 0x3
Serial number of failed request: 28
Current serial number in output stream: 29
```
Export the environment variable
``` sh
export QT_QPA_PLATFORM=xcb
python3 -m unittest
```

4010
poetry.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +1,28 @@
[project]
[tool.poetry]
name = "nhf"
version = "0.1.0"
description = "NorCal Hakkero Factory No. 1 Cosplay Designs"
authors = [{ name = "Leni Aniva", email = "aniva@stanford.edu" }]
requires-python = ">=3.10,<3.13"
authors = ["Leni Aniva <v@leni.sh>"]
readme = "README.md"
dependencies = [
"cadquery==2.5.2",
"numpy>=2,<3",
"colorama>=0.4.6,<0.5",
"multimethod~=1.12",
"scipy>=1.14.0,<2",
"typish>=1.9.3,<2",
]
[dependency-groups]
dev = [
"cq-editor",
"pyqt5>=5.15.11,<6",
"logbook>=1.8.0,<2",
"spyder>=5,<6",
"pyqtgraph>=0.13.7,<0.14",
"unittest-parallel>=1.7.4",
]
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
cadquery = "2.5.2"
numpy = ">=2,<3"
colorama = "^0.4.6"
[tool.uv]
# cadquery dependency
multimethod = "^1.12"
scipy = "^1.14.0"
typish = "^1.9.3"
[tool.uv.sources]
cq-editor = { git = "https://github.com/CadQuery/CQ-editor.git" }
[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 = ["hatchling"]
build-backend = "hatchling.build"
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

2724
uv.lock

File diff suppressed because it is too large Load Diff