SCADNLP
Natural Language to OpenSCAD Code Translator
Package Overview
SCADNLP is a specialized tool designed to bridge the gap between casual text descriptions and precise, structured 3D modeling instructions for OpenSCAD, the powerful yet text-based CAD software. It takes natural language input, parses and refines the description using llmatch-messages, and generates clean, structured OpenSCAD code with embedded comments explaining key design choices.
Example Workflow
- Input: "Design a minimalist wall clock with a curved dial, a wooden base, and subtle LED backlighting hints."
- Output: Structured OpenSCAD code with:
- Parametric variables (e.g.,
dial_radius = 50,base_thickness = 8) - Modular functions (e.g.,
module curved_dial()) - Comments clarifying design trade-offs (e.g.,
# LED hint: Low-poly approximation for simplicity) - Error handling for ambiguous terms (e.g., "'wooden base' → assumed linear wood grain texture")
- Parametric variables (e.g.,
Installation
pip install scadnlp
Usage
from scadnlp import scadnlp
user_input = "Design a minimalist wall clock with a curved dial, a wooden base, and subtle LED backlighting hints."
response = scadnlp(user_input)
print(response)
You can customize the LLM instance by passing your own instance as the llm parameter:
from langchain_openai import ChatOpenAI
from scadnlp import scadnlp
llm = ChatOpenAI()
response = scadnlp(user_input, llm=llm)
Or, you can pass your own API key for LLM7 to increase the rate limits:
import os
os.environ["LLM7_API_KEY"] = "your_api_key_here"
response = scadnlp(user_input)
Author
Eugene Evstafev (chigwell)
Contact
Contributions
Contributions are welcome! Please feel free to open a GitHub issue or create a pull request.
License
MIT License
Acknowledgments
SCADNLP uses the ChatLLM7 from langchain_llm7 by default. You can safely pass your own LLM instance for customization.
Rate Limits
The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you need higher rate limits, you can pass your own API key for LLM7 by setting the LLM7_API_KEY environment variable or passing it directly as the api_key parameter.
Getting a Free API Key
Register at token.llm7.io to get a free API key.
GitHub Issues
Metadata
Release files for scadnlp 2025.12.20175356
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scadnlp-2025.12.20175356.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scadnlp-2025.12.20175356-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / scadnlp-2025.12.20175356.tar.gz
| Download URL | scadnlp-2025.12.20175356.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b8c29178f3a90e1014f53885c16aa920a601c4fb55d5aa4018e288eaf96fdc3
|
|
BLAKE2b-256 checksum How to use checksums |
c81cefcb1bde1d50296c377da504ad2faacef9b61ec88362b3d19597e058a045
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / scadnlp-2025.12.20175356-py3-none-any.whl
| Download URL | scadnlp-2025.12.20175356-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7efcd9fece073e028821ecbad5955f6e2452df371381abebf76be22a0997c2d
|
|
BLAKE2b-256 checksum How to use checksums |
95dfdd95e78dc3ff1e6c360f676213ca2517fc523597a254024f9be46dc778e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|