Skip to content
wrongbadPublic

About

CAD modeling for Jupyter

Resources

Stars

95 stars

Watchers

1 watching

Forks

Latest commit

 

History

82 Commits

Folders and files

Repository files navigation

badcad

a jupyter based cad workflow

most of the hard work is done by

this project aims to focus on usability in a jupyter environment

specifically for creating and exporting functional parts

also the pythonic API turns out to be extremely effective for AI agents to build 3d models

setup

pip install git+https://github.com/wrongbad/badcad.git
# optional dependencies (text + svg + png support)
pip install "badcad[all] @ git+https://github.com/wrongbad/badcad.git"

example

from badcad import *
plus = square(3, 1, center=True) + square(1, 3, center=True)
p_lil = plus.offset(-0.4, 'round')
p_big = plus.offset(+0.4, 'round')
p_big.extrude_to(p_lil, 1)

plus

from badcad import *
deathstar = sphere(r=1) - sphere(r=0.5).move(1.2,0,0)
deathstar.stl('deathstar.stl')
deathstar.rotate(y=-45, z=45)

deathstar

from badcad import *
bolt = threads(d=8, h=16, pitch=1) 
bolt += circle(r=5, fn=6).offset(1,'round').extrude(4).move(0,0,15)
bolt.align(x=0,y=0,z=0).rotate(x=-90)

bolt

from badcad import *
t = text('yo', font='monospace')
t = t.offset(1,'round').extrude(2) - t.extrude(2)
t.align(x=0)

txt

motivation

to escape openscad syntax - op wrapping and nesting is an editing nightmare compared to A + B.move(...) - C style

to escape openscad render times - manifold lib is 1000x faster for high-poly boolean ops

to enable easier prototyping of mesh algorithms in the CAD environment

About

CAD modeling for Jupyter

Resources

Stars

95 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages