Adds sensor models
This commit is contained in:
parent
817b87a2eb
commit
7fe061adfe
|
@ -0,0 +1,122 @@
|
|||
// Flex Sensor - units in cm
|
||||
|
||||
width=40;
|
||||
min_width=5;
|
||||
height=0.1;
|
||||
length=100;
|
||||
gap=2;
|
||||
struts=0;
|
||||
strut_height=height;
|
||||
endcap_run_ratio=0.5; /* How large are joined sections compared to run
|
||||
width */
|
||||
|
||||
term_diameter = 1.628;
|
||||
term_side = sqrt(term_diameter*term_diameter/2);
|
||||
term_distance = 5;
|
||||
term_offset = 15;
|
||||
|
||||
nozzle_width = 0.4;
|
||||
|
||||
sewable = 0;
|
||||
|
||||
$fn = 100;
|
||||
|
||||
// DNE
|
||||
leg_width = (width - gap) / 2;
|
||||
gap_span = leg_width*2+gap;
|
||||
|
||||
module cap_model () {
|
||||
difference () {
|
||||
circle(width / 2);
|
||||
translate([-width / 2, -width])
|
||||
square(width);
|
||||
}
|
||||
}
|
||||
|
||||
module Cap () {
|
||||
translate([width / 2, length - width / 2, 0])
|
||||
difference () {
|
||||
linear_extrude (height)
|
||||
cap_model();
|
||||
translate([0, 0, 0.2])
|
||||
difference () {
|
||||
linear_extrude (height)
|
||||
offset(r=-0.5)
|
||||
cap_model();
|
||||
linear_extrude (height)
|
||||
offset(r=-1)
|
||||
cap_model();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module Leg() {
|
||||
term1_x = abs(width - term_distance) / 2;
|
||||
t_total_width = min_width;
|
||||
difference () {
|
||||
union () {
|
||||
linear_extrude(height)
|
||||
polygon([[0, length - width / 2], [leg_width, length - width / 2],
|
||||
[term1_x + term_side / 2 + gap/2, 0],
|
||||
[term1_x + term_side / 2 + gap/2 - min_width, 0]]);
|
||||
translate([term1_x + term_side / 2 - min_width + gap/2, 0, 0])
|
||||
cube([min_width, 2, term_side/2]);
|
||||
linear_extrude(term_side/2)
|
||||
polygon([[term1_x - term_side/2, -term_side * 4], [term1_x + term_side / 2 + gap/2, 0],
|
||||
[term1_x + term_side / 2 +gap / 2 - min_width, 0]]);
|
||||
|
||||
}
|
||||
translate([0,0, 0.2])
|
||||
difference () {
|
||||
linear_extrude (height)
|
||||
offset(r=-0.5)
|
||||
polygon([[0, length - width / 2], [leg_width, length - width / 2],
|
||||
[term1_x + term_side / 2 + gap/2, 0],
|
||||
[term1_x + term_side / 2 + gap/2 - min_width, 0]]);
|
||||
|
||||
linear_extrude (height)
|
||||
offset(r=-1)
|
||||
polygon([[0, length - width / 2], [leg_width, length - width / 2],
|
||||
[term1_x + term_side / 2 + gap/2, 0],
|
||||
[term1_x + term_side / 2 + gap/2 - min_width, 0]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module Terminal() {
|
||||
translate([-term_side/2, 0, 0])
|
||||
cube([term_side, term_offset, term_side]);
|
||||
}
|
||||
|
||||
module Terminals() {
|
||||
Terminal();
|
||||
translate([term_distance, 0, 0])
|
||||
Terminal();
|
||||
}
|
||||
|
||||
union() {
|
||||
// Legs
|
||||
union () {
|
||||
Leg();
|
||||
translate([width, 0, 0])
|
||||
mirror()
|
||||
Leg();
|
||||
}
|
||||
|
||||
// Terminals
|
||||
translate([-(term_distance-width)/2, -term_offset, 0])
|
||||
Terminals();
|
||||
|
||||
Cap();
|
||||
|
||||
|
||||
// End Support
|
||||
*translate([0, length-leg_width/4, 0])
|
||||
cube([gap_span, leg_width/4, height*1.5]);
|
||||
|
||||
// Edge Supports
|
||||
*cube([nozzle_width, length, height * 1.5]);
|
||||
*translate([width - nozzle_width, 0, 0])
|
||||
cube([nozzle_width, length, height * 1.5]);
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,122 @@
|
|||
// Flex Sensor - units in cm
|
||||
|
||||
width=40;
|
||||
min_width=5;
|
||||
height=2;
|
||||
length=100;
|
||||
gap=2;
|
||||
struts=0;
|
||||
strut_height=height;
|
||||
endcap_run_ratio=0.5; /* How large are joined sections compared to run
|
||||
width */
|
||||
|
||||
term_diameter = 1.628;
|
||||
term_side = sqrt(term_diameter*term_diameter/2);
|
||||
term_distance = 5;
|
||||
term_offset = 15;
|
||||
|
||||
nozzle_width = 0.4;
|
||||
|
||||
sewable = 0;
|
||||
|
||||
$fn = 100;
|
||||
|
||||
// DNE
|
||||
leg_width = (width - gap) / 2;
|
||||
gap_span = leg_width*2+gap;
|
||||
|
||||
module cap_model () {
|
||||
difference () {
|
||||
circle(width / 2);
|
||||
translate([-width / 2, -width])
|
||||
square(width);
|
||||
}
|
||||
}
|
||||
|
||||
module Cap () {
|
||||
translate([width / 2, length - width / 2, 0])
|
||||
difference () {
|
||||
linear_extrude (height)
|
||||
cap_model();
|
||||
translate([0, 0, 0.2])
|
||||
difference () {
|
||||
linear_extrude (height)
|
||||
offset(r=-0.5)
|
||||
cap_model();
|
||||
linear_extrude (height)
|
||||
offset(r=-1)
|
||||
cap_model();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module Leg() {
|
||||
term1_x = abs(width - term_distance) / 2;
|
||||
t_total_width = min_width;
|
||||
difference () {
|
||||
union () {
|
||||
linear_extrude(height)
|
||||
polygon([[0, length - width / 2], [leg_width, length - width / 2],
|
||||
[term1_x + term_side / 2 + gap/2, 0],
|
||||
[term1_x + term_side / 2 + gap/2 - min_width, 0]]);
|
||||
translate([term1_x + term_side / 2 - min_width + gap/2, 0, 0])
|
||||
cube([min_width, 2, term_side/2]);
|
||||
linear_extrude(term_side/2)
|
||||
polygon([[term1_x - term_side/2, -term_side * 4], [term1_x + term_side / 2 + gap/2, 0],
|
||||
[term1_x + term_side / 2 +gap / 2 - min_width, 0]]);
|
||||
|
||||
}
|
||||
translate([0,0, 0.2])
|
||||
difference () {
|
||||
linear_extrude (height)
|
||||
offset(r=-0.5)
|
||||
polygon([[0, length - width / 2], [leg_width, length - width / 2],
|
||||
[term1_x + term_side / 2 + gap/2, 0],
|
||||
[term1_x + term_side / 2 + gap/2 - min_width, 0]]);
|
||||
|
||||
linear_extrude (height)
|
||||
offset(r=-1)
|
||||
polygon([[0, length - width / 2], [leg_width, length - width / 2],
|
||||
[term1_x + term_side / 2 + gap/2, 0],
|
||||
[term1_x + term_side / 2 + gap/2 - min_width, 0]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module Terminal() {
|
||||
translate([-term_side/2, 0, 0])
|
||||
cube([term_side, term_offset, term_side]);
|
||||
}
|
||||
|
||||
module Terminals() {
|
||||
Terminal();
|
||||
translate([term_distance, 0, 0])
|
||||
Terminal();
|
||||
}
|
||||
|
||||
union() {
|
||||
// Legs
|
||||
union () {
|
||||
Leg();
|
||||
translate([width, 0, 0])
|
||||
mirror()
|
||||
Leg();
|
||||
}
|
||||
|
||||
// Terminals
|
||||
translate([-(term_distance-width)/2, -term_offset, 0])
|
||||
Terminals();
|
||||
|
||||
Cap();
|
||||
|
||||
|
||||
// End Support
|
||||
*translate([0, length-leg_width/4, 0])
|
||||
cube([gap_span, leg_width/4, height*1.5]);
|
||||
|
||||
// Edge Supports
|
||||
*cube([nozzle_width, length, height * 1.5]);
|
||||
*translate([width - nozzle_width, 0, 0])
|
||||
cube([nozzle_width, length, height * 1.5]);
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue