How to use the zencad.util.point3 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 / zencad / __init__.py View on Github external
def to_point(arg):
    return zencad.util.point3(arg)
github mirmik / zencad / zencad / geom / HIDE / transform.py View on Github external
def scale(factor, center):
    if factor is list or factor is tuple:
        return pyservoce.scaleXYZ(factor[0], factor[1], factor[2])
    return pyservoce.scale(factor, point3(center).to_servoce())
github mirmik / zencad / zencad / geom / wire_builder.py View on Github external
def restart(self, pnt, y=None, z=None):
		pnt = self.collect_point(pnt, y, z)
		self.edges = []
		self.current = point3(pnt)
		self.start = self.current
		return self
github mirmik / zencad / zencad / geom / prim1d.py View on Github external
def circle_arc(p1, p2, p3):
	"""Построение дуги круга по трем точкам"""
	return pyservoce.circle_arc(point3(p1), point3(p2), point3(p3))
github mirmik / zencad / zencad / draw.py View on Github external
def arrow(pnt, vec, clr=zencad.color.white, arrlen=5, width=1, scene=None):
	if scene is None: scene = zencad.default_scene()
	intobj = pyservoce.draw_arrow(zencad.util.point3(pnt), zencad.util.vector3(vec), clr, arrlen, width)
	if scene:
		scene.add(intobj)
	return intobj
github mirmik / zencad / zencad / draw.py View on Github external
def line(apnt, bpnt, clr=zencad.color.white, width=1, scene=None):
	if scene is None: scene = zencad.default_scene()
	intobj = pyservoce.draw_line(zencad.util.point3(apnt), zencad.util.point3(bpnt), clr=clr, width=width)
	if scene:
		scene.add(intobj)
	return intobj
github mirmik / zencad / zencad / geom / wire_builder.py View on Github external
def plane_circle_arc(self, r, angle, large, sweep, x, y):
		centers = zencad.gutil.restore_circle_centers(self.current, point3(x,y), r)
		target = point3(x,y)

		cent = None

		if centers[0].early(centers[1]):
			cent = centers[0]

			if sweep:
				self.arc(cent, r, deg(180))
			else:
				self.arc(cent, r, -deg(180))

		else:
			for c in centers:

				cv = self.current - c