MistyLaraCarrara opened this issue on Mar 06, 2014 · 55 posts
bagginsbill posted Thu, 10 April 2014 at 8:21 PM
I don't want to post the entire BB "geomatic" geometry library, as it is 1) a lot of code and 2) intellectual property I wish to exploit some day.
However, if you're just curious to see how I go about the specifics of a prop like this, here it is:
def ICLeakTester(morph = None):
morphs = [
('Thickness', 0),
('Width', 0),
('Depth', 0),
('Height', 0),
('Extra Floor', 1),
('Explode', 1),
]
if morph == '?':
return morphs
th = .0001 * inch
w = 8 * feet
h = 8 * feet
d = 8 * feet
if morph == 'Width':
w = 9 * feet
if morph == 'Height':
h = 9 * feet
if morph == 'Depth':
d = 9 * feet
if morph == 'Thickness':
th = 2 * inch
xpl = 1 * inch if morph == 'Explode' else 0
mpl = PolyList()
def slab(w, h, th):
pl = PolyList()
qb = QuadBuilder(0, w, 0, h, 0)
pl << qb.quad().flip() << qb.extrude(0, 0, th) << qb.quad()
return pl
back = slab(w, h, th) << Trans(0, xpl, -xpl)
left = slab(d, h, th) << YRot(90) << Trans(-xpl, xpl, d)
right = left >> Trans(w - th + 2 * xpl, 0, 0)
top = slab(w, d, th) << XRot(90) << Trans(0, h + 2 * xpl, 0)
xf = 1 * feet if morph == 'Extra Floor' else 0
bottom = slab(w + 2 * xf, d + 2 * xf, th) << Trans(-xf, -xf, 0) << XRot(90)
mpl << back << left << right << bottom << top
mpl << Trans(-w/2, 0, -d/2)
return mpl
prop = Morphing(ICLeakTester, "ICLeakTester")
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)