Hello Bruce,
I understand that a compound object is a class itself, the problem is that it doesn't inherit the specific properties I used to create the frustum (i.e. top radius and base radius).
Each frustum I create needs to have a unique base and top radius. A compound object as pos, size, axis, color etc. and I see how to translate and rotate using pos and axis attributes. Size seems like it will scale the overall object evenly across x,y, and z which I think means I can't specify a different base and top radius using inherent attributes of the compound object.
I thought maybe aligning the compound object along the x-axis, then changing the size using size = vec (50,1,1) would lengthen the object and scale it evenly in the y-z dimension to 1, however it does't seem to do anything to blue object in the code below.
To change the size of the base and top radius independently do I need to make a frustum class with base and top radius attributes before using the clone command?
Code example below:
bP and tP are lists of vectors for top positions and base positions, bR and tR are a list of base and top radii
full working code attached.
testFrust = frustum(basePos = bP[0], topPos = tP[0], baseR = bR[0], topR = tR[0], color = color, visible = False)
testFrust1 = testFrust.clone(pos = bP[0], axis = tP[0]-bP[0], color = color.red, visible = True) #make first frustum
testFrust2 = testFrust.clone(pos = bP[1], axis = tP[1]-bP[1], color = color.yellow, visible = True) #test translation and rotation
testFrust2 = testFrust.clone(pos = bP[2], axis = tP[2]-bP[2], size = vec(50,1,1), color = color.blue, visible = True) #test scaling (not working as expected, shifts but size is the same)
Thank you,
Russell