3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
HelloWorld3D.py

Generate the text primitive.

Generate the text primitive

1# Generate the text primitive
2import coat
3name = "Hello world"
4# get to sculpt room
5coat.ui.toRoom("Sculpt")
6# add new volume
7current = coat.Scene.sculptRoot().addChild(name)
8volume = current.Volume()
9# turn to surface
10volume.toSurface()
11# draw the text name with default font name = "Times New Roman",
12# width equals 200 and depth equals 10 and scale 2
13txt = coat.text()
14txt.font(coat.Font())
15txt.string(name)
16txt.width(200)
17txt.depth(10)
18txt.scale(2)
19txt.add(volume)
Definition coat.py:5665
SceneElement sculptRoot()
get the root of all sculpt objects
Definition coat.py:2843
Definition coat.py:5709
toRoom(name=str)
switch to the room
Definition coat.py:3251