Skip to main content

**The Package** is a specialized tool designed to bridge the gap between casual text descriptions and precise, structured 3D modeling instructions—specifically for **OpenSCAD**, the powerful yet text-

Project description

SCADNLP

PyPI version License: MIT Downloads LinkedIn

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")

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

hi@euegne.plus

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

https://github.com/chigwell/scadnlp/issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scadnlp-2025.12.20175356.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scadnlp-2025.12.20175356-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file scadnlp-2025.12.20175356.tar.gz.

File metadata

  • Download URL: scadnlp-2025.12.20175356.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for scadnlp-2025.12.20175356.tar.gz
Algorithm Hash digest
SHA256 0b8c29178f3a90e1014f53885c16aa920a601c4fb55d5aa4018e288eaf96fdc3
MD5 e23d6b4ccdf4179d52821660a4ada6c7
BLAKE2b-256 c81cefcb1bde1d50296c377da504ad2faacef9b61ec88362b3d19597e058a045

See more details on using hashes here.

File details

Details for the file scadnlp-2025.12.20175356-py3-none-any.whl.

File metadata

File hashes

Hashes for scadnlp-2025.12.20175356-py3-none-any.whl
Algorithm Hash digest
SHA256 d7efcd9fece073e028821ecbad5955f6e2452df371381abebf76be22a0997c2d
MD5 c3e04ec44522c9691c1e95d70ecd5ccb
BLAKE2b-256 95dfdd95e78dc3ff1e6c360f676213ca2517fc523597a254024f9be46dc778e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page