Add your description here
Project description
2D CAD Drawing generation from 3D CAD models
This tool is used to generate 2D CAD drawings from 3D CAD models.
Installation
Install the package from PyPI:
pip install cad-3dto2d
Or install the package from the source code:
git clone https://github.com/neka-nat/cad-3dto2d.git
cd cad-3dto2d
uv sync
Usage
python scripts/gen2d.py --step_file </path/to/step_file> --template A4_LandscapeParam --add_dimensions
Batch generation for machine-learning datasets (random template/style/scale/layout):
python scripts/gen2d_batch_random.py \
--input_dir path/to/3d_models_dir/ \
--output_dir path/to/output_dir/ \
--recursive \
--variants-per-step 3 \
--random-side-position \
--random-top-position \
--workers 4 \
--layout-scale-min 30 \
--layout-scale-max 70 \
--layout-offset-x-min -20 \
--layout-offset-x-max 20 \
--layout-offset-y-min -20 \
--layout-offset-y-max 20 \
--seed 42
If you do not need template-based layout alignment, add --no-use-template-layout for faster generation.
Demo
Original 3D model (Flange)
Generated 2D drawing (Flange)
Original 3D model (Lego Block)
Generated 2D drawing (Lego Block)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cad_3dto2d-0.3.0.tar.gz.
File metadata
- Download URL: cad_3dto2d-0.3.0.tar.gz
- Upload date:
- Size: 97.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5157099e19f64cd9ec3738b075c25e279605dde3524111b938361e79481d3bb1
|
|
| MD5 |
4cff514b15133125335dab0f7196083a
|
|
| BLAKE2b-256 |
aa736f59309f75c3893c10bbfa0059cbe8a20a7358ff4ff66429f1826f7c2be1
|
File details
Details for the file cad_3dto2d-0.3.0-py3-none-any.whl.
File metadata
- Download URL: cad_3dto2d-0.3.0-py3-none-any.whl
- Upload date:
- Size: 49.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
653a96941046bfbfdc5958f6feefd588d65c9cf54805e551b71cdeb73839914f
|
|
| MD5 |
7df44f285ddfaf5885d7d466e9f09b30
|
|
| BLAKE2b-256 |
677d98757660c67cbf22ae159b551dcf2183927043ddef6c0e58bb1787b7d4a9
|