torus_to_threejs

compas_notebook.conversions.torus_to_threejs(torus)

Convert a COMPAS torus to a PyThreeJS torus geometry.

Parameters:
toruscompas.geometry.Torus

The torus to convert.

Returns:
three.TorusGeometry

The PyThreeJS torus geometry.

Examples

>>> from compas.geometry import Torus
>>> torus = Torus(radius_axis=1, radius_pipe=0.2)
>>> torus_to_threejs(torus)  
TorusGeometry(...)