3DCoat Python API
The 3DCoat Python API documentation.
|
Public Member Functions | |
__init__ (self) | |
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). | |
Static Public Member Functions | |
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 | |
coat.prim.__init__ | ( | self | ) |
Reimplemented in coat.bolt, coat.boltHead, coat.box, coat.box, coat.box, coat.box, coat.box, coat.capsule, coat.capsule, coat.capsule, coat.cone, coat.cone, coat.cone, coat.cylinder, coat.cylinder, coat.cylinder, coat.ellipse, coat.ellipse, coat.ellipse, coat.ellipse, coat.freeform, coat.freeform, coat.freeform, coat.gear, coat.gear, coat.gear, coat.gear, coat.image, coat.lathe, coat.lathe, coat.ngon, coat.ngon, coat.ngon, coat.ngon, coat.nut, coat.nut, coat.screw, coat.sphere, coat.sphere, coat.sphere, coat.spiral, coat.spiral, coat.text, coat.text, coat.thread, coat.threadStud, coat.torus, coat.torus, coat.torus, coat.tube, coat.tube, coat.tube, coat.tube, coat.tube, coat.tube, and coat.washer.
coat.prim.add | ( | self, | |
Volume | v ) |
add the prim into scene
v | the scene volume reference |
prim coat.prim.auto_divide | ( | self, | |
float | average_div ) |
set the auto devide
average_div | the average divide factor |
any coat.prim.class_name | ( | self | ) |
get the primitive class name.
prim coat.prim.color | ( | self, | |
float | r, | ||
float | g, | ||
float | b ) |
assign the color to the primitive (in voxels)
r | red value 0..255 |
g | green value 0..255 |
b | blue value 0..255 |
prim coat.prim.color | ( | self, | |
float | r, | ||
float | g, | ||
float | b, | ||
float | a ) |
assign the color to the primitive (in voxels)
r | red value 0..255 |
g | green value 0..255 |
b | blue value 0..255 |
a | alpha value 0..255 |
prim coat.prim.color | ( | self, | |
int | CL ) |
assign the color to the primitive (in voxels)
CL | color in hexadecimal form 0xAARRGGBB |
prim coat.prim.color | ( | self, | |
str | colorid ) |
assign the color to the primitive (in voxels)
colorid | the color in any suitable form: "RGB", "ARGB", "RRGGBB", "AARRGGBB", "#RGB", "#ARGB", "#RRGGBB", "#AARRGGBB", any web-color common name as "red", "green", "purple", google "webcolors" |
|
static |
clear the debug info for primitive operations
|
static |
indicates whether to turn on or off the debug mode.
isOn | if this parameter is true, the debug mode is on, otherwise the debug mode is off. |
float coat.prim.details | ( | self | ) |
get the detail level
prim coat.prim.details | ( | self, | |
float | det_level ) |
set the detail level
prim coat.prim.fillet | ( | self, | |
float | radius ) |
set the fillet
radius | the fillet radius |
float coat.prim.fillet_relative | ( | self | ) |
calculates a fillet relative value (0..1).
Reimplemented in coat.box, coat.cone, coat.cylinder, coat.ngon, and coat.tube.
prim coat.prim.gloss | ( | self, | |
float | value ) |
assign the gloss for the voxel primitive, it will work only if the color already assigned
value | the [0..1] value of the gloss |
coat.prim.intersect | ( | self, | |
Volume | v ) |
intersect the prim into scene
v | the scene volume reference |
coat.prim.merge | ( | self, | |
Volume | v, | ||
BoolOpType | op ) |
merge the prim into scene
v | the scene volume reference |
op | the type of the merge |
Mesh coat.prim.mesh | ( | self | ) |
get the mesh prim
prim coat.prim.metal | ( | self, | |
float | value ) |
the metalliclty value for the voxel primitive, it will work only if the color already assigned
value | the [0..1] metal value |
any coat.prim.name | ( | self | ) |
get the primitive object name.
prim coat.prim.name | ( | self, | |
str | s ) |
set the primitive object name.
s | the object name |
prim coat.prim.opacity | ( | self, | |
float | value ) |
assign the opacity of the color over the voxel primitive.
The color should be assigned before you assign the opacity, for example p.color("red").opacity(0.5)
value | the opacity value [0..1] |
|
static |
set the detail level to all primitives
Not implemented yet
details_modulator | datail level |
|
static |
Set the scale to all primitives.
Not implemented yet
scale | the new scale factor |
|
static |
Set the scale to all primitives.
Not implemented yet
|
static |
set the global transform matrix to all primitives
t | the matrix |
|
static |
Set the translation to all primitives.
Not implemented yet
d | the new position of the primitives |
|
static |
reset the global transform matrix
Not implemented yet
prim coat.prim.roughness | ( | self, | |
float | value ) |
assign the roughness for the voxel primitive, it will work only if the color already assigned
value | the [0..1] value of the roughness |
vec3 coat.prim.scale | ( | self | ) |
get the scale
prim coat.prim.scale | ( | self, | |
float | scale ) |
set the scale
scale | the scale factor |
set the scale
v | the scale vector |
prim coat.prim.step_divide | ( | self, | |
float | step ) |
set the step devide
step | the step divide factor |
coat.prim.subtract | ( | self, | |
Volume | v ) |
subtract the prim from scene
v | the scene volume reference |
mat4 coat.prim.transform | ( | self | ) |
get the transform matrix
set the transform matrix
t | the matrix |
vec3 coat.prim.translate | ( | self | ) |
get the primitive translation
prim coat.prim.translate | ( | self, | |
float | x, | ||
float | y, | ||
float | z ) |
Set the primitive translation.
x | the new x primitive position |
y | the new y primitive position |
z | the new z primitive position |
Set the primitive translation.
_pos | the new primitive position |
prim coat.prim.x | ( | self, | |
float | x ) |
shift the primitive along the x - axis
x | the x value |
prim coat.prim.y | ( | self, | |
float | y ) |
shift the primitive along the y - axis
y | the y value |
prim coat.prim.z | ( | self, | |
float | z ) |
shift the primitive along the z - axis
z | the z value |