How to use the zencad.show function in zencad

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 / 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()
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 / caching / box.py View on Github external
#!/usr/bin/env python3
#coding: utf-8

import zencad
import zencad.future_cache

import evalcache

evalcache.enable()

m = zencad.future_cache.box(20, 80, 10)
zencad.display(m.eval())

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 / sphere.py View on Github external
#!/usr/bin/env python3
#coding: utf-8

import zencad
m = zencad.sphere(10)

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 / 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 / zencad / examples / Integration / skimage-mechanicus / mech.py View on Github external
if __name__ == "__main__":
    mechanicus, base, zcountours = build()
    for z in zcountours:
        if z.is_closed():
            zencad.display(
                z.left(760 / 2).back(768 / 2).forw(760 + 200), zencad.color(0, 1, 0)
            )
        else:
            zencad.display(
                z.left(760 / 2).back(768 / 2).forw(760 + 200), zencad.color(1, 0, 0)
            )

    zencad.display(mechanicus, zencad.color(1, 1, 1))
    zencad.display(base, zencad.color(0.2, 0.2, 0.2))
    zencad.show()