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 4 kinematic joints (UsdPhysics). Constructed for autonomous simulation and LLM synthesis.
import sand3d as s3d
def flipper_ring_fidget():
body = ring_body()
f = s3d.local(body, 0, 9.2, 3.4)
north = s3d.at(north_tab(), on=f)
s3d.joint(class="tok-string">"ring_to_north_tab", north, f, kind=class="tok-string">"revolute", axis=class="tok-string">"+X", range=(0, 77.349))
f = s3d.local(body, 0, -9.2, 3.4)
south = s3d.at(south_tab(), on=f)
s3d.joint(class="tok-string">"ring_to_south_tab", south, f, kind=class="tok-string">"revolute", axis=class="tok-string">"-X", range=(0, 77.349))
f = s3d.local(body, 11.2, 0, 3.4)
east = s3d.at(east_tab(), on=f)
s3d.joint(class="tok-string">"ring_to_east_tab", east, f, kind=class="tok-string">"revolute", axis=class="tok-string">"-Y", range=(0, 77.349))
f = s3d.local(body, -11.2, 0, 3.4)
west = s3d.at(west_tab(), on=f)
s3d.joint(class="tok-string">"ring_to_west_tab", west, f, kind=class="tok-string">"revolute", axis=class="tok-string">"+Y", range=(0, 77.349))
return s3d.assembly(class="tok-string">"flipper_ring_fidget", body, north, south, east, west)
def ring_body():
shell = s3d.extrude(class="tok-string">"ring_shell", s3d.superellipse(38, 30, n=2.35), 4.8, both=True)
parts = [s3d.material(shell, class="tok-string">"steel", color=class="tok-string">"class="tok-comment">#30363d")]
for prefix, coord, axis in [
(class="tok-string">"north_hinge", 9.2, class="tok-string">"x"),
(class="tok-string">"south_hinge", -9.2, class="tok-string">"x"),
(class="tok-string">"east_hinge", 11.2, class="tok-string">"y"),
(class="tok-string">"west_hinge", -11.2, class="tok-string">"y"),
]:
if axis == class="tok-string">"x":
for side, sgn in [(class="tok-string">"left", -1), (class="tok-string">"right", 1)]:
x = sgn * 4.1
parts += [
s3d.material(
s3d.at(
s3d.extrude(
prefix + class="tok-string">"_" + side + class="tok-string">"_pad", s3d.rect(4.2, 2.2), 1.8, both=True
),
x=x,
y=coord,
z=3.0,
),
class="tok-string">"steel",
color=class="tok-string">"class="tok-comment">#30363d",
),
s3d.material(
s3d.at(
s3d.extrude(
prefix + class="tok-string">"_" + side + class="tok-string">"_lug", s3d.circle(2), 3.6, both=True
),
x=x,
y=coord,
z=3.4,
ry=90,
),
class="tok-string">"steel",
color=class="tok-string">"class="tok-comment">#30363d",
),
]
else:
for side, sgn in [(class="tok-string">"lower", -1), (class="tok-string">"upper", 1)]:
y = sgn * 4.1
parts += [
s3d.material(
s3d.at(
s3d.extrude(
prefix + class="tok-string">"_" + side + class="tok-string">"_pad", s3d.rect(2.2, 4.2), 1.8, both=True
),
x=coord,
y=y,
z=3.0,
),
class="tok-string">"steel",
color=class="tok-string">"class="tok-comment">#30363d",
),
s3d.material(
s3d.at(
s3d.extrude(
prefix + class="tok-string">"_" + side + class="tok-string">"_lug", s3d.circle(2), 3.6, both=True
),
x=coord,
y=y,
z=3.4,
rx=90,
),
class="tok-string">"steel",
color=class="tok-string">"class="tok-comment">#30363d",
),
]
return s3d.group(class="tok-string">"ring_body", *parts)
def north_tab():
return tab(class="tok-string">"north_tab", class="tok-string">"y", 1)
def south_tab():
return tab(class="tok-string">"south_tab", class="tok-string">"y", -1)
def east_tab():
return tab(class="tok-string">"east_tab", class="tok-string">"x", 1)
def west_tab():
return tab(class="tok-string">"west_tab", class="tok-string">"x", -1)
def tab(name, axis, sign):
barrel = s3d.material(
s3d.at(
s3d.extrude(class="tok-string">"barrel", s3d.circle(2), 4.6, both=True),
ry=90 if axis == class="tok-string">"y" else 0,
rx=0 if axis == class="tok-string">"y" else 90,
),
class="tok-string">"steel",
color=class="tok-string">"class="tok-comment">#c5cacf",
)
if axis == class="tok-string">"y":
plate = s3d.at(
s3d.extrude(class="tok-string">"paddle", s3d.rect(6.4, 5, r=1.15), 1.8, both=True), y=sign * 3.3, z=-0.1
)
rib = s3d.at(
s3d.extrude(class="tok-string">"grip_rib", s3d.rect(4.608, 0.8), 0.6, both=True), y=sign * 5.04, z=0.62
)
else:
plate = s3d.at(
s3d.extrude(class="tok-string">"paddle", s3d.rect(5, 6.4, r=1.15), 1.8, both=True), x=sign * 3.3, z=-0.1
)
rib = s3d.at(
s3d.extrude(class="tok-string">"grip_rib", s3d.rect(0.8, 4.608), 0.6, both=True), x=sign * 5.04, z=0.62
)
return s3d.group(
name,
barrel,
s3d.material(plate, class="tok-string">"aluminium", color=class="tok-string">"class="tok-comment">#c5cacf"),
s3d.material(rib, class="tok-string">"aluminium", color=class="tok-string">"class="tok-comment">#c5cacf"),
)🚀 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: