A Simple yet powerful CAD library written with Python

Py-MADCAD

Simple yet powerful CAD (Computer Aided Design) library, written with Python.

Features

  • surface generation (3D sketch primitives, extrusion, revolution, …)
  • fast boolean operations
  • common mesh file format import/export
  • kinematic manipulation
  • implicit geometry definition through the constraint/solver system
  • objects display with high-quality graphics

Sample usage

from madcad import *

# define points
O = vec3(0)
A = vec3(2,0,0)
B = vec3(1,2,0)
C = vec3(0,2,0)

# create a list of primitives
line = [
	Segment(O, A),          
	ArcThrough(A, B, C),
	Segment(C,O),           
	]

# create and solve constraints
solve([
		Tangent(line[0], line[1], A),   
		Tangent(line[1], line[2], C),   
		Radius(line[1], 1.5),           
	], fixed=[O])

# generate surfaces
part = extrusion(vec3(0,0,1), web(line))

# display in a 3D scene
show([part])

The result will be this window

readme-example

About

MADCAD is

 

 

 

To finish reading, please visit source site