How to use zencad - 10 common examples

To help you get started, we’ve selected a few zencad examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mirmik / zencad / test / face_prim / fillet_ngon.py View on Github external
#!/usr/bin/env python3
#coding: utf-8

import zencad

m = zencad.ngon(r = 10, n = 6).fillet(4)
zencad.display(m)

zencad.show()
github mirmik / zencad / test / caching / torus.py View on Github external
#!/usr/bin/env python3
#coding: utf-8

import zencad
m = zencad.torus(r1 = 10, r2 = 3)

zencad.display(m)
zencad.show()
github mirmik / zencad / test / HIDE / include / include.py View on Github external
import zencad

model = zencad.execfile("box.py")["model"]

#scn = zencad.scene()
#scn.add(model)
#
#cam = zencad.camera(0,0,0,0,0,0)
#
#view = zencad.view(scn, cam)
#view.render()
#
#view.screenshot("path.png")

zencad.display(model)
zencad.show()
github mirmik / zencad / test / prim2d / square.py View on Github external
#!/usr/bin/env python3
#coding: utf-8

import zencad

m = zencad.square(a = 10, center = True)
zencad.display(m)

zencad.show()
github mirmik / zencad / test / prim1d / segment.py View on Github external
#!/usr/bin/env python3
#coding: utf-8

import sys
sys.path.insert(0, "../..")

import zencad

m = zencad.segment((0,0,0), (10,20,30))
zencad.display(m)

zencad.show()
github mirmik / zencad / test / prim2d / rectangle.py View on Github external
#!/usr/bin/env python3
#coding: utf-8

import zencad

m = zencad.rectangle(a = 10, b = 6, center = True)
zencad.display(m)

zencad.show()
github mirmik / zencad / test / caching / cylinder.py View on Github external
#!/usr/bin/env python3
#coding: utf-8

import zencad
m0 = zencad.cylinder(r = 10, h = 20)

zencad.display(m0)
zencad.show()
github mirmik / zencad / test / prim0d / point.py View on Github external
#!/usr/bin/env python3
#coding: utf-8

import zencad
zencad.display(zencad.point(2,4,5))
zencad.display(zencad.point(20,40,50))

zencad.show()
github mirmik / zencad / test / HIDE / include / box.py View on Github external
#!/usr/bin/env python3

import zencad

model = zencad.box(30,20,10)

if __name__ == "__main__":
	zencad.display(model)
	zencad.show()
github mirmik / zencad / test / HIDE / interpolate.py View on Github external
(5,2),
	(6,3),
])

tang = zencad.vectors([
	(1,0),
	(0,0),
	(1,0),
	(1,1),
	(1,1),
	(1,1),
])

zencad.display(zencad.interpolate(pnts = pnts))
for p in pnts: zencad.display(p)
zencad.show()