Loading TechIDaily…
Loading TechIDaily…
Sandflow / Everyday
Hosted on Hugging Face · Runtime not tested

Categories aid discovery; they are not runtime certifications.
Download the complete package with its dependencies.
Browse package on HF ↗Constructive parametric Python program with declared components, dimensions, and materials.
import sand3d as s3d
def tower():
a = s3d.at(stepped_support(), y=20, z=-30772)
b = s3d.at(lower_frame(), y=-2, z=-30720)
c = s3d.at(middle_platform(), y=-2, z=-30356)
d = s3d.at(side_tray(), y=330, z=-30526)
e = s3d.at(upper_pedestal(), y=-2, z=-30247)
return s3d.assembly(&class="tok-comment">#39;tower39;, a, b, c, d, e)
def stepped_support(w=208, d=122, h=370, t=1.5, rise=47, step=124, lip=39):
base = s3d.box(&class="tok-comment">#39;base_sheet39;, w=w, d=w, h=t)
a = s3d.at(s3d.box(&class="tok-comment">#39;step_sheet39;, w=w, d=d, h=t), z=h-step, y=2)
b = s3d.at(s3d.box(&class="tok-comment">#39;upper_sheet39;, w=w, d=d, h=t), z=h, y=2)
front = s3d.at(s3d.box(&class="tok-comment">#39;downfold39;, w=w, d=t, h=rise), y=2-d/2, z=h-step-rise)
upper = s3d.at(s3d.box(&class="tok-comment">#39;upper_downfold39;, w=w, d=t, h=lip), y=2-d/2, z=h-lip)
side = s3d.at(s3d.box(&class="tok-comment">#39;side_fold39;, w=t, d=d, h=lip), x=(w-t)/2, y=2, z=h-step)
twin = s3d.transform(s3d.copy(side), mirror=&class="tok-comment">#39;x39;)
ob = s3d.group(&class="tok-comment">#39;stepped_support39;, base, a, b, front, upper, side, twin)
s3d.material(ob, &class="tok-comment">#39;painted_metalclass="tok-string">39;, color=39;#ffffff39;)
return ob
def lower_frame(w=346, h=104, foot=284, shoulder=326, top=306, t=1.8):
outer = s3d.loft(&class="tok-comment">#39;outer39;, s3d.station(z=0,w=foot,d=foot,n=8), s3d.station(z=21,w=foot,d=foot,n=8), s3d.station(z=40,w=shoulder,d=shoulder,n=8), s3d.station(z=67,w=w,d=w,n=8), s3d.station(z=94,w=shoulder,d=shoulder,n=8), s3d.station(z=h,w=top,d=top,n=8))
inner = s3d.loft(&class="tok-comment">#39;inside39;, s3d.station(z=-t,w=foot-t*2,d=foot-t*2,n=8), s3d.station(z=21,w=foot-t*2,d=foot-t*2,n=8), s3d.station(z=40,w=shoulder-t*2,d=shoulder-t*2,n=8), s3d.station(z=67,w=w-t*2,d=w-t*2,n=8), s3d.station(z=94,w=shoulder-t*2,d=shoulder-t*2,n=8), s3d.station(z=h+t,w=top-t*2,d=top-t*2,n=8))
ob = s3d.cut(outer, inner)
s3d.material(ob, &class="tok-comment">#39;painted_metalclass="tok-string">39;, color=39;#ffffff39;)
return s3d.group(&class="tok-comment">#39;lower_frame39;, ob)
def middle_platform(w=326, h=64, foot=300, shoulder=280, top=216, t=1.8):
outer = s3d.loft(&class="tok-comment">#39;outer39;, s3d.station(z=0,w=foot,d=foot,n=8), s3d.station(z=20,w=w,d=w,n=8), s3d.station(z=40,w=shoulder,d=shoulder,n=8), s3d.station(z=53,w=top,d=top,n=8), s3d.station(z=h,w=top,d=top,n=8))
inner = s3d.loft(&class="tok-comment">#39;inside39;, s3d.station(z=-t,w=foot-2*t,d=foot-2*t,n=8), s3d.station(z=20,w=w-2*t,d=w-2*t,n=8), s3d.station(z=40,w=shoulder-2*t,d=shoulder-2*t,n=8), s3d.station(z=53,w=top-2*t,d=top-2*t,n=8), s3d.station(z=h+t,w=top-2*t,d=top-2*t,n=8))
ob = s3d.cut(outer, inner)
s3d.material(ob, &class="tok-comment">#39;painted_metalclass="tok-string">39;, color=39;#ffffff39;)
return s3d.group(&class="tok-comment">#39;middle_platform39;, ob)
def side_tray(w=208, d=130, h=124, rim=38, tray_w=187, tray_d=104, tray_h=37, t=1.5):
solid = s3d.shell(s3d.extrude(&class="tok-comment">#39;platformclass="tok-string">39;, s3d.rect(w=w,d=d,r=8), h=rim), t=t, open=39;top39;)
tray = s3d.at(s3d.shell(s3d.box(&class="tok-comment">#39;recessclass="tok-string">39;,w=tray_w,d=tray_d,h=tray_h),t=t,open=39;top39;),y=-3,z=h-tray_h)
s3d.material(solid,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#ffffff39;)
s3d.material(tray,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#a1293539;)
bent_rail_placed = s3d.at(bent_rail(), y=148, z=-21)
return s3d.group(&class="tok-comment">#39;side_tray39;,solid,tray,bent_rail_placed)
def bent_rail(w=208, d=78, h=42, t=2):
rail = s3d.wire(&class="tok-comment">#39;rail39;,path=[(-w/2,-d/2,h/2),(0,-d/2,h),(w/2,-d/2,h/2)],d=t)
hook = s3d.wire(&class="tok-comment">#39;hook39;,path=[(-w/8,d/2,h/3),(0,d/2,0),(w/8,d/2,h/3)],d=t)
s3d.material(rail,&class="tok-comment">#39;brassclass="tok-string">39;,color=39;#b3a56b39;)
s3d.material(hook,&class="tok-comment">#39;brassclass="tok-string">39;,color=39;#b3a56b39;)
return s3d.group(&class="tok-comment">#39;bent_rail39;,rail,hook)
def upper_pedestal(w=121, d=121, h=60, t=1.5):
solid = s3d.shell(s3d.box(&class="tok-comment">#39;pedestalclass="tok-string">39;,w=w,d=d,h=h),t=t,open=39;top39;)
s3d.material(solid,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#ffffff39;)
upper_frame_placed = s3d.at(upper_frame(), z=109.5)
crown_platform_placed = s3d.at(crown_platform(), z=153)
pyramidal_crown_placed = s3d.at(pyramidal_crown(), z=202)
return s3d.group(&class="tok-comment">#39;upper_pedestal39;,solid,upper_frame_placed,crown_platform_placed,pyramidal_crown_placed)
def upper_frame(w=145, d=145, h=1.5, rim=14):
solid = s3d.extrude(&class="tok-comment">#39;frame39;,s3d.rect(w=w,d=d),h=h)
s3d.pocket(solid,s3d.rect(w=w-2*rim,d=d-2*rim),on=solid.face(&class="tok-comment">#39;top39;))
s3d.material(solid,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#ffffff39;)
return s3d.group(&class="tok-comment">#39;upper_frame39;,solid)
def crown_platform(w=116,d=116,h=12,t=1.5):
solid = s3d.shell(s3d.box(&class="tok-comment">#39;crown_trayclass="tok-string">39;,w=w,d=d,h=h),t=t,open=39;top39;)
s3d.material(solid,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#ffffff39;)
return s3d.group(&class="tok-comment">#39;crown_platform39;,solid)
def pyramidal_crown(w=224,h=200,t=1.5, lower_z=15, upper_z=85, lower_span=150, lower_run=42, upper_span=40, upper_run=65, upper_radius=85, corner_span=49, corner_radius=70, peg=21):
low = s3d.extrude(&class="tok-comment">#39;lower_panel39;,s3d.poly([(-lower_span/2,0),(lower_span/2,0),(-lower_span/2,lower_run)]),h=t)
low = s3d.at(low,y=-w/2,z=lower_z,rx=45)
lows = [low]
for angle in (90,180,270):
lows.append(s3d.transform(s3d.copy(low),rz=angle))
high = s3d.extrude(&class="tok-comment">#39;upper_panel39;,s3d.poly([(-upper_span/2,0),(upper_span/2,0),(0,upper_run)]),h=t)
high = s3d.at(high,y=-upper_radius,z=upper_z,rx=45)
highs = [high]
for angle in (90,180,270):
highs.append(s3d.transform(s3d.copy(high),rz=angle))
corner = s3d.extrude(&class="tok-comment">#39;corner_panel39;,s3d.poly([(-corner_span/2,0),(corner_span/2,0),(0,upper_run)]),h=t)
corner = s3d.at(corner,y=-corner_radius,z=upper_z,rx=45)
corner = s3d.transform(corner,rz=45)
corners = [corner]
for angle in (90,180,270):
corners.append(s3d.transform(s3d.copy(corner),rz=angle))
peg_ob = s3d.at(s3d.cylinder(&class="tok-comment">#39;peg39;,d=12,h=t),z=h-peg,rx=90)
ob=s3d.group(&class="tok-comment">#39;pyramidal_crown39;,lows,highs,corners,peg_ob)
s3d.material(ob,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#ffffff39;)
return ob🚀 Sand3D Modeling Engine: Open Interactive Sand3D Explorer Space ↗
Sandflow Sand3D Library; CC-BY-4.0
Hosted on Hugging Face: SZFSPC/techidaily-resourcesba1baf9d89ddf57433d7c47cb461f6d8883067a1
Revision: ba1baf9d89ddf57433d7c47cb461f6d8883067a1
licenseSHA-256:
commercialPermittedSHA-256:
notesSHA-256: