Restructure files into src
This commit is contained in:
parent
f17455be4f
commit
4d0931df73
34
src/export.scad
Normal file
34
src/export.scad
Normal file
@ -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;
|
@ -1,3 +1,5 @@
|
|||||||
|
include <export.scad>
|
||||||
|
|
||||||
// dependency: https://github.com/revarbat/BOSL
|
// dependency: https://github.com/revarbat/BOSL
|
||||||
include <BOSL/constants.scad>
|
include <BOSL/constants.scad>
|
||||||
use <BOSL/transforms.scad>
|
use <BOSL/transforms.scad>
|
||||||
@ -12,21 +14,6 @@ XRAY_BACKPLANE=2;
|
|||||||
XRAY_BOTTOM=3;
|
XRAY_BOTTOM=3;
|
||||||
//xray = 2;
|
//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 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);
|
function use_slideout_backplane() = is_model_strict(MODEL_HARNESS_BOTTOM_PIP) || is_model_strict(MODEL_HARNESS_LEFT) || is_model_strict(MODEL_HARNESS_RIGHT);
|
||||||
|
|
6
src/main.scad
Normal file
6
src/main.scad
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export=0;
|
||||||
|
include <export.scad>
|
||||||
|
|
||||||
|
include <harness.scad>
|
||||||
|
include <platform.scad>
|
||||||
|
include <strap.scad>
|
@ -9,17 +9,6 @@ use <BOSL/sliders.scad>
|
|||||||
//validation = 1;
|
//validation = 1;
|
||||||
//xray = 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];
|
function get_phone_size() = [160, 76.7, 10];
|
||||||
|
|
||||||
module arm() {
|
module arm() {
|
@ -1,14 +1,7 @@
|
|||||||
links_count=3; // [1..20]
|
links_count=3; // [1..20]
|
||||||
include_terminal=true; // [true,false]
|
include_terminal=true; // [true,false]
|
||||||
export=0; // [0:6]
|
|
||||||
|
|
||||||
MODEL_DEMO=0;
|
include <export.scad>
|
||||||
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;
|
|
||||||
|
|
||||||
//validation=1;
|
//validation=1;
|
||||||
VALIDATE_INTERSECTION=1;
|
VALIDATE_INTERSECTION=1;
|
||||||
@ -19,11 +12,6 @@ use <BOSL/transforms.scad>
|
|||||||
use <BOSL/shapes.scad>
|
use <BOSL/shapes.scad>
|
||||||
include <BOSL/constants.scad>
|
include <BOSL/constants.scad>
|
||||||
|
|
||||||
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_segment_size() = [15, 30, 5];
|
||||||
function get_link_pin_diameter() = 2;
|
function get_link_pin_diameter() = 2;
|
||||||
function get_link_socket_slack() = [1, 4, 1];
|
function get_link_socket_slack() = [1, 4, 1];
|
||||||
@ -147,8 +135,8 @@ module clip() {
|
|||||||
translate(entry_pos) cube(entry_size, center=true);
|
translate(entry_pos) cube(entry_size, center=true);
|
||||||
}
|
}
|
||||||
module joiner(groove) {
|
module joiner(groove) {
|
||||||
slack=groove?0.5:0;
|
slack=groove?0.2:0;
|
||||||
joiner_size=[entry_size.x-6+slack, entry_size.y-6+slack, entry_size.z-4+slack];
|
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];
|
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);
|
translate(joiner_pos) cube(joiner_size, center=true);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user