Additional Features

Procurement and Manufacturing

PartCAD currently supports two types of providers (entities that can provide parts and assemblies): store and manufacturer. store can be used to quote and order parts from existing lists: by vendor and SKU. manufacturer can be used to quote and order parts by using their 3D model (for example, by 3D printing them).

In the future, PartCAD will support assembler, which is supposed to produce an assembly given assembly instructions and using parts ordered from store-s and manufacturer-s.

Currently, the provider has to be explicitly specified in the quote or order request, or explicitly specified as one of the suppliers in the package where the parts are declared. In the future PartCAD will be able to select providers based on the location and preferences of the requestor, while leaving the possibility to enforce the use of a specific provider for corresponding parts (for example, for parts that are using a patented design).

Generative AI

PartCAD aims to provide powerful generative AI capabilities to the CAD community. Such capabilities serve two purposes.

First of all, they can be used to script more features using LLMs. Write your own AI agents that iterate through existing packages to find the part you are looking for, or automatically generate part designs. Or anything else you can think of.

Last but not least, they are powering accessibility features, allowing blind users to navigate the catalog of parts or to interactively create their own designs.

Google Gemini, OpenAI and Ollama APIs are supported. The following configuration is required:

# ~/.partcad/config.yaml
googleApiKey: <...>
openaiApiKey: <...>

The following configuration is optional:

# ~/.partcad/config.yaml
# ollamaNumThread is the number of CPU threads Ollama should utilize
ollamaNumThread: <integer>

PartCAD AI agents are designed to query AI multiple times, so that a range of options is considered and the best result is found. The following configuration options can be used to influence that bahavior:

# ~/.partcad/config.yaml
# maxGeometricModeling is the number of attempts for geometric modelling
maxGeometricModeling: 4
# maxModelGeneration is the number of attempts for CAD script generation
maxModelGeneration: 3
# maxScriptCorrection is the number of attempts to incrementally fix the script if it's not working
maxScriptCorrection: 2

Design

PartCAD is capable of using generative AI to create parts. The generated part definitions are persisted as Python or CAD scripts.

# Initialize the package
pc init
# Define the part but do not generate it yet
pc add-part ai-openscad --ai google --desc "Pixel phone case of a surprising shape" "generated-case.scad"
# Inspect the part. It triggers part generationg on demand.
pc inspect "generated-case"

To use ChatGPT instead of Gemini, pass “openai” instead of “google” as the “–ai” parameter. To use Ollama, pass “ollama”.

If needed, the part can be regenerated by truncating the generated files.

true > "generated-case.scad"
pc inspect "generated-case"

Please, be ready to retry a few times to get an acceptable outcome.

Summarization

Summarize the part or assembly using following commands:

pc init
pc inspect -V /pub/robotics/parts/gobilda:structure/u_channel_2
pc inspect -V -a /pub/robotics/parts/gobilda:examples/wormgear

Or their more script-friendly variants:

pc init
pc -q --no-ansi inspect -V /pub/robotics/parts/gobilda:structure/u_channel_2
pc -q --no-ansi inspect -V -a /pub/robotics/parts/gobilda:examples/wormgear

Security

As code-CAD is gaining popularity in the community, the topic of supply chain security and the risk of running arbitrary third-party code is not sufficiently addressed. PartCAD aims to close that gap for open-source software in a way that exceeds anything commercial software has to offer at the moment.

PartCAD is capable of rendering scripted parts (CadQuery and build123d use Python) in sandboxed environments.

At the moment it is only useful from a dependency management perspective (it allows third-party packages to bring their Python dependencies without polluting your own Python environment), in the future, PartCAD aims to achieve security isolation of the sandboxed environments. That will fundamentally change the security implications of using scripted models shared online.