3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
coat.Curve Class Reference
Inheritance diagram for coat.Curve:
coat.SceneElement

Public Member Functions

 __init__ (self)
 
 __init__ (self)
 
 __init__ (self, any ob)
 
 __init__ (self, SceneElement el)
 
Curve __assign__ (self, SceneElement el)
 
int pointsCount (self)
 get the base points cout in the curve
 
any point (self, int idx)
 get the base point pointer
 
 removePoints (self, int index, int count)
 remove the points out of the curve base points list
 
any curve (self)
 get the low-level ObjeCurveObject pointer
 
int renderPointsCount (self)
 returns the visual points count.
 
any renderPoint (self, int idx)
 returns the visual point reference
 
 updatePoints (self)
 update the visual points if need.
 
bool closed (self)
 returns the reference to the closed state of the curve to get or set the value
 
 add (self, vec3 p, vec3 normal, float Radius)
 add the point to the curve without the direct options the tangents
 
 addSharp (self, vec3 p, vec3 normal, float Radius)
 add the sharp point to the curve
 
 addSmooth (self, vec3 p, vec3 normal, float Radius)
 add the smooth B-spline-like point to the curve
 
 addBothTangents (self, vec3 p, vec3 normal, vec3 inTangent, vec3 outTangent, float Radius)
 add the point with two independent tangents.
 
 addWithTangent (self, vec3 p, vec3 normal, vec3 inOutTangent, float Radius)
 add the point with the opposite tangents
 
 tubeToMesh (self, Mesh mesh, bool hemisphere)
 create the solid tube around the curve using the points radius
 
list getPoint (self, int idx)
 get the point of the curve
 
 setPointPosition (self, int idx, vec3 p)
 set the point position
 
 setPointNormal (self, int idx, vec3 n)
 set the point normal
 
 setPointTangents (self, int idx, vec3 t1, vec3 t2)
 set the point tangents
 
 setPointRadius (self, int idx, float r)
 set the point radius
 
bool isOpen (self)
 check if the curve is open
 
 setOpen (self)
 set the curve to be open
 
 setClosed (self)
 set the curve to be closed
 
 unselectPoints (self)
 unselect all curve points
 
 selectPoint (self, int idx)
 select the curve point
 
 fill (self, Mesh mesh, float thickness, float relax_count=0, float details_level=1, float extrusion=0)
 Create the curved surface around the curve.
 
- Public Member Functions inherited from coat.SceneElement
bool __eq__ (self, SceneElement other)
 
bool __ne__ (self, SceneElement other)
 
SceneElement parent (self)
 get the parent scene graph element
 
int childCount (self)
 returns the child elements count
 
SceneElement child (self, int index)
 returns child element by index
 
bool isSculptObject (self)
 Check if it is the sculpt object.
 
bool isCurve (self)
 Check if the element is curve.
 
SceneElement setTransform (self, mat4 Transform)
 Set the transform matrix.
 
SceneElement transform (self, mat4 Transform)
 Additional transform over the object.
 
SceneElement density (self, float density_value)
 this command useful if you use voxels, it sets the scale for the volume so that there will be density_value of voxels per mm
 
SceneElement transform_single (self, mat4 Transform)
 Additional transform over the object, not applied to child objects.
 
mat4 getTransform (self)
 get the scene element transform
 
SceneElement clear (self)
 Clear the element content.
 
str name (self)
 get the element name
 
str getLinkedPath (self, int id)
 get the linked file path
 
int linkedObjectCount (self)
 get the linked file path
 
 addLinkedPath (self, str path)
 set the linked file path
 
SceneElement rename (self, str name)
 rename the element
 
SceneElement addChild (self, str name)
 add the child element of the same nature
 
SceneElement findInSubtree (self, str name)
 find the element in subtree by name
 
bool iterateSubtree (self, any fn)
 iterate over the subtree
 
bool iterateVisibleSubtree (self, any fn)
 iterate over the visible subtree
 
 mergeSubtree (self, bool booleanMerge=False)
 merge all subtree volumes into this
 
 mergeTo (self, SceneElement dest, BoolOpType op)
 merge the volume to another one, delete this volume
 
 copyMergeTo (self, SceneElement dest, BoolOpType op)
 copy and merge the volume to another one, delete this volume
 
 removeSubtree (self)
 remove the whole subtree
 
 removeSubtreeItem (self, int index)
 remove one child from the subtree
 
 remove (self)
 remove this item and all child objects from the scene
 
SceneElement duplicate (self)
 diplicate the item
 
SceneElement duplicateAsInstance (self)
 create the instance of the object if instancing supported
 
 changeParent (self, SceneElement newParent)
 change the parent element for the current one
 
bool isParentOf (self, SceneElement child)
 check if the element is parent of another one
 
bool visible (self)
 returns own visibility state reference.
 
 setVisibility (self, bool visible)
 set the visibility of the element
 
bool ghost (self)
 returs the state of ghosting (if available)
 
 setGhost (self, bool ghost)
 sets the ghosting state (if available)
 
vec4 getReferenceColor (self)
 get the reference color for the element
 
 setReferenceColor (self, vec4 color)
 set the reference color for the element
 
Volume Volume (self)
 returns the volume object to operate over voxels or surface
 
 select (self)
 add the object to selected
 
 selectOne (self)
 unselect all similar elements and select this one
 
 unselectAll (self)
 unselect all similar objects
 
bool selected (self)
 Check if the scene element is selected.
 
list collectSelected (self)
 Collect the selected elements in the subtree (including this element if selected)
 

Constructor & Destructor Documentation

◆ __init__() [1/4]

coat.Curve.__init__ ( self)

Reimplemented from coat.SceneElement.

◆ __init__() [2/4]

coat.Curve.__init__ ( self)

Reimplemented from coat.SceneElement.

◆ __init__() [3/4]

coat.Curve.__init__ ( self,
any ob )

Reimplemented from coat.SceneElement.

◆ __init__() [4/4]

coat.Curve.__init__ ( self,
SceneElement el )

Reimplemented from coat.SceneElement.

Member Function Documentation

◆ __assign__()

Curve coat.Curve.__assign__ ( self,
SceneElement el )

◆ add()

coat.Curve.add ( self,
vec3 p,
vec3 normal,
float Radius )

add the point to the curve without the direct options the tangents

Parameters
pthe point in space
normalthe normal to the point
Radiusthe point radius

◆ addBothTangents()

coat.Curve.addBothTangents ( self,
vec3 p,
vec3 normal,
vec3 inTangent,
vec3 outTangent,
float Radius )

add the point with two independent tangents.

Parameters
pthe position
normalthe normal
inTangentinput tangent, it is usually approximately directed from the current to the previous point
outTangentoutput tangent, it is usually approximately directed from the current to the next point
Radiusthe radius

◆ addSharp()

coat.Curve.addSharp ( self,
vec3 p,
vec3 normal,
float Radius )

add the sharp point to the curve

Parameters
pthe point in space
normalthe normal to the point
Radiusthe point radius

◆ addSmooth()

coat.Curve.addSmooth ( self,
vec3 p,
vec3 normal,
float Radius )

add the smooth B-spline-like point to the curve

Parameters
pthe position
normalthe normal
Radiusthe radius

◆ addWithTangent()

coat.Curve.addWithTangent ( self,
vec3 p,
vec3 normal,
vec3 inOutTangent,
float Radius )

add the point with the opposite tangents

Parameters
pthe position
normalthe normal
inOutTangentthe tangent, it is usually approximately directed from the current to the next point
Radiusthe radius

◆ closed()

bool coat.Curve.closed ( self)

returns the reference to the closed state of the curve to get or set the value

Returns
the reference

◆ curve()

any coat.Curve.curve ( self)

get the low-level ObjeCurveObject pointer

Returns
the OneCurveObject pointer

◆ fill()

coat.Curve.fill ( self,
Mesh mesh,
float thickness,
float relax_count = 0,
float details_level = 1,
float extrusion = 0 )

Create the curved surface around the curve.

Parameters
meshthe resulting mesh
thicknessthe thickness of the object
relax_countthe relaxation degree
details_levelthe details levels
extrusionthe additional extrusion

◆ getPoint()

list coat.Curve.getPoint ( self,
int idx )

get the point of the curve

Parameters
idxthe point index
Returns
the point as tuple (position, normal, tangent1, tangent2, radius)

◆ isOpen()

bool coat.Curve.isOpen ( self)

check if the curve is open

◆ point()

any coat.Curve.point ( self,
int idx )

get the base point pointer

Parameters
idxthe index in the points array
Returns
the pointer to the point if it is in range, nullptr othervice

◆ pointsCount()

int coat.Curve.pointsCount ( self)

get the base points cout in the curve

Returns
the points count

◆ removePoints()

coat.Curve.removePoints ( self,
int index,
int count )

remove the points out of the curve base points list

Parameters
indexthe start point index
countpoints count to remove

◆ renderPoint()

any coat.Curve.renderPoint ( self,
int idx )

returns the visual point reference

Parameters
idxthe point index
Returns
the pointer to the point if it is in range, nullptr othervice

◆ renderPointsCount()

int coat.Curve.renderPointsCount ( self)

returns the visual points count.

Visual points used to render the curve in the viewport as set of straight lines.

Returns
the count

◆ selectPoint()

coat.Curve.selectPoint ( self,
int idx )

select the curve point

Parameters
idxthe point index

◆ setClosed()

coat.Curve.setClosed ( self)

set the curve to be closed

◆ setOpen()

coat.Curve.setOpen ( self)

set the curve to be open

◆ setPointNormal()

coat.Curve.setPointNormal ( self,
int idx,
vec3 n )

set the point normal

Parameters
idxthe point index
nthe normal

◆ setPointPosition()

coat.Curve.setPointPosition ( self,
int idx,
vec3 p )

set the point position

Parameters
idxthe point index
pthe position

◆ setPointRadius()

coat.Curve.setPointRadius ( self,
int idx,
float r )

set the point radius

Parameters
idxthe point index
rthe radius

◆ setPointTangents()

coat.Curve.setPointTangents ( self,
int idx,
vec3 t1,
vec3 t2 )

set the point tangents

Parameters
idxthe point index
t1the first tangent
t2the second tangent

◆ tubeToMesh()

coat.Curve.tubeToMesh ( self,
Mesh mesh,
bool hemisphere )

create the solid tube around the curve using the points radius

Parameters
meshthis mesh will be created as the result of the operation
hemisphereset true if need the ends of the rode to be hemispheres

◆ unselectPoints()

coat.Curve.unselectPoints ( self)

unselect all curve points

◆ updatePoints()

coat.Curve.updatePoints ( self)

update the visual points if need.

Use this function if you cahnge the curve. Change the multiple parameters and then call this function if you need visual points. Othervice they will be updated automatically later.


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