diff --git a/src/export.scad b/src/export.scad new file mode 100644 index 0000000..cd91e19 --- /dev/null +++ b/src/export.scad @@ -0,0 +1,34 @@ +/* +export=0; // <-- prepend to the main file to activate the export +*/ + +function is_not_export() = is_undef(export) || export == 0; +function is_export() = !is_not_export(); +function is_model_strict(m) = is_export() && export == m; +function is_model(m) = is_not_export() || export == m; + +MODEL_DEMO=0; + +// Harness +MODEL_HARNESS_LEFT=101; +MODEL_HARNESS_RIGHT=102; +MODEL_HARNESS_BOTTOM=103; +MODEL_HARNESS_BOTTOM_PIP=104; +MODEL_HARNESS_TOP=105; +MODEL_HARNESS_SLIDER_FRONT=106; +MODEL_HARNESS_SLIDER_BACK=107; +MODEL_HARNESS_BUTTONS=108; + +// Platform +MODEL_STRAP_PLATFORM_BASE=210; +MODEL_STRAP_PLATFORM_RIB=211; +MODEL_STRAP_PLATFORM_RIB_BRACE=212; +MODEL_STRAP_SECONDARY=213; + +// Strap +MODEL_LINKS=301; +MODEL_CLIP_A=302; +MODEL_CLIP_B=303; +MODEL_CLIP_RATCHETING=304; +MODEL_CLIP_RATCHETING_A=305; +MODEL_CLIP_RATCHETING_B=306; diff --git a/main.scad b/src/harness.scad similarity index 96% rename from main.scad rename to src/harness.scad index bd66a22..a5fe90d 100644 --- a/main.scad +++ b/src/harness.scad @@ -1,3 +1,5 @@ +include + // dependency: https://github.com/revarbat/BOSL include use @@ -12,21 +14,6 @@ XRAY_BACKPLANE=2; XRAY_BOTTOM=3; //xray = 2; -// EXPORT: -MODEL_HARNESS_LEFT=1; -MODEL_HARNESS_RIGHT=2; -MODEL_HARNESS_BOTTOM=3; -MODEL_HARNESS_BOTTOM_PIP=4; -MODEL_HARNESS_TOP=5; -MODEL_HARNESS_SLIDER_FRONT=6; -MODEL_HARNESS_SLIDER_BACK=7; -MODEL_HARNESS_BUTTONS=8; -export=0; // [0:8] -function is_not_export() = is_undef(export) || export == 0; -function is_export() = !is_not_export(); -function is_model_strict(m) = is_export() && export == m; -function is_model(m) = is_not_export() || export == m; - function get_phone_size() = [161.2, 77.2, 10]; function use_slideout_backplane() = is_model_strict(MODEL_HARNESS_BOTTOM_PIP) || is_model_strict(MODEL_HARNESS_LEFT) || is_model_strict(MODEL_HARNESS_RIGHT); diff --git a/src/main.scad b/src/main.scad new file mode 100644 index 0000000..be9b92e --- /dev/null +++ b/src/main.scad @@ -0,0 +1,6 @@ +export=0; +include + +include +include +include diff --git a/strap.scad b/src/platform.scad similarity index 91% rename from strap.scad rename to src/platform.scad index f8cf005..7499a64 100644 --- a/strap.scad +++ b/src/platform.scad @@ -9,17 +9,6 @@ use //validation = 1; //xray = 1; -// EXPORT: -MODEL_STRAP_PLATFORM_BASE=10; -MODEL_STRAP_PLATFORM_RIB=11; -MODEL_STRAP_PLATFORM_RIB_BRACE=12; -MODEL_STRAP_SECONDARY=13; -export=0; // [0:20] -function is_not_export() = is_undef(export) || export == 0; -function is_export() = !is_not_export(); -function is_model_strict(m) = is_export() && export == m; -function is_model(m) = is_not_export() || export == m; - function get_phone_size() = [160, 76.7, 10]; module arm() { diff --git a/strap_link.scad b/src/strap.scad similarity index 96% rename from strap_link.scad rename to src/strap.scad index 14eee30..df58c09 100644 --- a/strap_link.scad +++ b/src/strap.scad @@ -1,14 +1,7 @@ links_count=3; // [1..20] include_terminal=true; // [true,false] -export=0; // [0:6] -MODEL_DEMO=0; -MODEL_LINKS=1; -MODEL_CLIP_A=2; -MODEL_CLIP_B=3; -MODEL_CLIP_RATCHETING=4; -MODEL_CLIP_RATCHETING_A=5; -MODEL_CLIP_RATCHETING_B=6; +include //validation=1; VALIDATE_INTERSECTION=1; @@ -19,11 +12,6 @@ use use include -function is_not_export() = is_undef(export) || export == 0; -function is_export() = !is_not_export(); -function is_model_strict(m) = is_export() && export == m; -function is_model(m) = is_not_export() || export == m; - function get_link_segment_size() = [15, 30, 5]; function get_link_pin_diameter() = 2; function get_link_socket_slack() = [1, 4, 1]; @@ -147,8 +135,8 @@ module clip() { translate(entry_pos) cube(entry_size, center=true); } module joiner(groove) { - slack=groove?0.5:0; - joiner_size=[entry_size.x-6+slack, entry_size.y-6+slack, entry_size.z-4+slack]; + slack=groove?0.2:0; + joiner_size=[entry_size.x-6+slack, entry_size.y-6+slack, entry_size.z-3+slack]; joiner_pos=[entry_pos.x, entry_pos.y, entry_pos.z - entry_size.z/2 + joiner_size.z/2]; translate(joiner_pos) cube(joiner_size, center=true); }