How to use the zencad.util.vector3 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 / libs / bullet.py View on Github external
def set_gravity(self, x, y=None, z=None):
		v = zencad.util.vector3(x,y,z)
		#v = v * self.scale_factor
		p.setGravity(*v)
github mirmik / zencad / zencad / geom / ops3d.py View on Github external
def pipe_shell(
		wires, 
		spine, 
		frenet=False, 
		binormal=vector3(0,0,0), 
		parallel=vector3(0,0,0), 
		force_approx_c1=False, 
		solid=True,
		discrete=False, 
		path=None):
	if path is not None:
		spine = path
		print("pipe: path option is renamed. use spine instead")
	#if isinstance(proto, pyservoce.libservoce.Shape):
	#	return pyservoce.pipe_shell(proto, path, frenet)

	fwires = []
	for w in wires:
		if isinstance(w, pyservoce.Face):
			fwires.append(w.outwire())
		else:
			fwires.append(w)
github mirmik / zencad / zencad / geom / ops3d.py View on Github external
def linear_extrude(proto, vec, center=False):
	if isinstance(vec, (int, float)):
		vec = vector3(0, 0, vec)
	return pyservoce.linear_extrude(proto, vector3(vec), center)
github mirmik / zencad / zencad / geom / ops3d.py View on Github external
def linear_extrude(proto, vec, center=False):
	if isinstance(vec, (int, float)):
		vec = vector3(0, 0, vec)
	return pyservoce.linear_extrude(proto, vector3(vec), center)
github mirmik / zencad / zencad / geom / ops3d.py View on Github external
#if isinstance(proto, pyservoce.libservoce.Shape):
	#	return pyservoce.pipe_shell(proto, path, frenet)

	fwires = []
	for w in wires:
		if isinstance(w, pyservoce.Face):
			fwires.append(w.outwire())
		else:
			fwires.append(w)

	return pyservoce.pipe_shell(
		wires=fwires, 
		spine=spine, 
		frenet=frenet, 
		force_approx_c1=force_approx_c1, 
		binormal=vector3(binormal),
		parallel=vector3(parallel),
		discrete=discrete,
		solid=solid)
github mirmik / zencad / zencad / __init__.py View on Github external
def to_vector(arg):
    return zencad.util.vector3(arg)
github mirmik / zencad / zencad / geom / HIDE / transform.py View on Github external
def rotate(ax, angle):
    return pyservoce.rotate(vector3(ax), angle)
github mirmik / zencad / zencad / geom / ops3d.py View on Github external
#	return pyservoce.pipe_shell(proto, path, frenet)

	fwires = []
	for w in wires:
		if isinstance(w, pyservoce.Face):
			fwires.append(w.outwire())
		else:
			fwires.append(w)

	return pyservoce.pipe_shell(
		wires=fwires, 
		spine=spine, 
		frenet=frenet, 
		force_approx_c1=force_approx_c1, 
		binormal=vector3(binormal),
		parallel=vector3(parallel),
		discrete=discrete,
		solid=solid)