Skip to main content

Command-line interface to PartCAD

Project description

PartCAD

License

CI on Linux, MacOS and Windows CD on Linux, MacOS and Windows Deployment to PyPI Documentation Status Discord

PartCAD is the first package manager for CAD models and a framework for managing assemblies. It aims to complement Git with everything necessary to substitute commercial Product Lifecycle Management (PLM) tools.

PartCAD maintains information about mechanical parts and how they come together to form larger assemblies. The same parts can be reused in multiple assemblies and multiple projects. And all of that is supercharged by the ultimate versioning and collaboration features of Git.

PartCAD features include:

  • 3D part models using CadQuery, build123d and OpenSCAD scripting languages
  • 3D part models using legacy STEP, STL and 3MF files
  • Generate 3D models using LLM/GenAI: Google AI (Gemini), OpenAI (ChatGPT) or any model published to Ollama (Llama 3.1, DeepSeek-Coder-V2, CodeGemma, Code Llama etc)
  • 2D blueprints using build123d, or legacy DXF and SVG files
  • Fully featured object-oriented approach to maintaining part interfaces and mating information (with multiple class inheritance etc)
  • Live preview of 3D models while coding in VS Code
  • Render models to SVG, PNG and export to STEP, STL, 3MF, ThreeJS and OBJ
  • Render Markdown documentation files

Find more documentation here and visit our website.

Installation

Extension for Visual Studio Code

This extension can be installed by searching for PartCAD in VS Code extension search form, or by browsing its VS Code marketplace page.

PartCAD Visual Studio Code extension

Command-Line Interface

The recommended method to install PartCAD CLI tools for most users is:

pip install -U partcad-cli

For contributors:

git clone https://github.com/openvmp/partcad.git
cd partcad
python3 -m pip install -U -e ./partcad
python3 -m pip install -U -e ./partcad-cli

PartCAD works best when conda is installed. If that doesn't help (e.g. MacOS+arm64) then try mamba. On Windows, PartCAD requires at least a conda environment. On Ubuntu, try apt install libcairo2-dev if pip install fails to install cairo.

Architecture

Architecture

Tools for Mechanical Engineering

Here is an overview of open source tools to maintain mechanical projects. It demonstrates where PartCAD fits in the modern mechanical development workflows.

flowchart TB

subgraph repo["Your project's GIT repository"]
  subgraph custom_repo["Custom parts"]
    direction TB
    custom_part_internet["A STEP file\ndownloaded from Internet\nor the vendor site"]
    custom_part_cad["A part exported as a solid\nfrom a CAD tool not\nsuitable for collaboration"]
    custom_part_cq["An individual reusable part\nmaintained as a script\nunder a version control system"]
    custom_part_os["Another reusable part\nmaintained as a script\nunder a version control system"]
  end

  model["Your project's model defined\nas ASSY or Python code\nfor version control\nand collaboration"]

  subgraph scenes["Scenes"]
    test1["Capability 1\ntest scene"]
    test2["Capability 2\ntest scene"]
  end
end

subgraph external_repos["Third-party GIT repositories,\nCDN-hosted files or OCCI servers"]
  subgraph external_repo["Repository of standard\nor popular parts"]
  end
end

subgraph external_tools["External tools"]
  freecad["FreeCAD"]
  cadquery["CadQuery / build123d"]
  openscad["OpenSCAD"]
  gazebo["Gazebo"]

  partcad["PartCAD library"]
  style partcad fill:#c00
end

custom_part_cad <--- |Individual\ncontributor|freecad
custom_part_cq <--- |Part design\nworkflow| cadquery
custom_part_os <--- |Part design\nworkflow| openscad

external_repo ---> |Import| model
custom_repo ---> |Import| model
model -.-> |Import| test1
model -.-> |Import| test2

custom_repo <-. Maintained\nusing\nPartCAD\nconvention .- partcad
external_repo <-. Maintained\nusing\nPartCAD\nconvention .- partcad
model <--- partcad
test1 <--- partcad
test2 <--- partcad

test1 -.-> |Export| gazebo
test2 -.-> |Export| gazebo

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

partcad_cli-0.7.12.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

partcad_cli-0.7.12-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file partcad_cli-0.7.12.tar.gz.

File metadata

  • Download URL: partcad_cli-0.7.12.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for partcad_cli-0.7.12.tar.gz
Algorithm Hash digest
SHA256 61f96fc96c2b51484ef0ea4c3d8c1ea63fb17045327eaced99f198aeb6d9b3e6
MD5 a17e9b175d2bb6e9728832f6739b7daf
BLAKE2b-256 e288dc773e7aaffb92534b9c0c380ac6713ab83d25e28167b81b0734f798a1b3

See more details on using hashes here.

Provenance

File details

Details for the file partcad_cli-0.7.12-py3-none-any.whl.

File metadata

  • Download URL: partcad_cli-0.7.12-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for partcad_cli-0.7.12-py3-none-any.whl
Algorithm Hash digest
SHA256 dcf7938e00dc673291eb53bd8ca61a7e8f197e5fe4ba7ca88052add2da0eb6b1
MD5 b93dac1cfdeef6413b81e758be00fe32
BLAKE2b-256 678f1b92032346f20a36ce4531a82b6b4a41770a8a2718d8c9181f34a5a33a79

See more details on using hashes here.

Provenance

Supported by

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