3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
coat.cylinder Class Reference
Inheritance diagram for coat.cylinder:
coat.prim coat.capsule coat.cone coat.tube coat.gear coat.ngon

Public Member Functions

 __init__ (self)
 
 __init__ (self, float height, float radiusTop, float radiusBottom, float fillet=0.0)
 
 __init__ (self, vec3 posTop, vec3 posBottom, float radiusTop, float radiusBottom, float fillet=0.0)
 
cylinder positionTop (self, vec3 pos)
 set the top position.
 
vec3 positionTop (self)
 get the top position.
 
cylinder positionBottom (self, vec3 pos)
 set the bottom position.
 
vec3 positionBottom (self)
 get the bottom position.
 
cylinder radiusTop (self, float r)
 set the top radius.
 
float radiusTop (self)
 get the top radius.
 
cylinder radiusBottom (self, float r)
 set the bottom radius.
 
float radiusBottom (self)
 get the bottom radius.
 
cylinder radius (self, float r)
 set the radius.
 
float radius (self)
 get the radius.
 
cylinder diameterTop (self, float d)
 set the top diameter.
 
float diameterTop (self)
 get the top diameter.
 
cylinder diameterBottom (self, float r)
 set the bottom diameter.
 
float diameterBottom (self)
 get the bottom diameter.
 
cylinder diameter (self, float d)
 set the diameter.
 
float diameter (self)
 get the diameter.
 
cylinder height (self, float _height)
 set the height in the z-axis.
 
float height (self)
 get the height.
 
cylinder sectorAngle (self, float angle)
 set the angle for cylinder with sector.
 
float sectorAngle (self)
 get the sector angle.
 
cylinder topCapScale (self, float scale)
 set the top cap scale.
 
float topCapScale (self)
 get the top cap scale.
 
cylinder bottomCapScale (self, float scale)
 set the bottom cap scale.
 
float bottomCapScale (self)
 get the bottom cap scale.
 
cylinder slices (self, int nslices)
 set the number of slices in the mesh.
 
int slices (self)
 get the number of slices in the mesh.
 
cylinder rings (self, int nrings)
 set the number of rings in the mesh.
 
int rings (self)
 get the number of rings in the mesh.
 
cylinder caps (self, int ncaps)
 set the number of caps in the mesh.
 
int caps (self)
 get the number of caps in the mesh.
 
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]

◆ __init__() [2/3]

coat.cylinder.__init__ ( self,
float height,
float radiusTop,
float radiusBottom,
float fillet = 0.0 )

◆ __init__() [3/3]

coat.cylinder.__init__ ( self,
vec3 posTop,
vec3 posBottom,
float radiusTop,
float radiusBottom,
float fillet = 0.0 )

Member Function Documentation

◆ bottomCapScale() [1/2]

float coat.cylinder.bottomCapScale ( self)

get the bottom cap scale.

Returns
the scale value

◆ bottomCapScale() [2/2]

cylinder coat.cylinder.bottomCapScale ( self,
float scale )

set the bottom cap scale.

Parameters
scalethe scale value
Returns
cylinder reference

◆ caps() [1/2]

int coat.cylinder.caps ( self)

get the number of caps in the mesh.

Returns
number of caps.

◆ caps() [2/2]

cylinder coat.cylinder.caps ( self,
int ncaps )

set the number of caps in the mesh.

Parameters
ncapsnumber of caps.
Returns
cylinder reference

◆ diameter() [1/2]

float coat.cylinder.diameter ( self)

get the diameter.

Returns
diameter value

Reimplemented in coat.cone, and coat.cone.

◆ diameter() [2/2]

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

set the diameter.

Parameters
ddiameter
Returns
cylinder reference

Reimplemented in coat.cone, and coat.cone.

◆ diameterBottom() [1/2]

float coat.cylinder.diameterBottom ( self)

get the bottom diameter.

Returns
diameter value

◆ diameterBottom() [2/2]

cylinder coat.cylinder.diameterBottom ( self,
float r )

set the bottom diameter.

Returns
cylinder reference

◆ diameterTop() [1/2]

float coat.cylinder.diameterTop ( self)

get the top diameter.

Returns
diameter value

◆ diameterTop() [2/2]

cylinder coat.cylinder.diameterTop ( self,
float d )

set the top diameter.

Parameters
ddiameter
Returns
cylinder reference

◆ fillet_relative()

float coat.cylinder.fillet_relative ( self)

calculates a fillet relative value (0..1).

Returns
fillet relative value

Reimplemented from coat.prim.

Reimplemented in coat.cone, coat.ngon, and coat.tube.

◆ height() [1/2]

float coat.cylinder.height ( self)

get the height.

Returns
height value

◆ height() [2/2]

cylinder coat.cylinder.height ( self,
float _height )

set the height in the z-axis.

Parameters
_heightheight
Returns
cylinder reference

◆ positionBottom() [1/2]

vec3 coat.cylinder.positionBottom ( self)

get the bottom position.

Returns
position

◆ positionBottom() [2/2]

cylinder coat.cylinder.positionBottom ( self,
vec3 pos )

set the bottom position.

Parameters
posposition
Returns
cylinder reference

◆ positionTop() [1/2]

vec3 coat.cylinder.positionTop ( self)

get the top position.

Returns
position

◆ positionTop() [2/2]

cylinder coat.cylinder.positionTop ( self,
vec3 pos )

set the top position.

Parameters
posposition
Returns
cylinder reference

◆ radius() [1/2]

float coat.cylinder.radius ( self)

get the radius.

Returns
radius value

Reimplemented in coat.cone, and coat.cone.

◆ radius() [2/2]

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

set the radius.

Parameters
rradius
Returns
cylinder reference

Reimplemented in coat.cone, and coat.cone.

◆ radiusBottom() [1/2]

float coat.cylinder.radiusBottom ( self)

get the bottom radius.

Returns
radius value

◆ radiusBottom() [2/2]

cylinder coat.cylinder.radiusBottom ( self,
float r )

set the bottom radius.

Parameters
rradius
Returns
cylinder reference

◆ radiusTop() [1/2]

float coat.cylinder.radiusTop ( self)

get the top radius.

Returns
radius value

◆ radiusTop() [2/2]

cylinder coat.cylinder.radiusTop ( self,
float r )

set the top radius.

Parameters
rradius
Returns
cylinder reference

◆ rings() [1/2]

int coat.cylinder.rings ( self)

get the number of rings in the mesh.

Returns
number of rings.

◆ rings() [2/2]

cylinder coat.cylinder.rings ( self,
int nrings )

set the number of rings in the mesh.

Parameters
nringsnumber of rings.
Returns
cylinder reference

◆ sectorAngle() [1/2]

float coat.cylinder.sectorAngle ( self)

get the sector angle.

Returns
angle value

◆ sectorAngle() [2/2]

cylinder coat.cylinder.sectorAngle ( self,
float angle )

set the angle for cylinder with sector.

Parameters
anglethe sector angle
Returns
cylinder reference

◆ slices() [1/2]

int coat.cylinder.slices ( self)

get the number of slices in the mesh.

Returns
number of slices.

◆ slices() [2/2]

cylinder coat.cylinder.slices ( self,
int nslices )

set the number of slices in the mesh.

Parameters
nslicesnumber of slices.
Returns
cylinder reference

◆ topCapScale() [1/2]

float coat.cylinder.topCapScale ( self)

get the top cap scale.

Returns
the scale value

◆ topCapScale() [2/2]

cylinder coat.cylinder.topCapScale ( self,
float scale )

set the top cap scale.

Parameters
scalethe scale value
Returns
cylinder reference

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