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

Public Member Functions

 __init__ (self)
 
 __init__ (self, float radius)
 
 __init__ (self, vec3 pos, float radius)
 
sphere radius (self, float r)
 set the radius of the sphere.
 
float radius (self)
 get the radius of the sphere.
 
sphere diameter (self, float d)
 set the diameter of the sphere.
 
float diameter (self)
 get the diameter of the sphere.
 
sphere sub_division (self, int subdiv)
 set the degree for subdivision in the mesh.
 
int sub_division (self)
 get the degree of subdivision triangular or cubic division of the sphere.
 
sphere sub_div_mode (self, any divmode)
 set the division mode for the mesh.
 
any sub_div_mode (self)
 get the division mode for the mesh.
 
sphere rings (self, int _rings)
 set the number of rings in the mesh.
 
int rings (self)
 get the number of rings in the mesh.
 
sphere slices (self, int _slices)
 set the number of slices in the mesh.
 
int slices (self)
 get the number of slices in the mesh.
 
sphere sector_on (self, bool _switch)
 set the flag to create a portion of sphere.
 
bool sector_on (self)
 get the flag of creating a portion of sphere.
 
sphere slice_from (self, float angle)
 When sector is on, specifies the angle where the sphere slice begins.
 
float slice_from (self)
 get the angle where the sphere slice begins.
 
sphere slice_to (self, float angle)
 When sector is on, specifies the angle where the sphere slice ends.
 
float slice_to (self)
 get the angle where the sphere slice ends.
 
sphere ring_from (self, float angle)
 When sector is on, specifies the angle where the sphere ring begins.
 
float ring_from (self)
 get the angle where the sphere ring begins.
 
sphere ring_to (self, float angle)
 When sector is on, specifies the angle where the sphere ring ends.
 
float ring_to (self)
 get the angle where the sphere ring ends.
 
- 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
 
float fillet_relative (self)
 calculates a fillet relative value (0..1).
 

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.sphere.__init__ ( self)

Reimplemented from coat.prim.

Reimplemented in coat.ellipse, coat.ellipse, coat.ellipse, and coat.ellipse.

◆ __init__() [2/3]

coat.sphere.__init__ ( self,
float radius )

Reimplemented from coat.prim.

Reimplemented in coat.ellipse, coat.ellipse, coat.ellipse, and coat.ellipse.

◆ __init__() [3/3]

coat.sphere.__init__ ( self,
vec3 pos,
float radius )

Reimplemented from coat.prim.

Reimplemented in coat.ellipse, coat.ellipse, coat.ellipse, and coat.ellipse.

Member Function Documentation

◆ diameter() [1/2]

float coat.sphere.diameter ( self)

get the diameter of the sphere.

Returns
diameter value

◆ diameter() [2/2]

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

set the diameter of the sphere.

Parameters
ddiameter.
Returns
sphere reference

◆ radius() [1/2]

float coat.sphere.radius ( self)

get the radius of the sphere.

Returns
radius value

◆ radius() [2/2]

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

set the radius of the sphere.

Parameters
rradius.
Returns
sphere reference

◆ ring_from() [1/2]

float coat.sphere.ring_from ( self)

get the angle where the sphere ring begins.

Returns
the ring begin angle

◆ ring_from() [2/2]

sphere coat.sphere.ring_from ( self,
float angle )

When sector is on, specifies the angle where the sphere ring begins.

Parameters
anglethe angle for sphere ring begin
Returns
sphere reference

◆ ring_to() [1/2]

float coat.sphere.ring_to ( self)

get the angle where the sphere ring ends.

Returns
the ring end angle

◆ ring_to() [2/2]

sphere coat.sphere.ring_to ( self,
float angle )

When sector is on, specifies the angle where the sphere ring ends.

Parameters
anglethe angle for sphere ring end
Returns
sphere reference

◆ rings() [1/2]

int coat.sphere.rings ( self)

get the number of rings in the mesh.

Returns
number of rings

◆ rings() [2/2]

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

set the number of rings in the mesh.

Parameters
_ringsnumber of rings.
Returns
sphere reference

◆ sector_on() [1/2]

bool coat.sphere.sector_on ( self)

get the flag of creating a portion of sphere.

Default = false.

Returns
the sector switch

◆ sector_on() [2/2]

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

set the flag to create a portion of sphere.

Parameters
_switchthe boolean true/false value
Returns
sphere reference

◆ slice_from() [1/2]

float coat.sphere.slice_from ( self)

get the angle where the sphere slice begins.

Returns
the slice begin angle

◆ slice_from() [2/2]

sphere coat.sphere.slice_from ( self,
float angle )

When sector is on, specifies the angle where the sphere slice begins.

Parameters
anglethe angle for sphere slice begin
Returns
sphere reference

◆ slice_to() [1/2]

float coat.sphere.slice_to ( self)

get the angle where the sphere slice ends.

Returns
the slice end angle

◆ slice_to() [2/2]

sphere coat.sphere.slice_to ( self,
float angle )

When sector is on, specifies the angle where the sphere slice ends.

Parameters
anglethe angle for sphere slice end
Returns
sphere reference

◆ slices() [1/2]

int coat.sphere.slices ( self)

get the number of slices in the mesh.

Returns
number of slices

◆ slices() [2/2]

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

set the number of slices in the mesh.

Parameters
_slicesnumber of slices.
Returns
sphere reference

◆ sub_div_mode() [1/2]

any coat.sphere.sub_div_mode ( self)

get the division mode for the mesh.

Returns
mode of the mesh division

◆ sub_div_mode() [2/2]

sphere coat.sphere.sub_div_mode ( self,
any divmode )

set the division mode for the mesh.

Parameters
divmodemode of the mesh division.
Returns
sphere reference

◆ sub_division() [1/2]

int coat.sphere.sub_division ( self)

get the degree of subdivision triangular or cubic division of the sphere.

Returns
subdivision degree.

◆ sub_division() [2/2]

sphere coat.sphere.sub_division ( self,
int subdiv )

set the degree for subdivision in the mesh.

Parameters
subdivsubdivision.
Returns
sphere reference

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