3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
coat.torus Class Reference
Inheritance diagram for coat.torus:
coat.box coat.prim

Public Member Functions

 __init__ (self)
 
 __init__ (self, float ringRadius, float crossSectionRadius)
 
 __init__ (self, vec3 pos, float ringRadius, float crossSectionRadius)
 
torus slices (self, int _slices)
 set the number of slices in the mesh.
 
int slices (self)
 get the number of slices in the mesh.
 
torus rings (self, int _rings)
 set the number of rings in the mesh.
 
int rings (self)
 get the number of rings in the mesh.
 
torus radius (self, float r)
 set the ring radius.
 
float radius (self)
 get the ring radius.
 
torus section_radius (self, float section_r)
 set the cross section radius.
 
float section_radius (self)
 get the cross section radius.
 
torus diameter (self, float d)
 set the ring diameter.
 
float diameter (self)
 get the ring diameter.
 
torus section_diameter (self, float section_d)
 set the cross section diameter.
 
float section_diameter (self)
 get the cross section diameter.
 
torus sector_on (self, bool _switch)
 set the flag to create a portion of torus.
 
bool sector_on (self)
 get the flag of creating a portion of torus.
 
torus slices_angle (self, float angle)
 When sector is on, specifies the angle for torus slices.
 
float slices_angle (self)
 get the angle for torus slices
 
torus rings_angle (self, float angle)
 When sector is on, specifies the angle for torus rings.
 
float rings_angle (self)
 get the angle for torus rings
 
- Public Member Functions inherited from coat.box
box axis (self, vec3 directionX)
 set the x-direction
 
box axis (self, vec3 directionX, vec3 directionY)
 set the x and y direction
 
box axis (self, vec3 directionX, vec3 directionY, vec3 directionZ)
 set the x, y and z direction
 
box reset_axis (self)
 reset the x, y and z direction
 
vec3 axis_x (self)
 get the x-axis
 
vec3 axis_y (self)
 get the y-axis
 
vec3 axis_z (self)
 get the z-axis
 
box divide (self, int nx, int ny, int nz)
 set the number deviding
 
box size (self, vec3 _size)
 set the box size
 
box size (self, float x, float y, float z)
 set the box size
 
vec3 size (self)
 get the box size.
 
float fillet_relative (self)
 calculates a fillet relative value (0..1).
 
- Public Member Functions inherited from coat.prim
any class_name (self)
 get the primitive class name.
 
prim name (self, str s)
 set the primitive object name.
 
any name (self)
 get the primitive object name.
 
 add (self, Volume v)
 add the prim into scene
 
 subtract (self, Volume v)
 subtract the prim from scene
 
 intersect (self, Volume v)
 intersect the prim into scene
 
 merge (self, Volume v, BoolOpType op)
 merge the prim into scene
 
Mesh mesh (self)
 get the mesh prim
 
prim color (self, int CL)
 assign the color to the primitive (in voxels)
 
prim color (self, float r, float g, float b, float a)
 assign the color to the primitive (in voxels)
 
prim color (self, float r, float g, float b)
 assign the color to the primitive (in voxels)
 
prim color (self, str colorid)
 assign the color to the primitive (in voxels)
 
prim gloss (self, float value)
 assign the gloss for the voxel primitive, it will work only if the color already assigned
 
prim roughness (self, float value)
 assign the roughness for the voxel primitive, it will work only if the color already assigned
 
prim metal (self, float value)
 the metalliclty value for the voxel primitive, it will work only if the color already assigned
 
prim opacity (self, float value)
 assign the opacity of the color over the voxel primitive.
 
prim details (self, float det_level)
 set the detail level
 
float details (self)
 get the detail level
 
prim transform (self, mat4 t)
 set the transform matrix
 
mat4 transform (self)
 get the transform matrix
 
prim scale (self, float scale)
 set the scale
 
prim scale (self, vec3 v)
 set the scale
 
vec3 scale (self)
 get the scale
 
prim translate (self, vec3 _pos)
 Set the primitive translation.
 
vec3 translate (self)
 get the primitive translation
 
prim translate (self, float x, float y, float z)
 Set the primitive translation.
 
prim x (self, float x)
 shift the primitive along the x - axis
 
prim y (self, float y)
 shift the primitive along the y - axis
 
prim z (self, float z)
 shift the primitive along the z - axis
 
prim auto_divide (self, float average_div)
 set the auto devide
 
prim step_divide (self, float step)
 set the step devide
 
prim fillet (self, float radius)
 set the fillet
 

Additional Inherited Members

- Static Public Member Functions inherited from coat.prim
 debug_on (bool isOn=True)
 indicates whether to turn on or off the debug mode.
 
 debug_clear ()
 clear the debug info for primitive operations
 
 push_transform (mat4 t)
 set the global transform matrix to all primitives
 
 push_translate (vec3 d)
 Set the translation to all primitives.
 
 push_scale (float scale)
 Set the scale to all primitives.
 
 push_scale (vec3 s)
 Set the scale to all primitives.
 
 push_details (float details_modulator)
 set the detail level to all primitives
 
 reset_transform ()
 reset the global transform matrix
 

Constructor & Destructor Documentation

◆ __init__() [1/3]

coat.torus.__init__ ( self)

Reimplemented from coat.box.

◆ __init__() [2/3]

coat.torus.__init__ ( self,
float ringRadius,
float crossSectionRadius )

Reimplemented from coat.box.

◆ __init__() [3/3]

coat.torus.__init__ ( self,
vec3 pos,
float ringRadius,
float crossSectionRadius )

Reimplemented from coat.box.

Member Function Documentation

◆ diameter() [1/2]

float coat.torus.diameter ( self)

get the ring diameter.

Returns
ring diameter

◆ diameter() [2/2]

torus coat.torus.diameter ( self,
float d )

set the ring diameter.

Parameters
dring diameter
Returns
torus reference

◆ radius() [1/2]

float coat.torus.radius ( self)

get the ring radius.

Returns
ring radius

◆ radius() [2/2]

torus coat.torus.radius ( self,
float r )

set the ring radius.

Parameters
rring radius
Returns
torus reference

◆ rings() [1/2]

int coat.torus.rings ( self)

get the number of rings in the mesh.

Returns
number of rings

◆ rings() [2/2]

torus coat.torus.rings ( self,
int _rings )

set the number of rings in the mesh.

Parameters
_ringsnumber of rings.
Returns
torus reference

◆ rings_angle() [1/2]

float coat.torus.rings_angle ( self)

get the angle for torus rings

Returns
the rings angle

◆ rings_angle() [2/2]

torus coat.torus.rings_angle ( self,
float angle )

When sector is on, specifies the angle for torus rings.

Default = 360 degrees.

Parameters
anglethe angle for torus rings
Returns
torus reference

◆ section_diameter() [1/2]

float coat.torus.section_diameter ( self)

get the cross section diameter.

Returns
cross section diameter

◆ section_diameter() [2/2]

torus coat.torus.section_diameter ( self,
float section_d )

set the cross section diameter.

Parameters
section_dcross section diameter
Returns
torus reference

◆ section_radius() [1/2]

float coat.torus.section_radius ( self)

get the cross section radius.

Returns
cross section radius

◆ section_radius() [2/2]

torus coat.torus.section_radius ( self,
float section_r )

set the cross section radius.

Parameters
section_rcross section radius
Returns
torus reference

◆ sector_on() [1/2]

bool coat.torus.sector_on ( self)

get the flag of creating a portion of torus.

Default = false.

Returns
the sector switch

◆ sector_on() [2/2]

torus coat.torus.sector_on ( self,
bool _switch )

set the flag to create a portion of torus.

Parameters
_switchthe boolean true/false value
Returns
torus reference

◆ slices() [1/2]

int coat.torus.slices ( self)

get the number of slices in the mesh.

Returns
number of slices

◆ slices() [2/2]

torus coat.torus.slices ( self,
int _slices )

set the number of slices in the mesh.

Parameters
_slicesnumber of slices.
Returns
torus reference

◆ slices_angle() [1/2]

float coat.torus.slices_angle ( self)

get the angle for torus slices

Returns
the slices angle

◆ slices_angle() [2/2]

torus coat.torus.slices_angle ( self,
float angle )

When sector is on, specifies the angle for torus slices.

Default = 360 degrees.

Parameters
anglethe angle for torus slices
Returns
torus reference

The documentation for this class was generated from the following file: