Loading TechIDaily…
Loading TechIDaily…
Sandflow / Industrial
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 ↗Parametric Python program with 5 kinematic joints (UsdPhysics). Constructed for autonomous simulation and LLM synthesis.
import sand3d as s3d
import math
def single_group_espresso_machine():
body = body_part()
hf = s3d.local(body, 0, 272, 340)
head = s3d.at(group_head_part(), on=hf)
pf_f = s3d.local(head)
pf = s3d.at(portafilter_part(), on=pf_f)
s3d.joint(
class="tok-string">"group_head_to_portafilter",
pf,
pf_f,
kind=class="tok-string">"revolute",
axis=class="tok-string">"+Z",
range=(-1.05 * 180 / math.pi, 0.12 * 180 / math.pi),
)
sf = s3d.local(body, 279, 244, 440)
wand = s3d.at(steam_wand_part(), on=sf)
s3d.joint(
class="tok-string">"body_to_steam_wand",
wand,
sf,
kind=class="tok-string">"revolute",
axis=class="tok-string">"+Z",
range=(-1.1 * 180 / math.pi, 1.1 * 180 / math.pi),
)
lf = s3d.local(body, -268.5, 185, 360)
left = s3d.at(left_panel_part(), on=lf)
s3d.joint(
class="tok-string">"body_to_left_panel", left, lf, kind=class="tok-string">"revolute", axis=class="tok-string">"-Z", range=(0, 1.3 * 180 / math.pi)
)
rf = s3d.local(body, 268.5, 185, 360)
right = s3d.at(right_panel_part(), on=rf)
s3d.joint(
class="tok-string">"body_to_right_panel", right, rf, kind=class="tok-string">"revolute", axis=class="tok-string">"+Z", range=(0, 1.3 * 180 / math.pi)
)
tf = s3d.local(body, 0, 135, 118)
tray = s3d.at(tray_part(), on=tf)
s3d.joint(class="tok-string">"body_to_tray", tray, tf, kind=class="tok-string">"prismatic", axis=class="tok-string">"+Y", range=(0, 170))
return s3d.assembly(
class="tok-string">"single_group_espresso_machine",
s3d.group(class="tok-string">"body_structure", body, head),
pf,
wand,
left,
right,
tray,
)
def _box(name, dims, pos, mat):
o = s3d.extrude(name, s3d.rect(dims[0], dims[1]), dims[2], both=True)
return s3d.material(s3d.at(o, x=pos[0], y=pos[1], z=pos[2]), mat[0], color=mat[1])
def _cyl(name, r, l, pos, mat, rot=(0, 0, 0)):
o = s3d.extrude(name, s3d.circle(2 * r), l, both=True)
return s3d.material(
s3d.at(o, x=pos[0], y=pos[1], z=pos[2], rx=rot[0], ry=rot[1], rz=rot[2]),
mat[0],
color=mat[1],
)
def body_part():
dark = (class="tok-string">"plastic", class="tok-string">"class="tok-comment">#242629")
steel = (class="tok-string">"steel", class="tok-string">"class="tok-comment">#ccd1d6")
satin = (class="tok-string">"brushed_steel", class="tok-string">"class="tok-comment">#a8b0b8")
p = []
p += [
_box(class="tok-string">"base_block", (480, 180, 160), (0, -110, 80), dark),
_box(class="tok-string">"left_skirt", (50, 360, 200), (-235, 0, 100), dark),
_box(class="tok-string">"right_skirt", (50, 360, 200), (235, 0, 100), dark),
_box(class="tok-string">"rear_cross", (420, 100, 160), (0, -160, 80), dark),
]
p += [
_box(class="tok-string">"left_front_post", (35, 100, 420), (-245, 205, 320), steel),
_box(class="tok-string">"right_front_post", (35, 100, 420), (245, 205, 320), steel),
_box(class="tok-string">"left_rear_post", (35, 100, 380), (-245, -205, 300), steel),
_box(class="tok-string">"right_rear_post", (35, 100, 380), (245, -205, 300), steel),
_box(class="tok-string">"rear_wall", (520, 30, 460), (0, -255, 330), (class="tok-string">"brushed_steel", class="tok-string">"class="tok-comment">#a8b0b8")),
_box(class="tok-string">"top_deck", (520, 440, 16), (0, -20, 592), steel),
_box(class="tok-string">"front_brow", (520, 70, 90), (0, 225, 545), steel),
_box(class="tok-string">"left_fascia", (150, 14, 240), (-155, 230, 420), steel),
_box(class="tok-string">"right_fascia", (150, 14, 240), (155, 230, 420), steel),
_box(class="tok-string">"center_mount_panel", (110, 14, 154), (0, 230, 423), steel),
_box(class="tok-string">"tray_bridge", (520, 50, 80), (0, 215, 215), steel),
]
p += [
_box(class="tok-string">"left_guide", (18, 340, 11), (-170, 45, 110.5), satin),
_box(class="tok-string">"right_guide", (18, 340, 11), (170, 45, 110.5), satin),
_cyl(class="tok-string">"steam_pivot_support", 14, 64, (279, 244, 472), satin),
_box(class="tok-string">"steam_support_block", (70, 20, 50), (244, 220, 430), steel),
]
xy = s3d.spline([(-220, -160), (-220, 150), (220, 150), (220, -160)], closed=True)
rail = s3d.wire(class="tok-string">"cup_rail", xy, 10)
rail = s3d.at(rail, z=645)
p.append(s3d.material(rail, class="tok-string">"brushed_steel", color=class="tok-string">"class="tok-comment">#a8b0b8"))
for i, (x, y) in enumerate([(-220, -160), (-220, 150), (220, 150), (220, -160)]):
p.append(_cyl(fclass="tok-string">"rail_post_{i}", 6, 45, (x, y, 622.5), satin))
return s3d.group(class="tok-string">"body", *p)
def group_head_part():
st = (class="tok-string">"brushed_steel", class="tok-string">"class="tok-comment">#a8b0b8")
ss = (class="tok-string">"steel", class="tok-string">"class="tok-comment">#ccd1d6")
return s3d.group(
class="tok-string">"group_head",
_box(class="tok-string">"mount_block", (120, 50, 70), (0, -10, 55), st),
_cyl(class="tok-string">"nose", 39, 85, (0, 40, 40), st, (90, 0, 0)),
_cyl(class="tok-string">"brew_collar", 31, 16, (0, 0, 8), ss),
)
def portafilter_part():
st = (class="tok-string">"brushed_steel", class="tok-string">"class="tok-comment">#a8b0b8")
br = (class="tok-string">"plastic", class="tok-string">"class="tok-comment">#2b1f17")
bl = (class="tok-string">"plastic", class="tok-string">"class="tok-comment">#141416")
return s3d.group(
class="tok-string">"portafilter",
_cyl(class="tok-string">"lug_ring", 41, 8, (0, 0, -4), st),
_cyl(class="tok-string">"basket", 34, 22, (0, 0, -11), st),
_box(class="tok-string">"neck", (18, 55, 18), (0, 45, -28), st),
_cyl(class="tok-string">"grip", 12, 160, (0, 125, -28), br, (90, 0, 0)),
_cyl(class="tok-string">"end_cap", 15, 22, (0, 205, -28), bl, (90, 0, 0)),
)
def steam_wand_part():
st = (class="tok-string">"brushed_steel", class="tok-string">"class="tok-comment">#a8b0b8")
path = s3d.spline([(0, 0, -24), (-6, 8, -50), (-16, 20, -90), (-29, 38, -160), (-41, 57, -245)])
return s3d.group(
class="tok-string">"steam_wand",
_cyl(class="tok-string">"pivot_collar", 9, 24, (0, 0, -12), st),
s3d.material(s3d.wire(class="tok-string">"steam_wand_tube", path, 9), class="tok-string">"brushed_steel", color=class="tok-string">"class="tok-comment">#a8b0b8"),
_cyl(class="tok-string">"tip", 3.8, 26, (-41, 57, -258), st, (28.65, 6.88, 0)),
)
def left_panel_part():
st = (class="tok-string">"steel", class="tok-string">"class="tok-comment">#ccd1d6")
sa = (class="tok-string">"brushed_steel", class="tok-string">"class="tok-comment">#a8b0b8")
bl = (class="tok-string">"plastic", class="tok-string">"class="tok-comment">#141416")
return s3d.group(
class="tok-string">"left_panel",
_box(class="tok-string">"panel", (12, 390, 340), (0, -195, 0), st),
_box(class="tok-string">"bead", (6, 290, 200), (3, -205, 0), sa),
_cyl(class="tok-string">"pull", 5, 100, (-6, -90, 0), bl),
)
def right_panel_part():
st = (class="tok-string">"steel", class="tok-string">"class="tok-comment">#ccd1d6")
sa = (class="tok-string">"brushed_steel", class="tok-string">"class="tok-comment">#a8b0b8")
bl = (class="tok-string">"plastic", class="tok-string">"class="tok-comment">#141416")
return s3d.group(
class="tok-string">"right_panel",
_box(class="tok-string">"panel", (12, 390, 340), (0, -195, 0), st),
_box(class="tok-string">"bead", (6, 290, 200), (-3, -205, 0), sa),
_cyl(class="tok-string">"pull", 5, 100, (6, -90, 0), bl),
)
def tray_part():
dk = (class="tok-string">"plastic", class="tok-string">"class="tok-comment">#242629")
sa = (class="tok-string">"brushed_steel", class="tok-string">"class="tok-comment">#a8b0b8")
p = [
_box(class="tok-string">"floor", (400, 230, 5), (0, 0, 0), dk),
_box(class="tok-string">"front_wall", (400, 10, 40), (0, 110, 17.5), sa),
_box(class="tok-string">"rear_wall", (400, 10, 26), (0, -110, 10.5), sa),
_box(class="tok-string">"left_wall", (10, 210, 32), (-195, 0, 13.5), sa),
_box(class="tok-string">"right_wall", (10, 210, 32), (195, 0, 13.5), sa),
_box(class="tok-string">"front_lip", (420, 14, 15), (0, 119, 37.5), sa),
s3d.material(
s3d.at(s3d.extrude(class="tok-string">"grate", s3d.rect(384, 212), 2, both=True), z=27.5),
class="tok-string">"plastic",
color=class="tok-string">"class="tok-comment">#141416",
),
]
return s3d.group(class="tok-string">"tray", *p)🚀 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: