This example generates the surface figure that consists of capsule.
This example generates the surface figure that consists of capsule
1
2import coat
3
4class CapsulePrim:
5 def __init__(self):
6 self.Radius = 30
7 self.Height = 200
8
9
10 def ui(self):
11 return [
12 "Radius,[10,100]",
13 "Height,[20,200]"
14 ]
15 def build(self) :
18 volume = current.Volume()
19 volume.toSurface()
21 capsule.height(self.Height)
22 capsule.radiusTop(self.Radius)
23 capsule.radiusBottom(self.Radius)
24 capsule.details(0.5)
25 capsule.add(volume)
26
27
29capsulePrim = CapsulePrim()
30
31if(
coat.dialog().ok().cancel().params(capsulePrim).show() == 1) :
32
33 capsulePrim.build()
34
SceneElement sculptRoot()
get the root of all sculpt objects
Definition coat.py:2687
toRoom(str name, bool Force=False)
switch to the room
Definition coat.py:3284