Copy assets into objects/
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +40 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00001/renders/isometric.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00001/renders/side.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00001/renders/top.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00001/static.py +199 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/articulation.blend +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/articulation.json +0 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/meta.json +16 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/object.glb +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/object.urdf +26 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/object.usdz +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/parts/scale_body.glb +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/parts/thumb_slider.glb +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/renders/front.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/renders/isometric.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/renders/side.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/renders/top.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00002/static.py +136 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/articulation.blend +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/articulation.json +0 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/meta.json +14 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/object.glb +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/object.urdf +56 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/object.usdz +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/parts/left_button.glb +0 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/parts/middle_button.glb +0 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/parts/right_button.glb +0 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/parts/scale_fixed.glb +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/renders/front.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/renders/isometric.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/renders/side.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/renders/top.png +3 -0
- objects/ml_electronic_bathroom_scale-69cdc204a1--00004/static.py +182 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/articulation.blend +3 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/articulation.json +0 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/meta.json +15 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/object.glb +3 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/object.urdf +41 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/object.usdz +3 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/parts/adjustment_dial.glb +3 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/parts/clock_body.glb +3 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/parts/snooze.glb +0 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/renders/front.png +3 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/renders/isometric.png +3 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/renders/side.png +3 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/renders/top.png +3 -0
- objects/ml_household_alarm_clock-4d013fe6e3--00001/static.py +222 -0
- objects/ml_indoor_thermohygrometer-ea60477935--00001/articulation.blend +3 -0
- objects/ml_indoor_thermohygrometer-ea60477935--00001/articulation.json +0 -0
- objects/ml_indoor_thermohygrometer-ea60477935--00001/meta.json +14 -0
.gitattributes
CHANGED
|
@@ -16603,3 +16603,43 @@ objects/ml_electronic_bathroom_scale-69cdc204a1--00001/articulation.blend filter
|
|
| 16603 |
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/object.glb filter=lfs diff=lfs merge=lfs -text
|
| 16604 |
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/object.usdz filter=lfs diff=lfs merge=lfs -text
|
| 16605 |
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/parts/fixed_scale.glb filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16603 |
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/object.glb filter=lfs diff=lfs merge=lfs -text
|
| 16604 |
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/object.usdz filter=lfs diff=lfs merge=lfs -text
|
| 16605 |
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/parts/fixed_scale.glb filter=lfs diff=lfs merge=lfs -text
|
| 16606 |
+
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/articulation.blend filter=lfs diff=lfs merge=lfs -text
|
| 16607 |
+
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/object.glb filter=lfs diff=lfs merge=lfs -text
|
| 16608 |
+
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/object.usdz filter=lfs diff=lfs merge=lfs -text
|
| 16609 |
+
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/parts/scale_body.glb filter=lfs diff=lfs merge=lfs -text
|
| 16610 |
+
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/parts/thumb_slider.glb filter=lfs diff=lfs merge=lfs -text
|
| 16611 |
+
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/articulation.blend filter=lfs diff=lfs merge=lfs -text
|
| 16612 |
+
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/object.glb filter=lfs diff=lfs merge=lfs -text
|
| 16613 |
+
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/object.usdz filter=lfs diff=lfs merge=lfs -text
|
| 16614 |
+
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/parts/scale_fixed.glb filter=lfs diff=lfs merge=lfs -text
|
| 16615 |
+
objects/ml_household_alarm_clock-4d013fe6e3--00001/articulation.blend filter=lfs diff=lfs merge=lfs -text
|
| 16616 |
+
objects/ml_household_alarm_clock-4d013fe6e3--00001/object.glb filter=lfs diff=lfs merge=lfs -text
|
| 16617 |
+
objects/ml_household_alarm_clock-4d013fe6e3--00001/object.usdz filter=lfs diff=lfs merge=lfs -text
|
| 16618 |
+
objects/ml_household_alarm_clock-4d013fe6e3--00001/parts/adjustment_dial.glb filter=lfs diff=lfs merge=lfs -text
|
| 16619 |
+
objects/ml_household_alarm_clock-4d013fe6e3--00001/parts/clock_body.glb filter=lfs diff=lfs merge=lfs -text
|
| 16620 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00001/articulation.blend filter=lfs diff=lfs merge=lfs -text
|
| 16621 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00001/object.glb filter=lfs diff=lfs merge=lfs -text
|
| 16622 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00001/object.usdz filter=lfs diff=lfs merge=lfs -text
|
| 16623 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00001/parts/fixed_instrument.glb filter=lfs diff=lfs merge=lfs -text
|
| 16624 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00001/parts/pointer_assembly.glb filter=lfs diff=lfs merge=lfs -text
|
| 16625 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/articulation.blend filter=lfs diff=lfs merge=lfs -text
|
| 16626 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/object.glb filter=lfs diff=lfs merge=lfs -text
|
| 16627 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/object.usdz filter=lfs diff=lfs merge=lfs -text
|
| 16628 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/parts/bl_screw.glb filter=lfs diff=lfs merge=lfs -text
|
| 16629 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/parts/br_screw.glb filter=lfs diff=lfs merge=lfs -text
|
| 16630 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/parts/fixed_instrument.glb filter=lfs diff=lfs merge=lfs -text
|
| 16631 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/parts/humidity_moving.glb filter=lfs diff=lfs merge=lfs -text
|
| 16632 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/parts/temperature_moving.glb filter=lfs diff=lfs merge=lfs -text
|
| 16633 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/parts/tl_screw.glb filter=lfs diff=lfs merge=lfs -text
|
| 16634 |
+
objects/ml_indoor_thermohygrometer-ea60477935--00002/parts/tr_screw.glb filter=lfs diff=lfs merge=lfs -text
|
| 16635 |
+
objects/ml_mechanical_bathroom_scale-776996f890--00005/articulation.blend filter=lfs diff=lfs merge=lfs -text
|
| 16636 |
+
objects/ml_mechanical_bathroom_scale-776996f890--00005/object.glb filter=lfs diff=lfs merge=lfs -text
|
| 16637 |
+
objects/ml_mechanical_bathroom_scale-776996f890--00005/object.usdz filter=lfs diff=lfs merge=lfs -text
|
| 16638 |
+
objects/ml_mechanical_bathroom_scale-776996f890--00005/parts/loaded_platform.glb filter=lfs diff=lfs merge=lfs -text
|
| 16639 |
+
objects/ml_mechanical_bathroom_scale-776996f890--00005/parts/stationary_base.glb filter=lfs diff=lfs merge=lfs -text
|
| 16640 |
+
objects/ml_non_alarm_table_clock-873f7a2ce0--00002/articulation.blend filter=lfs diff=lfs merge=lfs -text
|
| 16641 |
+
objects/ml_non_alarm_table_clock-873f7a2ce0--00002/object.glb filter=lfs diff=lfs merge=lfs -text
|
| 16642 |
+
objects/ml_non_alarm_table_clock-873f7a2ce0--00002/object.usdz filter=lfs diff=lfs merge=lfs -text
|
| 16643 |
+
objects/ml_non_alarm_table_clock-873f7a2ce0--00002/parts/fixed_clock.glb filter=lfs diff=lfs merge=lfs -text
|
| 16644 |
+
objects/ml_non_alarm_table_clock-873f7a2ce0--00002/parts/hour.glb filter=lfs diff=lfs merge=lfs -text
|
| 16645 |
+
objects/ml_non_alarm_table_clock-873f7a2ce0--00002/parts/minute.glb filter=lfs diff=lfs merge=lfs -text
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/renders/isometric.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/renders/side.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/renders/top.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00001/static.py
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import bpy
|
| 2 |
+
import math
|
| 3 |
+
|
| 4 |
+
PROVENANCE_TIERS = {
|
| 5 |
+
'housing': 'observed', 'top_plate': 'observed',
|
| 6 |
+
'left_grip': 'observed', 'right_grip': 'observed',
|
| 7 |
+
'display': 'observed', 'button': 'observed', 'button_well': 'inferred',
|
| 8 |
+
'charge_socket': 'observed', 'socket_tongue': 'inferred',
|
| 9 |
+
'foot_front_left': 'observed', 'foot_front_right': 'observed',
|
| 10 |
+
'foot_rear_left': 'observed', 'foot_rear_right': 'observed'
|
| 11 |
+
}
|
| 12 |
+
# All metric dimensions are proportional estimates, not photographed measurements.
|
| 13 |
+
# Button: downward translation and 1.5 mm stroke are mechanism design priors.
|
| 14 |
+
# Hidden button-well floor thickness is inferred.
|
| 15 |
+
BODY_WALL = 0.0008
|
| 16 |
+
BUTTON_X = 0.076
|
| 17 |
+
BUTTON_Y = 0.108
|
| 18 |
+
|
| 19 |
+
def mat(name, color, metallic=0.0, roughness=0.4):
|
| 20 |
+
material = build_rich_material(name, material_class='generic', base_color=(*color,1), metallic=metallic, roughness=roughness, normal_strength=0.0)
|
| 21 |
+
material.diffuse_color = (*color,1)
|
| 22 |
+
material.metallic = metallic
|
| 23 |
+
material.roughness = roughness
|
| 24 |
+
return material
|
| 25 |
+
|
| 26 |
+
def panel_normals(obj):
|
| 27 |
+
for polygon in obj.data.polygons:
|
| 28 |
+
polygon.use_smooth = abs(polygon.normal.z) < 0.99
|
| 29 |
+
return obj
|
| 30 |
+
|
| 31 |
+
def rounded_slab(name, x, y, z0, z1, width, depth, radius, material):
|
| 32 |
+
return panel_normals(create_lofted_rect_sections(name, z0, z1, [[0,x,y,width,depth,radius],[1,x,y,width,depth,radius]], material, corner_segments=16))
|
| 33 |
+
|
| 34 |
+
def cut(target, cutter):
|
| 35 |
+
modifier=target.modifiers.new('Machined recess','BOOLEAN')
|
| 36 |
+
modifier.operation='DIFFERENCE'
|
| 37 |
+
modifier.solver='EXACT'
|
| 38 |
+
modifier.object=cutter
|
| 39 |
+
bpy.context.view_layer.objects.active=target
|
| 40 |
+
bpy.ops.object.modifier_apply(modifier=modifier.name)
|
| 41 |
+
bpy.data.objects.remove(cutter,do_unlink=True)
|
| 42 |
+
panel_normals(target)
|
| 43 |
+
|
| 44 |
+
def corner_slab(name, xmin, xmax, ymin, ymax, radii, z0, z1, material):
|
| 45 |
+
# radii in bottom-right, top-right, top-left, bottom-left order.
|
| 46 |
+
points=[]
|
| 47 |
+
centers=[(xmax-radii[0],ymin+radii[0]),(xmax-radii[1],ymax-radii[1]),(xmin+radii[2],ymax-radii[2]),(xmin+radii[3],ymin+radii[3])]
|
| 48 |
+
for i, ((cx,cy),r) in enumerate(zip(centers,radii)):
|
| 49 |
+
for j in range(17):
|
| 50 |
+
angle=(-math.pi/2+i*math.pi/2)+j*math.pi/32
|
| 51 |
+
points.append((cx+r*math.cos(angle),cy+r*math.sin(angle)))
|
| 52 |
+
n=len(points)
|
| 53 |
+
vertices=[(x,y,z) for z in (z0,z1) for x,y in points]
|
| 54 |
+
faces=[tuple(reversed(range(n))),tuple(range(n,2*n))]
|
| 55 |
+
faces += [(i,(i+1)%n,(i+1)%n+n,i+n) for i in range(n)]
|
| 56 |
+
mesh=bpy.data.meshes.new(name+'_mesh')
|
| 57 |
+
mesh.from_pydata(vertices,[],faces)
|
| 58 |
+
mesh.update()
|
| 59 |
+
obj=bpy.data.objects.new(name,mesh)
|
| 60 |
+
bpy.context.collection.objects.link(obj)
|
| 61 |
+
assign_material(obj,material)
|
| 62 |
+
return obj
|
| 63 |
+
|
| 64 |
+
def grip_material(name):
|
| 65 |
+
material=mat(name,(0.045,0.048,0.049),roughness=0.79)
|
| 66 |
+
nodes=material.node_tree.nodes
|
| 67 |
+
links=material.node_tree.links
|
| 68 |
+
tex=nodes.new('ShaderNodeTexNoise')
|
| 69 |
+
tex.inputs['Scale'].default_value=1900
|
| 70 |
+
tex.inputs['Detail'].default_value=2.2
|
| 71 |
+
tex.inputs['Roughness'].default_value=0.8
|
| 72 |
+
coords=nodes.new('ShaderNodeTexCoord')
|
| 73 |
+
links.new(coords.outputs['Object'],tex.inputs['Vector'])
|
| 74 |
+
bump=nodes.new('ShaderNodeBump')
|
| 75 |
+
bump.inputs['Strength'].default_value=0.48
|
| 76 |
+
bump.inputs['Distance'].default_value=0.00018
|
| 77 |
+
links.new(tex.outputs['Fac'],bump.inputs['Height'])
|
| 78 |
+
links.new(bump.outputs['Normal'],nodes.get('Principled BSDF').inputs['Normal'])
|
| 79 |
+
ramp=nodes.new('ShaderNodeValToRGB')
|
| 80 |
+
ramp.color_ramp.elements[0].position=0.18
|
| 81 |
+
ramp.color_ramp.elements[0].color=(0.027,0.029,0.030,1)
|
| 82 |
+
ramp.color_ramp.elements[1].position=0.84
|
| 83 |
+
ramp.color_ramp.elements[1].color=(0.060,0.063,0.065,1)
|
| 84 |
+
links.new(tex.outputs['Fac'],ramp.inputs['Fac'])
|
| 85 |
+
links.new(ramp.outputs['Color'],nodes.get('Principled BSDF').inputs['Base Color'])
|
| 86 |
+
return material
|
| 87 |
+
|
| 88 |
+
def make_foot(name,x,y):
|
| 89 |
+
plastic=mat(name+'_polymer',(0.035,0.037,0.038),roughness=0.42)
|
| 90 |
+
rubber=mat(name+'_rubber',(0.012,0.013,0.014),roughness=0.76)
|
| 91 |
+
create_revolved_profile(name+'_mount',(x,y),0.002,0.0115,[[0,0.0148],[0.1,0.0162],[0.8,0.0165],[0.1,0.0158]],plastic,segments=64)
|
| 92 |
+
create_revolved_profile(name+'_sole',(x,y),0.000,0.0022,[[0,0.014],[0.25,0.0154],[0.75,0.0155]],rubber,segments=64)
|
| 93 |
+
|
| 94 |
+
### Part: housing ###
|
| 95 |
+
housing_material=mat('Charcoal molded housing',(0.065,0.069,0.071),roughness=0.34)
|
| 96 |
+
housing=create_lofted_rect_sections('housing',0.008,0.032,[[0,0,0,0.283,0.277,0.040],[0.10,0,0,0.294,0.288,0.044],[0.18,0,0,0.299,0.293,0.046],[0.27,0,0,0.300,0.294,0.047],[0.24,0,0,0.298,0.292,0.046],[0.14,0,0,0.295,0.289,0.045],[0.07,0,0,0.291,0.285,0.043]],housing_material,corner_segments=20)
|
| 97 |
+
button_cut=rounded_slab('cutter_button_well',BUTTON_X,BUTTON_Y,0.023,0.045,0.030,0.025,0.005,housing_material)
|
| 98 |
+
cut(housing,button_cut)
|
| 99 |
+
display_cut=rounded_slab('cutter_display_seat',0,0.1155,0.027,0.040,0.092,0.043,0.006,housing_material)
|
| 100 |
+
cut(housing,display_cut)
|
| 101 |
+
port_cut=rounded_slab('cutter_usb',0,0,0,0.008,0.015,0.006,0.003,housing_material)
|
| 102 |
+
port_cut.rotation_euler=(math.pi/2,0,math.pi/2)
|
| 103 |
+
port_cut.location=(0.145,0.082,0.020)
|
| 104 |
+
cut(housing,port_cut)
|
| 105 |
+
### End Part ###
|
| 106 |
+
|
| 107 |
+
### Part: top_plate ###
|
| 108 |
+
steel=mat('Brushed stainless steel',(0.60,0.61,0.62),metallic=0.55,roughness=0.40)
|
| 109 |
+
nodes=steel.node_tree.nodes
|
| 110 |
+
links=steel.node_tree.links
|
| 111 |
+
coords=nodes.new('ShaderNodeTexCoord')
|
| 112 |
+
scale=nodes.new('ShaderNodeVectorMath')
|
| 113 |
+
scale.operation='MULTIPLY'
|
| 114 |
+
scale.inputs[1].default_value=(7,1700,110)
|
| 115 |
+
links.new(coords.outputs['Object'],scale.inputs[0])
|
| 116 |
+
noise=nodes.new('ShaderNodeTexNoise')
|
| 117 |
+
noise.inputs['Scale'].default_value=5
|
| 118 |
+
noise.inputs['Detail'].default_value=2
|
| 119 |
+
links.new(scale.outputs['Vector'],noise.inputs['Vector'])
|
| 120 |
+
bump=nodes.new('ShaderNodeBump')
|
| 121 |
+
bump.inputs['Strength'].default_value=0.17
|
| 122 |
+
bump.inputs['Distance'].default_value=0.000025
|
| 123 |
+
links.new(noise.outputs['Fac'],bump.inputs['Height'])
|
| 124 |
+
links.new(bump.outputs['Normal'],nodes.get('Principled BSDF').inputs['Normal'])
|
| 125 |
+
ramp=nodes.new('ShaderNodeValToRGB')
|
| 126 |
+
ramp.color_ramp.elements[0].color=(0.48,0.49,0.50,1)
|
| 127 |
+
ramp.color_ramp.elements[1].color=(0.70,0.71,0.72,1)
|
| 128 |
+
links.new(noise.outputs['Fac'],ramp.inputs['Fac'])
|
| 129 |
+
links.new(ramp.outputs['Color'],nodes.get('Principled BSDF').inputs['Base Color'])
|
| 130 |
+
plate=rounded_slab('top_plate',0,0,0.03165,0.0323,0.289,0.283,0.044,steel)
|
| 131 |
+
cut(plate,rounded_slab('cutter_button_plate',BUTTON_X,BUTTON_Y,0.026,0.04,0.030,0.025,0.005,steel))
|
| 132 |
+
cut(plate,rounded_slab('cutter_display_plate',0,0.1155,0.026,0.040,0.092,0.043,0.006,steel))
|
| 133 |
+
### End Part ###
|
| 134 |
+
|
| 135 |
+
### Part: left_grip ###
|
| 136 |
+
left_material=grip_material('Fine pebbled left grip')
|
| 137 |
+
corner_slab('left_grip',-0.144,-0.013,-0.1408,0.0845,[0.011,0.012,0.0005,0.0435],0.03225,0.03265,left_material)
|
| 138 |
+
### End Part ###
|
| 139 |
+
|
| 140 |
+
### Part: right_grip ###
|
| 141 |
+
right_material=grip_material('Fine pebbled right grip')
|
| 142 |
+
corner_slab('right_grip',0.013,0.144,-0.1408,0.0845,[0.0435,0.0005,0.012,0.011],0.03225,0.03265,right_material)
|
| 143 |
+
### End Part ###
|
| 144 |
+
|
| 145 |
+
### Part: display ###
|
| 146 |
+
bezel_mat=mat('Black display bezel',(0.009,0.011,0.010),roughness=0.27)
|
| 147 |
+
bezel=rounded_slab('display_bezel',0,0.1155,0.027,0.03235,0.0918,0.0428,0.0057,bezel_mat)
|
| 148 |
+
cut(bezel,rounded_slab('cutter_display_glass',0,0.1155,0.0307,0.039,0.0878,0.0388,0.0042,bezel_mat))
|
| 149 |
+
glass_mat=mat('Unlit olive charcoal LCD',(0.032,0.036,0.028),metallic=0.08,roughness=0.24)
|
| 150 |
+
rounded_slab('blank_LCD_window',0,0.1155,0.0307,0.0319,0.08775,0.03875,0.0042,glass_mat)
|
| 151 |
+
### End Part ###
|
| 152 |
+
|
| 153 |
+
### Part: button_well ###
|
| 154 |
+
well_material=mat('Button socket black',(0.012,0.013,0.014),roughness=0.38)
|
| 155 |
+
well=rounded_slab('button_well',BUTTON_X,BUTTON_Y,0.023,0.03225,0.0298,0.0248,0.0049,well_material)
|
| 156 |
+
cut(well,rounded_slab('cutter_key_travel',BUTTON_X,BUTTON_Y,0.023 + BODY_WALL,0.045,0.0283,0.0233,0.0045,well_material))
|
| 157 |
+
### End Part ###
|
| 158 |
+
|
| 159 |
+
### Part: button ###
|
| 160 |
+
key_mat=mat('Satin gray push button',(0.22,0.23,0.235),metallic=0.22,roughness=0.38)
|
| 161 |
+
key=rounded_slab('button',BUTTON_X,BUTTON_Y,0.0296,0.0341,0.027,0.022,0.0042,key_mat)
|
| 162 |
+
key_bevel=key.modifiers.new('Soft key edges','BEVEL')
|
| 163 |
+
key_bevel.width=0.0010
|
| 164 |
+
key_bevel.segments=5
|
| 165 |
+
finalize_mesh_object(key)
|
| 166 |
+
panel_normals(key)
|
| 167 |
+
dimple=create_sphere('cutter_button_dimple',(BUTTON_X,BUTTON_Y,0.0784),0.045,key_mat)
|
| 168 |
+
cut(key,dimple)
|
| 169 |
+
### End Part ###
|
| 170 |
+
|
| 171 |
+
### Part: charge_socket ###
|
| 172 |
+
port_metal=mat('Socket nickel surround',(0.48,0.50,0.51),metallic=0.90,roughness=0.26)
|
| 173 |
+
port=rounded_slab('USB_C_surround',0,0,0,0.002,0.0144,0.0054,0.0027,port_metal)
|
| 174 |
+
cut(port,rounded_slab('cutter_port_aperture',0,0,-0.001,0.004,0.0126,0.0036,0.0018,port_metal))
|
| 175 |
+
port.rotation_euler=(math.pi/2,0,math.pi/2)
|
| 176 |
+
port.location=(0.1480,0.082,0.020)
|
| 177 |
+
black_port=mat('USB socket inner polymer',(0.005,0.006,0.007),roughness=0.6)
|
| 178 |
+
port_back=rounded_slab('socket_recess',0,0,0,0.0007,0.014,0.005,0.0025,black_port)
|
| 179 |
+
port_back.rotation_euler=(math.pi/2,0,math.pi/2)
|
| 180 |
+
port_back.location=(0.145,0.082,0.020)
|
| 181 |
+
tongue_mat=mat('USB tongue',(0.07,0.075,0.08),metallic=0.1,roughness=0.4)
|
| 182 |
+
create_rounded_box('socket_tongue',(0.1471,0.082,0.020),(0.0026,0.0095,0.0008),0.00025,tongue_mat,segments=5)
|
| 183 |
+
### End Part ###
|
| 184 |
+
|
| 185 |
+
### Part: foot_front_left ###
|
| 186 |
+
make_foot('foot_front_left',-0.122,-0.119)
|
| 187 |
+
### End Part ###
|
| 188 |
+
|
| 189 |
+
### Part: foot_front_right ###
|
| 190 |
+
make_foot('foot_front_right',0.122,-0.119)
|
| 191 |
+
### End Part ###
|
| 192 |
+
|
| 193 |
+
### Part: foot_rear_left ###
|
| 194 |
+
make_foot('foot_rear_left',-0.122,0.119)
|
| 195 |
+
### End Part ###
|
| 196 |
+
|
| 197 |
+
### Part: foot_rear_right ###
|
| 198 |
+
make_foot('foot_rear_right',0.122,0.119)
|
| 199 |
+
### End Part ###
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/articulation.blend
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e53c663e121439aaf75099e9918fcf6a5e3b1f881d26683c35d194c5581051d5
|
| 3 |
+
size 1951824
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/articulation.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/meta.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"object_id": "ml_electronic_bathroom_scale-69cdc204a1--00002",
|
| 3 |
+
"category": "ml_electronic_bathroom_scale",
|
| 4 |
+
"category_name": "Electronic bathroom scale with rigid mechanisms",
|
| 5 |
+
"domain": "Measurement, scientific instrumentation and laboratories",
|
| 6 |
+
"family": "Mass, force and torque measurement",
|
| 7 |
+
"subfamily": "Weighing and mass comparison assemblies",
|
| 8 |
+
"part_count": 2,
|
| 9 |
+
"joint_count": 1,
|
| 10 |
+
"material_categories": [
|
| 11 |
+
"glass",
|
| 12 |
+
"metal",
|
| 13 |
+
"plastic",
|
| 14 |
+
"rubber"
|
| 15 |
+
]
|
| 16 |
+
}
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/object.glb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a22840d4a1374a7d7fb44281148e44426abb79ff36caba62fa6f058c50e824ca
|
| 3 |
+
size 20511676
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/object.urdf
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version='1.0' encoding='utf-8'?>
|
| 2 |
+
<robot name="source_motion_hypothesis">
|
| 3 |
+
<link name="scale_body">
|
| 4 |
+
<visual>
|
| 5 |
+
<origin xyz="0 0 0" rpy="1.5707963267948966 0 0" />
|
| 6 |
+
<geometry>
|
| 7 |
+
<mesh filename="parts/scale_body.glb" />
|
| 8 |
+
</geometry>
|
| 9 |
+
</visual>
|
| 10 |
+
</link>
|
| 11 |
+
<link name="thumb_slider">
|
| 12 |
+
<visual>
|
| 13 |
+
<origin xyz="0 0 0" rpy="1.5707963267948966 0 0" />
|
| 14 |
+
<geometry>
|
| 15 |
+
<mesh filename="parts/thumb_slider.glb" />
|
| 16 |
+
</geometry>
|
| 17 |
+
</visual>
|
| 18 |
+
</link>
|
| 19 |
+
<joint name="M1_slider" type="prismatic">
|
| 20 |
+
<parent link="scale_body" />
|
| 21 |
+
<child link="thumb_slider" />
|
| 22 |
+
<origin xyz="0.051 0.106 0.0373" rpy="0.0 0.0 0.0" />
|
| 23 |
+
<axis xyz="1.0 0.0 0.0" />
|
| 24 |
+
<limit lower="0.0" upper="0.03" effort="0.0" velocity="0.0" />
|
| 25 |
+
</joint>
|
| 26 |
+
</robot>
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/object.usdz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:baeca9e3ac3ddc9948f2a487c9e3cdcb520541e5b79d61e9206c9e0f689bc6f6
|
| 3 |
+
size 21097126
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/parts/scale_body.glb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c6f0f447a868f1dc05d65b985f2a65518fdcc80cae71f810cb964e4f58b587e
|
| 3 |
+
size 20383772
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/parts/thumb_slider.glb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68d20d4e084734996ab18b0f264728211b4dd46700bcb9b35a3905155bdf5195
|
| 3 |
+
size 14820716
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/renders/front.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/renders/isometric.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/renders/side.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/renders/top.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00002/static.py
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import bpy
|
| 2 |
+
import math
|
| 3 |
+
from mathutils import Vector
|
| 4 |
+
|
| 5 |
+
PROVENANCE_TIERS = {"housing": "observed", "platform": "observed", "display": "observed", "slider": "observed", "socket": "observed", "foot_fl": "observed", "foot_fr": "observed", "foot_rl": "inferred", "foot_rr": "inferred", "slider_guide": "inferred", "socket_inner": "inferred"}
|
| 6 |
+
RADIUS = 0.160
|
| 7 |
+
PLATFORM_TOP = 0.039
|
| 8 |
+
SLIDER_TRAVEL = 0.030
|
| 9 |
+
|
| 10 |
+
# Geometry helpers only; all resources are created by calls in owning Parts.
|
| 11 |
+
def surface_material(name, color, roughness, grain=0.0):
|
| 12 |
+
mat = build_principled_material(name, base_color=color, roughness=roughness)
|
| 13 |
+
mat.diffuse_color = color
|
| 14 |
+
bsdf = mat.node_tree.nodes.get('Principled BSDF')
|
| 15 |
+
bsdf.inputs['Specular IOR Level'].default_value = 0.22
|
| 16 |
+
if grain > 0:
|
| 17 |
+
tex = mat.node_tree.nodes.new('ShaderNodeTexNoise')
|
| 18 |
+
tex.inputs['Scale'].default_value = 1100.0
|
| 19 |
+
tex.inputs['Detail'].default_value = 2.0
|
| 20 |
+
bump = mat.node_tree.nodes.new('ShaderNodeBump')
|
| 21 |
+
bump.inputs['Strength'].default_value = grain
|
| 22 |
+
bump.inputs['Distance'].default_value = 0.00010
|
| 23 |
+
mat.node_tree.links.new(tex.outputs['Fac'], bump.inputs['Height'])
|
| 24 |
+
mat.node_tree.links.new(bump.outputs['Normal'], bsdf.inputs['Normal'])
|
| 25 |
+
return mat
|
| 26 |
+
def rounded_prism(name, center, width, depth, height, radius, material):
|
| 27 |
+
pts = rounded_rect_points(width, depth, radius, center=(center[0], center[1]), z=center[2]-height/2, segments=12)
|
| 28 |
+
pts = [tuple(p) for p in pts]
|
| 29 |
+
n = len(pts)
|
| 30 |
+
verts = [(p[0], p[1], center[2]-height/2) for p in pts] + [(p[0], p[1], center[2]+height/2) for p in pts]
|
| 31 |
+
faces = [tuple(reversed(range(n))), tuple(range(n,2*n))]
|
| 32 |
+
faces += [(i,(i+1)%n,(i+1)%n+n,i+n) for i in range(n)]
|
| 33 |
+
mesh = bpy.data.meshes.new(name+'_mesh')
|
| 34 |
+
mesh.from_pydata(verts, [], faces)
|
| 35 |
+
mesh.update()
|
| 36 |
+
obj = bpy.data.objects.new(name, mesh)
|
| 37 |
+
bpy.context.collection.objects.link(obj)
|
| 38 |
+
assign_material(obj, material)
|
| 39 |
+
return obj
|
| 40 |
+
|
| 41 |
+
def subtract(obj, cutter):
|
| 42 |
+
mod = obj.modifiers.new('machined recess', 'BOOLEAN')
|
| 43 |
+
mod.operation = 'DIFFERENCE'
|
| 44 |
+
mod.solver = 'EXACT'
|
| 45 |
+
mod.object = cutter
|
| 46 |
+
bpy.context.view_layer.objects.active = obj
|
| 47 |
+
bpy.ops.object.modifier_apply(modifier=mod.name)
|
| 48 |
+
bpy.data.objects.remove(cutter, do_unlink=True)
|
| 49 |
+
|
| 50 |
+
def edge_finish(obj, amount):
|
| 51 |
+
mod = obj.modifiers.new('soft moulded edges', 'BEVEL')
|
| 52 |
+
mod.width = amount
|
| 53 |
+
mod.segments = 3
|
| 54 |
+
bpy.context.view_layer.objects.active = obj
|
| 55 |
+
bpy.ops.object.modifier_apply(modifier=mod.name)
|
| 56 |
+
shade_smooth_and_weight(obj)
|
| 57 |
+
|
| 58 |
+
def rubber_foot(name, x, y):
|
| 59 |
+
mat = surface_material(name+'_rubber', (0.025,0.028,0.029,1), 0.78, 0.12)
|
| 60 |
+
create_revolved_profile(name, (x,y), 0.001, 0.0125, [[0,0.0132],[1,0.0146],[3,0.0148],[0.2,0.0141],[0.2,0.0145],[2,0.0144],[1,0.0133]], mat, segments=96)
|
| 61 |
+
|
| 62 |
+
### Part: housing ###
|
| 63 |
+
mat = surface_material('charcoal moulded housing', (0.045,0.048,0.050,1), 0.53, 0.07)
|
| 64 |
+
housing = create_revolved_profile('housing', (0,0), 0.009, 0.030, [[0,0.143],[0.4,0.151],[0.7,0.157],[0.8,0.1592],[1.1,0.160],[2,0.160]], mat, segments=192)
|
| 65 |
+
# A real recessed opening at the right rim for the fixed electrical socket.
|
| 66 |
+
cutter = rounded_prism('cutter_socket', (0,0,0), 0.0205, 0.0075, 0.016, 0.0034, mat)
|
| 67 |
+
cutter.rotation_euler = (math.pi/2, 0, math.pi/2)
|
| 68 |
+
cutter.location = (0.159,0,0.021)
|
| 69 |
+
apply_transform(cutter)
|
| 70 |
+
subtract(housing, cutter)
|
| 71 |
+
shade_smooth_and_weight(housing)
|
| 72 |
+
### End Part ###
|
| 73 |
+
|
| 74 |
+
### Part: platform ###
|
| 75 |
+
mat = surface_material('warm ivory textured platform', (0.56,0.535,0.48,1), 0.72, 0.24)
|
| 76 |
+
platform = create_revolved_profile('platform', (0,0), 0.030, 0.039, [[0,0.160],[3.8,0.160],[1.2,0.1598],[1,0.159],[0.8,0.1575],[0.2,0.1555]], mat, segments=192)
|
| 77 |
+
cutter = rounded_prism('cutter_display', (-0.008,0.113,0.041), 0.0745, 0.0355, 0.013, 0.0024, mat)
|
| 78 |
+
subtract(platform, cutter)
|
| 79 |
+
cutter = rounded_prism('cutter_slider_trough', (0.066,0.106,0.042), 0.054, 0.0148, 0.014, 0.0061, mat)
|
| 80 |
+
subtract(platform, cutter)
|
| 81 |
+
edge_finish(platform, 0.0005)
|
| 82 |
+
### End Part ###
|
| 83 |
+
|
| 84 |
+
### Part: display ###
|
| 85 |
+
mat = surface_material('display dark perimeter', (0.014,0.018,0.017,1), 0.52)
|
| 86 |
+
obj = rounded_prism('display_recess_seal', (-0.008,0.113,0.0352), 0.0740, 0.0350, 0.0014, 0.0022, mat)
|
| 87 |
+
edge_finish(obj,0.00025)
|
| 88 |
+
mat = surface_material('inactive grey green LCD glass', (0.035,0.050,0.045,1), 0.38)
|
| 89 |
+
obj = rounded_prism('display_glass', (-0.008,0.113,0.03605), 0.0725, 0.0336, 0.0008, 0.0018, mat)
|
| 90 |
+
edge_finish(obj,0.0002)
|
| 91 |
+
### End Part ###
|
| 92 |
+
|
| 93 |
+
### Part: slider ###
|
| 94 |
+
mat = surface_material('slider charcoal plastic', (0.028,0.032,0.035,1), 0.57, 0.10)
|
| 95 |
+
obj = rounded_prism('slider_guide', (0.051,0.106,0.0373), 0.018, 0.0115, 0.0038, 0.0035, mat)
|
| 96 |
+
edge_finish(obj,0.0003)
|
| 97 |
+
obj = rounded_prism('slider_thumb_cap', (0.051,0.106,0.0410), 0.022, 0.017, 0.0036, 0.0035, mat)
|
| 98 |
+
edge_finish(obj,0.00065)
|
| 99 |
+
for i in range(5):
|
| 100 |
+
x = 0.051 + (i-2)*0.00225
|
| 101 |
+
create_rounded_box('slider_grip_'+str(i), (x,0.106,0.04292), (0.0007,0.0090,0.00055), 0.00026, mat, segments=4)
|
| 102 |
+
### End Part ###
|
| 103 |
+
|
| 104 |
+
### Part: socket ###
|
| 105 |
+
mat = build_rich_material('socket metal rim', material_class='metal', base_color=(0.45,0.46,0.42,1), metallic=0.85, roughness=0.29)
|
| 106 |
+
outer = rounded_prism('socket_rim', (0,0,0), 0.0195, 0.0066, 0.0010, 0.0030, mat)
|
| 107 |
+
cutter = rounded_prism('cutter_socket_mouth', (0,0,0), 0.0181, 0.0052, 0.004, 0.00235, mat)
|
| 108 |
+
subtract(outer,cutter)
|
| 109 |
+
outer.rotation_euler = (math.pi/2,0,math.pi/2)
|
| 110 |
+
outer.location = (0.1598,0,0.021)
|
| 111 |
+
apply_transform(outer)
|
| 112 |
+
edge_finish(outer,0.0001)
|
| 113 |
+
mat = build_rich_material('socket inner black', material_class='dark_cavity', base_color=(0.009,0.011,0.010,1), roughness=0.85)
|
| 114 |
+
obj = rounded_prism('socket_inner', (0,0,0), 0.0192, 0.0063, 0.0005, 0.0029, mat)
|
| 115 |
+
obj.rotation_euler = (math.pi/2,0,math.pi/2)
|
| 116 |
+
obj.location = (0.152,0,0.021)
|
| 117 |
+
apply_transform(obj)
|
| 118 |
+
mat = build_rich_material('socket tongue', material_class='plastic', base_color=(0.12,0.13,0.12,1), roughness=0.55)
|
| 119 |
+
create_rounded_box('socket_contact_tongue', (0.1555,0,0.021), (0.006,0.0138,0.0010), 0.0004, mat, segments=4)
|
| 120 |
+
### End Part ###
|
| 121 |
+
|
| 122 |
+
### Part: foot_fl ###
|
| 123 |
+
rubber_foot('foot_fl', -0.101, -0.100)
|
| 124 |
+
### End Part ###
|
| 125 |
+
|
| 126 |
+
### Part: foot_fr ###
|
| 127 |
+
rubber_foot('foot_fr', 0.101, -0.100)
|
| 128 |
+
### End Part ###
|
| 129 |
+
|
| 130 |
+
### Part: foot_rl ###
|
| 131 |
+
rubber_foot('foot_rl', -0.101, 0.100)
|
| 132 |
+
### End Part ###
|
| 133 |
+
|
| 134 |
+
### Part: foot_rr ###
|
| 135 |
+
rubber_foot('foot_rr', 0.101, 0.100)
|
| 136 |
+
### End Part ###
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/articulation.blend
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94b66a6f85d08b0e9c8793d50e7e18e0f7b1ed3557656ae455b91f16786127fa
|
| 3 |
+
size 2405217
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/articulation.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/meta.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"object_id": "ml_electronic_bathroom_scale-69cdc204a1--00004",
|
| 3 |
+
"category": "ml_electronic_bathroom_scale",
|
| 4 |
+
"category_name": "Electronic bathroom scale with rigid mechanisms",
|
| 5 |
+
"domain": "Measurement, scientific instrumentation and laboratories",
|
| 6 |
+
"family": "Mass, force and torque measurement",
|
| 7 |
+
"subfamily": "Weighing and mass comparison assemblies",
|
| 8 |
+
"part_count": 4,
|
| 9 |
+
"joint_count": 3,
|
| 10 |
+
"material_categories": [
|
| 11 |
+
"metal",
|
| 12 |
+
"rubber"
|
| 13 |
+
]
|
| 14 |
+
}
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/object.glb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef4439f54f3cf109b1b488de213bbc70776d5c68ca7631e4e0fa79d5243ae6db
|
| 3 |
+
size 8334408
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/object.urdf
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version='1.0' encoding='utf-8'?>
|
| 2 |
+
<robot name="source_motion_hypothesis">
|
| 3 |
+
<link name="scale_fixed">
|
| 4 |
+
<visual>
|
| 5 |
+
<origin xyz="0 0 0" rpy="1.5707963267948966 0 0" />
|
| 6 |
+
<geometry>
|
| 7 |
+
<mesh filename="parts/scale_fixed.glb" />
|
| 8 |
+
</geometry>
|
| 9 |
+
</visual>
|
| 10 |
+
</link>
|
| 11 |
+
<link name="left_button">
|
| 12 |
+
<visual>
|
| 13 |
+
<origin xyz="0 0 0" rpy="1.5707963267948966 0 0" />
|
| 14 |
+
<geometry>
|
| 15 |
+
<mesh filename="parts/left_button.glb" />
|
| 16 |
+
</geometry>
|
| 17 |
+
</visual>
|
| 18 |
+
</link>
|
| 19 |
+
<link name="middle_button">
|
| 20 |
+
<visual>
|
| 21 |
+
<origin xyz="0 0 0" rpy="1.5707963267948966 0 0" />
|
| 22 |
+
<geometry>
|
| 23 |
+
<mesh filename="parts/middle_button.glb" />
|
| 24 |
+
</geometry>
|
| 25 |
+
</visual>
|
| 26 |
+
</link>
|
| 27 |
+
<link name="right_button">
|
| 28 |
+
<visual>
|
| 29 |
+
<origin xyz="0 0 0" rpy="1.5707963267948966 0 0" />
|
| 30 |
+
<geometry>
|
| 31 |
+
<mesh filename="parts/right_button.glb" />
|
| 32 |
+
</geometry>
|
| 33 |
+
</visual>
|
| 34 |
+
</link>
|
| 35 |
+
<joint name="press_left" type="prismatic">
|
| 36 |
+
<parent link="scale_fixed" />
|
| 37 |
+
<child link="left_button" />
|
| 38 |
+
<origin xyz="-0.03 0.04 0.0395" rpy="0.0 0.0 0.0" />
|
| 39 |
+
<axis xyz="0.0 0.0 -1.0" />
|
| 40 |
+
<limit lower="0.0" upper="0.001" effort="0.0" velocity="0.0" />
|
| 41 |
+
</joint>
|
| 42 |
+
<joint name="press_middle" type="prismatic">
|
| 43 |
+
<parent link="scale_fixed" />
|
| 44 |
+
<child link="middle_button" />
|
| 45 |
+
<origin xyz="0.0 0.04 0.0395" rpy="0.0 0.0 0.0" />
|
| 46 |
+
<axis xyz="0.0 0.0 -1.0" />
|
| 47 |
+
<limit lower="0.0" upper="0.001" effort="0.0" velocity="0.0" />
|
| 48 |
+
</joint>
|
| 49 |
+
<joint name="press_right" type="prismatic">
|
| 50 |
+
<parent link="scale_fixed" />
|
| 51 |
+
<child link="right_button" />
|
| 52 |
+
<origin xyz="0.03 0.04 0.0395" rpy="0.0 0.0 0.0" />
|
| 53 |
+
<axis xyz="0.0 0.0 -1.0" />
|
| 54 |
+
<limit lower="0.0" upper="0.001" effort="0.0" velocity="0.0" />
|
| 55 |
+
</joint>
|
| 56 |
+
</robot>
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/object.usdz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5e1b69d594dde019bd6f959856574e3bad06d23bc3afdae33d71db65d299246
|
| 3 |
+
size 8501195
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/parts/left_button.glb
ADDED
|
Binary file (63.9 kB). View file
|
|
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/parts/middle_button.glb
ADDED
|
Binary file (64 kB). View file
|
|
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/parts/right_button.glb
ADDED
|
Binary file (64 kB). View file
|
|
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/parts/scale_fixed.glb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:15817464caaf25ab1e154dac2b65fac63408755b9ed1193f1907e87e96ec8e06
|
| 3 |
+
size 8136720
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/renders/front.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/renders/isometric.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/renders/side.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/renders/top.png
ADDED
|
Git LFS Details
|
objects/ml_electronic_bathroom_scale-69cdc204a1--00004/static.py
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import bpy
|
| 2 |
+
import math
|
| 3 |
+
from mathutils import Vector
|
| 4 |
+
|
| 5 |
+
PROVENANCE_TIERS = {'upper_housing':'observed','lower_housing':'observed','electrode_fl':'observed','electrode_fr':'observed','electrode_rl':'observed','electrode_rr':'observed','display':'observed','button_left':'observed','button_middle':'observed','button_right':'observed','foot_fl':'observed','foot_fr':'observed','foot_rl':'observed','foot_rr':'observed','socket':'observed','button_well_left':'inferred','button_well_middle':'inferred','button_well_right':'inferred'}
|
| 6 |
+
SHELL_WALL = 0.0025
|
| 7 |
+
BUTTON_TRAVEL = 0.001
|
| 8 |
+
|
| 9 |
+
def mat(name, color, metallic=0.0, roughness=0.4):
|
| 10 |
+
return build_principled_material(name, base_color=(*color,1), metallic=metallic, roughness=roughness)
|
| 11 |
+
|
| 12 |
+
def rr(name, x, y, z0, z1, w, d, r, material):
|
| 13 |
+
obj=create_lofted_rect_sections(name,z0,z1,[[0,x,y,w,d,r],[1,x,y,w,d,r]],material,corner_segments=12)
|
| 14 |
+
for face in obj.data.polygons:
|
| 15 |
+
face.use_smooth=False
|
| 16 |
+
return obj
|
| 17 |
+
|
| 18 |
+
def subtract(obj, cutter):
|
| 19 |
+
mod=obj.modifiers.new('Formed recess','BOOLEAN')
|
| 20 |
+
mod.operation='DIFFERENCE'
|
| 21 |
+
mod.solver='EXACT'
|
| 22 |
+
mod.object=cutter
|
| 23 |
+
bpy.context.view_layer.objects.active=obj
|
| 24 |
+
bpy.ops.object.modifier_apply(modifier=mod.name)
|
| 25 |
+
bpy.data.objects.remove(cutter,do_unlink=True)
|
| 26 |
+
|
| 27 |
+
def brush(name):
|
| 28 |
+
m=mat(name,(0.58,0.57,0.55),0.86,0.3)
|
| 29 |
+
nt=m.node_tree
|
| 30 |
+
bs=nt.nodes.get('Principled BSDF')
|
| 31 |
+
bs.inputs['Anisotropic'].default_value=0.55
|
| 32 |
+
tangent=nt.nodes.new('ShaderNodeVectorMath'); tangent.operation='NORMALIZE'; tangent.inputs[0].default_value=(1,0,0)
|
| 33 |
+
nt.links.new(tangent.outputs[0],bs.inputs['Tangent'])
|
| 34 |
+
tex=nt.nodes.new('ShaderNodeTexCoord')
|
| 35 |
+
scale=nt.nodes.new('ShaderNodeVectorMath'); scale.operation='MULTIPLY'; scale.inputs[1].default_value=(3,650,35)
|
| 36 |
+
nt.links.new(tex.outputs['Generated'],scale.inputs[0])
|
| 37 |
+
noise=nt.nodes.new('ShaderNodeTexNoise'); noise.inputs['Scale'].default_value=1; noise.inputs['Detail'].default_value=2; noise.inputs['Roughness'].default_value=0.7
|
| 38 |
+
nt.links.new(scale.outputs[0],noise.inputs['Vector'])
|
| 39 |
+
ramp=nt.nodes.new('ShaderNodeValToRGB')
|
| 40 |
+
ramp.color_ramp.elements[0].position=0.12; ramp.color_ramp.elements[0].color=(0.35,0.34,0.32,1)
|
| 41 |
+
ramp.color_ramp.elements[1].position=0.88; ramp.color_ramp.elements[1].color=(0.65,0.63,0.60,1)
|
| 42 |
+
nt.links.new(noise.outputs['Fac'],ramp.inputs[0]); nt.links.new(ramp.outputs[0],bs.inputs['Base Color'])
|
| 43 |
+
bump=nt.nodes.new('ShaderNodeBump'); bump.inputs['Strength'].default_value=0.16; bump.inputs['Distance'].default_value=0.000035
|
| 44 |
+
nt.links.new(noise.outputs['Fac'],bump.inputs['Height']); nt.links.new(bump.outputs['Normal'],bs.inputs['Normal'])
|
| 45 |
+
return m
|
| 46 |
+
|
| 47 |
+
def electrode(name,x,y):
|
| 48 |
+
rim=mat(name+'_edge',(0.018,0.017,0.015),0.35,0.43)
|
| 49 |
+
rr(name+'_edge',x,y,0.0395,0.0398,0.0918,0.0953,0.0145,rim)
|
| 50 |
+
m=brush(name+'_steel')
|
| 51 |
+
obj=rr(name,x,y,0.0398,0.04025,0.091,0.0945,0.0142,m)
|
| 52 |
+
bevel=obj.modifiers.new('Soft stamped edge','BEVEL'); bevel.width=0.00018; bevel.segments=3
|
| 53 |
+
finalize_mesh_object(obj,shade_smooth=False)
|
| 54 |
+
|
| 55 |
+
def button(name,x):
|
| 56 |
+
m=mat(name+'_satin_grey',(0.033,0.031,0.028),0.15,0.48)
|
| 57 |
+
obj=create_lofted_rect_sections(name,0.036,0.0418,[[0,x,0.040,0.0226,0.0164,0.002],[0.4,x,0.040,0.023,0.0172,0.0023],[0.5,x,0.040,0.0224,0.0168,0.0024],[0.1,x,0.040,0.0212,0.0156,0.0028]],m,corner_segments=10)
|
| 58 |
+
cutter=create_sphere('cutter_fingertip',(x,0.040,0.043),0.009,m,scale=(1,0.73,0.222222))
|
| 59 |
+
subtract(obj,cutter)
|
| 60 |
+
bevel=obj.modifiers.new('Soft cap edges','BEVEL'); bevel.width=0.00025; bevel.segments=3
|
| 61 |
+
finalize_mesh_object(obj,shade_smooth=False)
|
| 62 |
+
for face in obj.data.polygons:
|
| 63 |
+
face.use_smooth = abs(face.normal.z)<0.999
|
| 64 |
+
|
| 65 |
+
def well(name,x):
|
| 66 |
+
m=mat(name+'_black',(0.026,0.025,0.023),0,0.55)
|
| 67 |
+
obj=rr(name,x,0.040,0.032,0.0394,0.0254,0.0198,0.0034,m)
|
| 68 |
+
cut=rr('cutter_well',x,0.040,0.033,0.045,0.024,0.0184,0.0027,m)
|
| 69 |
+
subtract(obj,cut)
|
| 70 |
+
|
| 71 |
+
def foot(name,x,y):
|
| 72 |
+
m=mat(name+'_rubber',(0.028,0.028,0.026),0,0.75)
|
| 73 |
+
create_revolved_profile(name,(x,y),0,0.010,[[0,0.012],[0.1,0.014],[0.75,0.0145],[0.15,0.015]],m,segments=64)
|
| 74 |
+
|
| 75 |
+
def polygon_solid(name,points,z,t,material):
|
| 76 |
+
n=len(points); verts=[(x,y,z) for x,y in points]+[(x,y,z+t) for x,y in points]
|
| 77 |
+
faces=[tuple(reversed(range(n))),tuple(range(n,2*n))]+[(i,(i+1)%n,(i+1)%n+n,i+n) for i in range(n)]
|
| 78 |
+
mesh=bpy.data.meshes.new(name+'_mesh'); mesh.from_pydata(verts,[],faces); mesh.update()
|
| 79 |
+
obj=bpy.data.objects.new(name,mesh); bpy.context.collection.objects.link(obj); assign_material(obj,material)
|
| 80 |
+
return obj
|
| 81 |
+
|
| 82 |
+
def digit(name,x,y,h,m):
|
| 83 |
+
w=h*0.49; t=h*0.092
|
| 84 |
+
def p(poly):
|
| 85 |
+
return [(x+a+0.10*b,y+b) for a,b in poly]
|
| 86 |
+
for i,cy in enumerate([h/2,-h/2]):
|
| 87 |
+
polygon_solid(name+'_horizontal_'+str(i),p([(-w/2+t,cy),(-w/2+t/2,cy-t/2),(-w/2+t,cy-t),(w/2-t,cy-t),(w/2-t/2,cy-t/2),(w/2-t,cy)]),0.03967,0.000025,m)
|
| 88 |
+
for side in [-1,1]:
|
| 89 |
+
for row in [-1,1]:
|
| 90 |
+
cx=side*w/2; ya=(0.001 if row>0 else -h/2+t); yb=(h/2-t if row>0 else -0.001)
|
| 91 |
+
polygon_solid(name+'_vertical_'+str(side)+'_'+str(row),p([(cx,ya),(cx-t/2,ya+t/2),(cx-t/2,yb-t/2),(cx,yb),(cx+t/2,yb-t/2),(cx+t/2,ya+t/2)]),0.03967,0.000025,m)
|
| 92 |
+
|
| 93 |
+
### Part: upper_housing ###
|
| 94 |
+
housing_mat=mat('warm_grey_moulded_shell',(0.035,0.033,0.030),0.1,0.52)
|
| 95 |
+
housing=create_lofted_rect_sections('upper_housing',0.0155,0.0395,[[0,0,0,0.319,0.249,0.037],[0.06,0,0,0.320,0.250,0.038],[0.69,0,0,0.319,0.249,0.038],[0.14,0,0,0.318,0.248,0.038],[0.08,0,0,0.316,0.246,0.038],[0.03,0,0,0.313,0.243,0.037]],housing_mat,corner_segments=16)
|
| 96 |
+
inner=rr('cutter_shell_interior',0,0,0.010,0.0395-SHELL_WALL,0.311,0.241,0.033,housing_mat)
|
| 97 |
+
subtract(housing,inner)
|
| 98 |
+
for x in [-0.03,0,0.03]:
|
| 99 |
+
cut=rr('cutter_button_seat',x,0.040,0.030,0.045,0.0255,0.0199,0.0035,housing_mat)
|
| 100 |
+
subtract(housing,cut)
|
| 101 |
+
cut=rr('cutter_display_seat',0,0.084,0.0386,0.045,0.091,0.0457,0.0034,housing_mat)
|
| 102 |
+
subtract(housing,cut)
|
| 103 |
+
port_cut=create_rounded_box('cutter_socket',(0.159,0.026,0.0255),(0.012,0.014,0.0055),0.002,housing_mat)
|
| 104 |
+
subtract(housing,port_cut)
|
| 105 |
+
finalize_mesh_object(housing,shade_smooth=False)
|
| 106 |
+
for face in housing.data.polygons:
|
| 107 |
+
face.use_smooth=False
|
| 108 |
+
### End Part ###
|
| 109 |
+
|
| 110 |
+
### Part: lower_housing ###
|
| 111 |
+
m=mat('charcoal_base',(0.037,0.039,0.037),0,0.5)
|
| 112 |
+
create_lofted_rect_sections('lower_housing',0.0085,0.0155,[[0,0,0,0.306,0.236,0.034],[0.25,0,0,0.314,0.244,0.036],[0.55,0,0,0.319,0.249,0.037],[0.2,0,0,0.319,0.249,0.037]],m,corner_segments=16)
|
| 113 |
+
### End Part ###
|
| 114 |
+
|
| 115 |
+
### Part: electrode_fl ###
|
| 116 |
+
electrode('electrode_fl',-0.102,-0.055)
|
| 117 |
+
### End Part ###
|
| 118 |
+
### Part: electrode_fr ###
|
| 119 |
+
electrode('electrode_fr',0.102,-0.055)
|
| 120 |
+
### End Part ###
|
| 121 |
+
### Part: electrode_rl ###
|
| 122 |
+
electrode('electrode_rl',-0.102,0.058)
|
| 123 |
+
### End Part ###
|
| 124 |
+
### Part: electrode_rr ###
|
| 125 |
+
electrode('electrode_rr',0.102,0.058)
|
| 126 |
+
### End Part ###
|
| 127 |
+
|
| 128 |
+
### Part: display ###
|
| 129 |
+
m=mat('black_smoked_display',(0.0015,0.0018,0.0017),0.0,0.22)
|
| 130 |
+
m.node_tree.nodes.get('Principled BSDF').inputs['Specular IOR Level'].default_value=0.12
|
| 131 |
+
rr('display',0,0.084,0.0386,0.03965,0.0905,0.0452,0.0032,m)
|
| 132 |
+
lcd=mat('muted_lcd_segments',(0.008,0.009,0.008),0.0,0.6)
|
| 133 |
+
lcd.node_tree.nodes.get('Principled BSDF').inputs['Specular IOR Level'].default_value=0.15
|
| 134 |
+
digit('zero_left',0.005,0.083,0.022,lcd)
|
| 135 |
+
digit('zero_right',0.021,0.083,0.022,lcd)
|
| 136 |
+
create_cylinder_axis('decimal_point',(0.013,0.0718,0.03968),0.001,0.000025,'z',lcd,vertices=32)
|
| 137 |
+
font=bpy.data.curves.new('kg_lettering','FONT'); font.body='kg'; font.size=0.0088; font.extrude=0.00001; font.resolution_u=8
|
| 138 |
+
text=bpy.data.objects.new('kg_label',font); bpy.context.collection.objects.link(text); text.location=(0.030,0.072,0.03967); assign_material(text,lcd); convert_to_mesh(text)
|
| 139 |
+
### End Part ###
|
| 140 |
+
|
| 141 |
+
### Part: button_well_left ###
|
| 142 |
+
well('button_well_left',-0.03)
|
| 143 |
+
### End Part ###
|
| 144 |
+
### Part: button_well_middle ###
|
| 145 |
+
well('button_well_middle',0)
|
| 146 |
+
### End Part ###
|
| 147 |
+
### Part: button_well_right ###
|
| 148 |
+
well('button_well_right',0.03)
|
| 149 |
+
### End Part ###
|
| 150 |
+
### Part: button_left ###
|
| 151 |
+
button('button_left',-0.03)
|
| 152 |
+
### End Part ###
|
| 153 |
+
### Part: button_middle ###
|
| 154 |
+
button('button_middle',0)
|
| 155 |
+
### End Part ###
|
| 156 |
+
### Part: button_right ###
|
| 157 |
+
button('button_right',0.03)
|
| 158 |
+
### End Part ###
|
| 159 |
+
|
| 160 |
+
### Part: foot_fl ###
|
| 161 |
+
foot('foot_fl',-0.131,-0.096)
|
| 162 |
+
### End Part ###
|
| 163 |
+
### Part: foot_fr ###
|
| 164 |
+
foot('foot_fr',0.131,-0.096)
|
| 165 |
+
### End Part ###
|
| 166 |
+
### Part: foot_rl ###
|
| 167 |
+
foot('foot_rl',-0.131,0.096)
|
| 168 |
+
### End Part ###
|
| 169 |
+
### Part: foot_rr ###
|
| 170 |
+
foot('foot_rr',0.131,0.096)
|
| 171 |
+
### End Part ###
|
| 172 |
+
|
| 173 |
+
### Part: socket ###
|
| 174 |
+
black=mat('port_dark_interior',(0.006,0.008,0.008),0,0.45)
|
| 175 |
+
metal=mat('port_metal_lip',(0.22,0.23,0.23),0.8,0.3)
|
| 176 |
+
create_rounded_box('socket_cavity',(0.155,0.026,0.0255),(0.004,0.0137,0.0052),0.0017,black)
|
| 177 |
+
points=[]
|
| 178 |
+
for yy,zz,z_unused in rounded_rect_points(0.013,0.0047,0.0021,segments=12):
|
| 179 |
+
points.append((0.1597,0.026+yy,0.0255+zz))
|
| 180 |
+
create_curve_tube('socket_lip',points,0.00025,metal,cyclic=True)
|
| 181 |
+
create_rounded_box('socket_tongue',(0.1575,0.026,0.0255),(0.0015,0.0092,0.0007),0.00025,black)
|
| 182 |
+
### End Part ###
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/articulation.blend
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:708a00431f7d63b7be6eeeefad9d4922fb9aebd5525845bcdc555a639a344a4b
|
| 3 |
+
size 2679608
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/articulation.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/meta.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"object_id": "ml_household_alarm_clock-4d013fe6e3--00001",
|
| 3 |
+
"category": "ml_household_alarm_clock",
|
| 4 |
+
"category_name": "Alarm clock",
|
| 5 |
+
"domain": "Measurement, scientific instrumentation and laboratories",
|
| 6 |
+
"family": "Household and office clocks",
|
| 7 |
+
"subfamily": "Alarm clocks",
|
| 8 |
+
"part_count": 3,
|
| 9 |
+
"joint_count": 2,
|
| 10 |
+
"material_categories": [
|
| 11 |
+
"glass",
|
| 12 |
+
"plastic",
|
| 13 |
+
"rubber"
|
| 14 |
+
]
|
| 15 |
+
}
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/object.glb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d890a390875e35ead064e728d418057336b197933e486817a1abc86db659080
|
| 3 |
+
size 5550212
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/object.urdf
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version='1.0' encoding='utf-8'?>
|
| 2 |
+
<robot name="source_motion_hypothesis">
|
| 3 |
+
<link name="clock_body">
|
| 4 |
+
<visual>
|
| 5 |
+
<origin xyz="0 0 0" rpy="1.5707963267948966 0 0" />
|
| 6 |
+
<geometry>
|
| 7 |
+
<mesh filename="parts/clock_body.glb" />
|
| 8 |
+
</geometry>
|
| 9 |
+
</visual>
|
| 10 |
+
</link>
|
| 11 |
+
<link name="snooze">
|
| 12 |
+
<visual>
|
| 13 |
+
<origin xyz="0 0 0" rpy="1.5707963267948966 0 0" />
|
| 14 |
+
<geometry>
|
| 15 |
+
<mesh filename="parts/snooze.glb" />
|
| 16 |
+
</geometry>
|
| 17 |
+
</visual>
|
| 18 |
+
</link>
|
| 19 |
+
<link name="adjustment_dial">
|
| 20 |
+
<visual>
|
| 21 |
+
<origin xyz="0 0 0" rpy="1.5707963267948966 0 0" />
|
| 22 |
+
<geometry>
|
| 23 |
+
<mesh filename="parts/adjustment_dial.glb" />
|
| 24 |
+
</geometry>
|
| 25 |
+
</visual>
|
| 26 |
+
</link>
|
| 27 |
+
<joint name="snooze_press" type="prismatic">
|
| 28 |
+
<parent link="clock_body" />
|
| 29 |
+
<child link="snooze" />
|
| 30 |
+
<origin xyz="-0.10499999672174454 -0.0010000001899898052 0.05600000184774398" rpy="0.0 0.0 0.0" />
|
| 31 |
+
<axis xyz="0.0 0.0 -1.0" />
|
| 32 |
+
<limit lower="0.0" upper="0.0015" effort="0.0" velocity="0.0" />
|
| 33 |
+
</joint>
|
| 34 |
+
<joint name="dial_rotation" type="revolute">
|
| 35 |
+
<parent link="clock_body" />
|
| 36 |
+
<child link="adjustment_dial" />
|
| 37 |
+
<origin xyz="3.2782554587607038e-09 -1.899898051382909e-10 1.8477439855946187e-09" rpy="0.0 0.0 0.0" />
|
| 38 |
+
<axis xyz="1.0 0.0 0.0" />
|
| 39 |
+
<limit lower="0.0" upper="6.283185307179586" effort="0.0" velocity="0.0" />
|
| 40 |
+
</joint>
|
| 41 |
+
</robot>
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/object.usdz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e8a280a5b064bd559fa746f4b3f2deeae8bfef5f47db51ffaf643363c5e2f75
|
| 3 |
+
size 5482853
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/parts/adjustment_dial.glb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f99a8b3ca10d66a83f4b7d2c4b2216e659e565761ea90ac28909433d4f64d557
|
| 3 |
+
size 4747580
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/parts/clock_body.glb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77d6b3909cdb3509964c620af4963f715244dc6bfdba5865c0868748b498caf7
|
| 3 |
+
size 3602568
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/parts/snooze.glb
ADDED
|
Binary file (42 kB). View file
|
|
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/renders/front.png
ADDED
|
Git LFS Details
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/renders/isometric.png
ADDED
|
Git LFS Details
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/renders/side.png
ADDED
|
Git LFS Details
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/renders/top.png
ADDED
|
Git LFS Details
|
objects/ml_household_alarm_clock-4d013fe6e3--00001/static.py
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import bpy
|
| 2 |
+
import bmesh
|
| 3 |
+
import math
|
| 4 |
+
from mathutils import Vector
|
| 5 |
+
|
| 6 |
+
PROVENANCE_TIERS = {'housing':'observed','dial fixed bearing':'observed','button':'observed','dial':'observed','dial_spindle':'inferred','display':'observed','feet':'observed'}
|
| 7 |
+
WALL = 0.003
|
| 8 |
+
TILT = 0.1877619465
|
| 9 |
+
FACE_CENTER = (0.0, -0.0506, 0.078)
|
| 10 |
+
|
| 11 |
+
def mat(name, color, roughness=0.4, metallic=0.0, specular=0.5):
|
| 12 |
+
material=build_principled_material(name, base_color=(*color,1), roughness=roughness, metallic=metallic)
|
| 13 |
+
material.diffuse_color=(*color,1)
|
| 14 |
+
for node in material.node_tree.nodes:
|
| 15 |
+
if node.type=='BSDF_PRINCIPLED':
|
| 16 |
+
for link in list(material.node_tree.links):
|
| 17 |
+
if link.to_node==node and link.to_socket==node.inputs['Base Color']:
|
| 18 |
+
material.node_tree.links.remove(link)
|
| 19 |
+
node.inputs['Base Color'].default_value=(*color,1)
|
| 20 |
+
node.inputs['Roughness'].default_value=roughness
|
| 21 |
+
node.inputs['Metallic'].default_value=metallic
|
| 22 |
+
node.inputs['Specular IOR Level'].default_value=specular
|
| 23 |
+
return material
|
| 24 |
+
|
| 25 |
+
def fix_normals(mesh):
|
| 26 |
+
bm=bmesh.new()
|
| 27 |
+
bm.from_mesh(mesh)
|
| 28 |
+
bmesh.ops.recalc_face_normals(bm,faces=list(bm.faces))
|
| 29 |
+
bm.to_mesh(mesh)
|
| 30 |
+
bm.free()
|
| 31 |
+
mesh.update()
|
| 32 |
+
|
| 33 |
+
def difference(obj, tool):
|
| 34 |
+
bpy.context.view_layer.objects.active = obj
|
| 35 |
+
mod = obj.modifiers.new('precision cavity','BOOLEAN')
|
| 36 |
+
mod.operation = 'DIFFERENCE'
|
| 37 |
+
mod.solver = 'EXACT'
|
| 38 |
+
mod.object = tool
|
| 39 |
+
bpy.ops.object.modifier_apply(modifier=mod.name)
|
| 40 |
+
bpy.data.objects.remove(tool, do_unlink=True)
|
| 41 |
+
|
| 42 |
+
def deform_body(obj):
|
| 43 |
+
normalize_object(obj)
|
| 44 |
+
for v in obj.data.vertices:
|
| 45 |
+
p = obj.matrix_world @ v.co
|
| 46 |
+
t = (p.z - 0.005) / 0.14
|
| 47 |
+
p.x *= (1.0 - 0.035*t)
|
| 48 |
+
p.y = p.y*(1.0-0.135*(p.z-0.075)/0.058) + 0.055*(p.z-0.075)
|
| 49 |
+
v.co = obj.matrix_world.inverted() @ p
|
| 50 |
+
obj.data.update()
|
| 51 |
+
|
| 52 |
+
def face_point(x,z,offset=0.0):
|
| 53 |
+
return (x, FACE_CENTER[1]+math.sin(TILT)*z-math.cos(TILT)*offset, FACE_CENTER[2]+math.cos(TILT)*z+math.sin(TILT)*offset)
|
| 54 |
+
|
| 55 |
+
def polygon_face(name, coords, offset, material, thickness=0.00012):
|
| 56 |
+
front=[face_point(x,z,offset) for x,z in coords]
|
| 57 |
+
back=[face_point(x,z,offset-thickness) for x,z in coords]
|
| 58 |
+
n=len(coords)
|
| 59 |
+
mesh=bpy.data.meshes.new(name+' mesh')
|
| 60 |
+
mesh.from_pydata(front+back,[],[tuple(range(n-1,-1,-1)),tuple(range(n,n*2))]+[(i,(i+1)%n,(i+1)%n+n,i+n) for i in range(n)])
|
| 61 |
+
mesh.update()
|
| 62 |
+
fix_normals(mesh)
|
| 63 |
+
obj=bpy.data.objects.new(name,mesh)
|
| 64 |
+
bpy.context.collection.objects.link(obj)
|
| 65 |
+
assign_material(obj,material)
|
| 66 |
+
return obj
|
| 67 |
+
|
| 68 |
+
def face_box(name,x,z,w,h,depth,offset,material,radius):
|
| 69 |
+
if isinstance(radius,tuple):
|
| 70 |
+
rt,rb=radius
|
| 71 |
+
pts=[]
|
| 72 |
+
for cx,cz,r,a0 in [(w/2-rb,-h/2+rb,rb,-90),(w/2-rt,h/2-rt,rt,0),(-w/2+rt,h/2-rt,rt,90),(-w/2+rb,-h/2+rb,rb,180)]:
|
| 73 |
+
for i in range(17):
|
| 74 |
+
a=math.radians(a0+90*i/16)
|
| 75 |
+
pts.append((cx+r*math.cos(a),cz+r*math.sin(a)))
|
| 76 |
+
else:
|
| 77 |
+
pts=rounded_rect_points(w,h,radius,segments=16)
|
| 78 |
+
return polygon_face(name,[(p[0]+x,p[1]+z) for p in pts],offset+depth/2,material,depth)
|
| 79 |
+
|
| 80 |
+
def rounded_xy(name,loc,dims,radius,material,bevel=0.0005):
|
| 81 |
+
pts=rounded_rect_points(dims[0],dims[1],radius,segments=16)
|
| 82 |
+
n=len(pts)
|
| 83 |
+
verts=[(loc[0]+p[0],loc[1]+p[1],loc[2]+s*dims[2]/2) for s in [-1,1] for p in pts]
|
| 84 |
+
faces=[tuple(range(n-1,-1,-1)),tuple(range(n,n*2))]+[(i,(i+1)%n,(i+1)%n+n,i+n) for i in range(n)]
|
| 85 |
+
mesh=bpy.data.meshes.new(name+' mesh'); mesh.from_pydata(verts,[],faces); mesh.update(); fix_normals(mesh)
|
| 86 |
+
obj=bpy.data.objects.new(name,mesh); bpy.context.collection.objects.link(obj); assign_material(obj,material)
|
| 87 |
+
if bevel>0:
|
| 88 |
+
mod=obj.modifiers.new('edge softness','BEVEL'); mod.width=bevel; mod.segments=3
|
| 89 |
+
finalize_mesh_object(obj)
|
| 90 |
+
return obj
|
| 91 |
+
|
| 92 |
+
def digit(name,x,z,w,h,character,material,offset=0.00122):
|
| 93 |
+
t=w*0.205
|
| 94 |
+
gap=t*0.12
|
| 95 |
+
x0=x-w/2; x1=x+w/2; y0=z-h/2; y1=z+h/2; ym=z
|
| 96 |
+
polys={
|
| 97 |
+
'a':[(x0+gap,y1-t/2),(x0+t,y1),(x1-t,y1),(x1-gap,y1-t/2),(x1-t,y1-t),(x0+t,y1-t)],
|
| 98 |
+
'g':[(x0+gap,ym),(x0+t,ym+t/2),(x1-t,ym+t/2),(x1-gap,ym),(x1-t,ym-t/2),(x0+t,ym-t/2)],
|
| 99 |
+
'd':[(x0+gap,y0+t/2),(x0+t,y0+t),(x1-t,y0+t),(x1-gap,y0+t/2),(x1-t,y0),(x0+t,y0)],
|
| 100 |
+
'f':[(x0,y1-t/2-gap),(x0+t,y1-t-gap),(x0+t,ym+t),(x0+t/2,ym+gap),(x0,ym+t/2)],
|
| 101 |
+
'b':[(x1,y1-t/2-gap),(x1,ym+t/2),(x1-t/2,ym+gap),(x1-t,ym+t),(x1-t,y1-t-gap)],
|
| 102 |
+
'e':[(x0,ym-t/2),(x0+t/2,ym-gap),(x0+t,ym-t),(x0+t,y0+t+gap),(x0,y0+t/2+gap)],
|
| 103 |
+
'c':[(x1,ym-t/2),(x1,y0+t/2+gap),(x1-t,y0+t+gap),(x1-t,ym-t),(x1-t/2,ym-gap)]}
|
| 104 |
+
active={'0':'abcdef','3':'abgcd','6':'afgecd','7':'abc'}[character]
|
| 105 |
+
for key in active:
|
| 106 |
+
coords=[(px+0.065*(pz-z),pz) for px,pz in polys[key]]
|
| 107 |
+
polygon_face(name+' segment '+key,coords,offset,material)
|
| 108 |
+
|
| 109 |
+
def face_tube(name,coords,r,offset,material):
|
| 110 |
+
return create_curve_tube(name,[face_point(x,z,offset) for x,z in coords],r,material,bevel_resolution=4)
|
| 111 |
+
|
| 112 |
+
def knurled_dial(name,x0,x1,y,z,r,material):
|
| 113 |
+
n=288
|
| 114 |
+
rings=[(x0,r-0.001),(x0+0.0009,r),(x1-0.0008,r),(x1,r-0.0009)]
|
| 115 |
+
verts=[]
|
| 116 |
+
for x,rad in rings:
|
| 117 |
+
for i in range(n):
|
| 118 |
+
a=2*math.pi*i/n
|
| 119 |
+
rr=rad-(0.00065 if i%3==0 else 0)
|
| 120 |
+
verts.append((x,y+rr*math.sin(a),z+rr*math.cos(a)))
|
| 121 |
+
faces=[]
|
| 122 |
+
for k in range(len(rings)-1):
|
| 123 |
+
for i in range(n):
|
| 124 |
+
j=(i+1)%n
|
| 125 |
+
faces.append((k*n+i,k*n+j,(k+1)*n+j,(k+1)*n+i))
|
| 126 |
+
faces.append(tuple(range(n-1,-1,-1)))
|
| 127 |
+
faces.append(tuple((len(rings)-1)*n+i for i in range(n)))
|
| 128 |
+
mesh=bpy.data.meshes.new(name+' mesh'); mesh.from_pydata(verts,[],faces); mesh.update(); fix_normals(mesh)
|
| 129 |
+
obj=bpy.data.objects.new(name,mesh); bpy.context.collection.objects.link(obj); assign_material(obj,material)
|
| 130 |
+
bevel=obj.modifiers.new('soft knurl edges','BEVEL'); bevel.width=0.00012; bevel.segments=2
|
| 131 |
+
bevel.limit_method='ANGLE'; bevel.angle_limit=0.35
|
| 132 |
+
finalize_mesh_object(obj,shade_smooth=False)
|
| 133 |
+
return obj
|
| 134 |
+
|
| 135 |
+
### Part: housing ###
|
| 136 |
+
housing_mat=mat('warm grey taupe molded polymer',(0.13,0.119,0.107),0.53,specular=0.22)
|
| 137 |
+
black=mat('dark graphite fixed trim',(0.018,0.020,0.019),0.33)
|
| 138 |
+
body=create_rounded_box('housing',(0,0,0.075),(0.214,0.104,0.14),0.017,housing_mat,segments=16)
|
| 139 |
+
finalize_mesh_object(body)
|
| 140 |
+
deform_body(body)
|
| 141 |
+
inner=create_rounded_box('cutter_internal',(0,0.001,0.074),(0.195,0.070,0.119),0.014,housing_mat,segments=12)
|
| 142 |
+
difference(body,inner)
|
| 143 |
+
recess=face_box('cutter_display_recess',0,0,0.195,0.105,0.013,-0.0045,housing_mat,(0.018,0.009))
|
| 144 |
+
difference(body,recess)
|
| 145 |
+
button_cut=rounded_xy('cutter_button_recess',(0,0.003,0.147),(0.108,0.043,0.022),0.011,housing_mat,0.0003)
|
| 146 |
+
difference(body,button_cut)
|
| 147 |
+
shaft_cut=create_cylinder_axis('cutter_dial_bore',(0.107,0.004,0.091),0.0031,0.024,'x',black,vertices=48)
|
| 148 |
+
difference(body,shaft_cut)
|
| 149 |
+
bezel=create_cylinder_axis('dial fixed bearing',(0.105,0.004,0.091),0.0215,0.009,'x',black,vertices=96)
|
| 150 |
+
bezel_hole=create_cylinder_axis('cutter_bezel_bore',(0.105,0.004,0.091),0.0031,0.015,'x',black,vertices=48)
|
| 151 |
+
difference(bezel,bezel_hole)
|
| 152 |
+
for row,count in enumerate([4,5,6,6,5]):
|
| 153 |
+
z=0.052-row*0.0042
|
| 154 |
+
for col in range(count):
|
| 155 |
+
yy=0.002+(col-(count-1)/2)*0.0046
|
| 156 |
+
hole=create_cylinder_axis('cutter_speaker_%d_%d'%(row,col),(0.104,yy,z),0.00108,0.021,'x',black,vertices=20)
|
| 157 |
+
difference(body,hole)
|
| 158 |
+
for mod in list(body.modifiers):
|
| 159 |
+
body.modifiers.remove(mod)
|
| 160 |
+
bpy.context.view_layer.objects.active=body
|
| 161 |
+
bpy.ops.object.select_all(action='DESELECT')
|
| 162 |
+
body.select_set(True)
|
| 163 |
+
if body.data.has_custom_normals:
|
| 164 |
+
bpy.ops.mesh.customdata_custom_splitnormals_clear()
|
| 165 |
+
bm=bmesh.new()
|
| 166 |
+
bm.from_mesh(body.data)
|
| 167 |
+
bmesh.ops.triangulate(bm,faces=list(bm.faces))
|
| 168 |
+
bmesh.ops.recalc_face_normals(bm,faces=list(bm.faces))
|
| 169 |
+
bm.to_mesh(body.data)
|
| 170 |
+
bm.free()
|
| 171 |
+
for poly in body.data.polygons:
|
| 172 |
+
poly.use_smooth=abs(poly.normal.x)<0.995
|
| 173 |
+
weighted=body.modifiers.new('stable weighted normals','WEIGHTED_NORMAL')
|
| 174 |
+
weighted.keep_sharp=True
|
| 175 |
+
weighted.weight=50
|
| 176 |
+
### End Part ###
|
| 177 |
+
|
| 178 |
+
### Part: display ###
|
| 179 |
+
trim=mat('glass edge gasket',(0.008,0.010,0.010),0.29)
|
| 180 |
+
face_box('display gasket',0,0,0.194,0.104,0.004,-0.0017,trim,(0.0175,0.0085))
|
| 181 |
+
glass=mat('smoked glossy black display',(0.0016,0.0019,0.0019),0.18)
|
| 182 |
+
face_box('black display lens',0,0,0.1925,0.1025,0.002,0.0001,glass,(0.017,0.008))
|
| 183 |
+
lcd=build_principled_material('pale sage illuminated LCD',base_color=(0.55,0.64,0.45,1),roughness=0.4,emission_strength=0.25)
|
| 184 |
+
digit('time seven',-0.040,0.003,0.025,0.054,'7',lcd)
|
| 185 |
+
digit('time zero left',-0.004,0.003,0.027,0.054,'0',lcd)
|
| 186 |
+
digit('time zero right',0.027,0.003,0.027,0.054,'0',lcd)
|
| 187 |
+
for z in [-0.008,0.014]:
|
| 188 |
+
create_cylinder_axis('main colon '+str(z),face_point(-0.0225,z,0.00122),0.0030,0.00015,(0,-math.cos(TILT),math.sin(TILT)),lcd,vertices=40)
|
| 189 |
+
for x,ch in [(0.058,'6'),(0.070,'3'),(0.081,'0')]:
|
| 190 |
+
digit('alarm '+ch+str(x),x,-0.017,0.0083,0.0155,ch,lcd)
|
| 191 |
+
for z in [-0.0135,-0.020]:
|
| 192 |
+
create_cylinder_axis('alarm colon '+str(z),face_point(0.0639,z,0.00122),0.0009,0.00015,(0,-math.cos(TILT),math.sin(TILT)),lcd,vertices=24)
|
| 193 |
+
bell=[(0.0605,0.007),(0.062,0.009),(0.063,0.014),(0.065,0.016),(0.068,0.017),(0.071,0.016),(0.073,0.014),(0.074,0.009),(0.0755,0.007),(0.0605,0.007)]
|
| 194 |
+
face_tube('alarm bell outline',bell,0.00065,0.0013,lcd)
|
| 195 |
+
face_tube('alarm bell clapper',[(0.066,0.0065),(0.068,0.0055),(0.070,0.0065)],0.0007,0.0013,lcd)
|
| 196 |
+
face_tube('bell ringing left',[(0.060,0.0145),(0.0608,0.017),(0.0625,0.0185)],0.00065,0.0013,lcd)
|
| 197 |
+
face_tube('bell ringing right',[(0.074,0.0185),(0.0755,0.017),(0.0765,0.0145)],0.00065,0.0013,lcd)
|
| 198 |
+
### End Part ###
|
| 199 |
+
|
| 200 |
+
### Part: feet ###
|
| 201 |
+
rubber=build_rich_material('rubber feet',material_class='rubber',base_color=(0.014,0.016,0.015,1),roughness=0.67)
|
| 202 |
+
for x in [-0.084,0.084]:
|
| 203 |
+
for y in [-0.043,0.041]:
|
| 204 |
+
foot=create_cylinder_axis('rubber foot '+str(x)+' '+str(y),(x,y,0.004),0.011,0.008,'z',rubber,vertices=64)
|
| 205 |
+
edge=foot.modifiers.new('rounded foot rim','BEVEL')
|
| 206 |
+
edge.width=0.0018
|
| 207 |
+
edge.segments=4
|
| 208 |
+
finalize_mesh_object(foot)
|
| 209 |
+
### End Part ###
|
| 210 |
+
|
| 211 |
+
### Part: button ###
|
| 212 |
+
button_mat=mat('taupe snooze button',(0.135,0.123,0.111),0.50,specular=0.22)
|
| 213 |
+
rounded_xy('top snooze button',(0,0.003,0.147),(0.1065,0.0415,0.010),0.011,button_mat,0.0012)
|
| 214 |
+
### End Part ###
|
| 215 |
+
|
| 216 |
+
### Part: dial ###
|
| 217 |
+
dial_mat=build_rich_material('charcoal dial polymer',material_class='plastic',base_color=(0.025,0.029,0.028,1),roughness=0.42,normal_strength=0.07,texture_scale=300)
|
| 218 |
+
knurled_dial('knurled adjustment dial',0.110,0.1255,0.004,0.091,0.027,dial_mat)
|
| 219 |
+
create_cylinder_axis('dial_spindle',(0.1065,0.004,0.091),0.0027,0.014,'x',dial_mat,vertices=48)
|
| 220 |
+
indicator=mat('ivory dial index',(0.78,0.81,0.71),0.46)
|
| 221 |
+
create_rounded_box('dial index',(0.12565,0.004,0.1118),(0.0004,0.0014,0.0065),0.00065,indicator,segments=8)
|
| 222 |
+
### End Part ###
|
objects/ml_indoor_thermohygrometer-ea60477935--00001/articulation.blend
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba5bf60dd29be9b1b06e1429736447396517a64ff938f0206d178a777fb18ccb
|
| 3 |
+
size 17346018
|
objects/ml_indoor_thermohygrometer-ea60477935--00001/articulation.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
objects/ml_indoor_thermohygrometer-ea60477935--00001/meta.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"object_id": "ml_indoor_thermohygrometer-ea60477935--00001",
|
| 3 |
+
"category": "ml_indoor_thermohygrometer",
|
| 4 |
+
"category_name": "Indoor thermometer or hygrometer with rigid mechanisms",
|
| 5 |
+
"domain": "Measurement, scientific instrumentation and laboratories",
|
| 6 |
+
"family": "Household environmental instruments",
|
| 7 |
+
"subfamily": "Indoor thermometers and hygrometers",
|
| 8 |
+
"part_count": 2,
|
| 9 |
+
"joint_count": 1,
|
| 10 |
+
"material_categories": [
|
| 11 |
+
"metal",
|
| 12 |
+
"plastic"
|
| 13 |
+
]
|
| 14 |
+
}
|