Improvements on the parameterized design
parent
721ba6f7ec
commit
f875a6130e
|
@ -1,11 +1,11 @@
|
|||
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
|
||||
// http://reprap.org/wiki/Cyclone_PCB_Factory
|
||||
// Original author: Carlosgs (http://carlosgs.es)
|
||||
// License: Attribution - Share Alike - Creative Commons (http://creativecommons.org/licenses/by-sa/3.0/)
|
||||
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
// Designed with http://www.openscad.org/
|
||||
|
||||
|
||||
// Include necessary libraries
|
||||
// Load necessary libraries
|
||||
use <libs/obiscad/vector.scad>
|
||||
use <libs/obiscad/attach.scad>
|
||||
use <libs/obiscad/bcube.scad>
|
||||
|
@ -13,24 +13,22 @@ use <libs/standard_parts.scad>
|
|||
use <libs/hole_for_screw.scad>
|
||||
|
||||
|
||||
|
||||
|
||||
// Parameters for the bottom base
|
||||
base_size_X = 304.8;
|
||||
base_size_Y = 261.62;
|
||||
base_size_X = 304.8+50*(1+sin(0.5*$t*360));
|
||||
base_size_Y = 261.62+50*(1+sin(0.5*$t*360));
|
||||
base_thickness = 8;
|
||||
base_corner_radius = 20;
|
||||
base_corner_res = 0;
|
||||
|
||||
|
||||
// Parameters for the axes sizes
|
||||
axes_Xsmooth_rodLen = 295;
|
||||
axes_Ysmooth_rodLen = 255;
|
||||
axes_Zsmooth_rodLen = 150;
|
||||
axes_Xsmooth_rodLen = 265+50*(1+sin(0.5*$t*360));
|
||||
axes_Ysmooth_rodLen = 240+50*(1+sin(0.5*$t*360));
|
||||
axes_Zsmooth_rodLen = 100+50*(1+sin(0.5*$t*360));
|
||||
|
||||
axes_Xthreaded_rodLen = 300;
|
||||
axes_Ythreaded_rodLen = 300;
|
||||
axes_Zthreaded_rodLen = 100;
|
||||
axes_Xthreaded_rodLen = axes_Xsmooth_rodLen+50;
|
||||
axes_Ythreaded_rodLen = axes_Ysmooth_rodLen-50;
|
||||
axes_Zthreaded_rodLen = axes_Zsmooth_rodLen+50;
|
||||
|
||||
axes_Xsmooth_rodD = 8.5;
|
||||
axes_Ysmooth_rodD = 8.5;
|
||||
|
@ -42,82 +40,51 @@ axes_Zthreaded_rodD = 8;
|
|||
|
||||
// Parameters for the axes reference position
|
||||
// Note: The reference coordinates are centered like this:
|
||||
// Y axis reference is the Y smooth rod, BACK of LEFT FRAME
|
||||
// X axis reference is the X threaded rod edge, LEFT FRAME
|
||||
// Y axis reference is the Y smooth rod end, BACK of RIGHT FRAME
|
||||
// X axis reference is the frontal X smooth rod end, RIGHT FRAME
|
||||
// Z axis reference is the Z threaded rod, at the height of the Z nut, and relative to the X reference
|
||||
axes_Yreference_height = 30;
|
||||
axes_Xreference_height = 60; // relative to Y reference
|
||||
axes_Zreference_height = 35; // relative to X reference
|
||||
axes_Zreference_height = 45; // relative to X reference
|
||||
|
||||
axes_Xreference_posY = 60; // relative to Y reference. Moves the X axis to the front of the machine
|
||||
axes_Xreference_posY = -70; // relative to Y reference. Moves the X axis towards the front of the machine
|
||||
axes_Zreference_posY = 15; // relative to X reference. Positions Z nut between the Y rods
|
||||
|
||||
axes_Y_threaded_height = 25;
|
||||
|
||||
axes_Ysmooth_separation = 210;
|
||||
axes_Ysmooth_separation = 180+50*(1+sin(0.5*$t*360));
|
||||
axes_Xsmooth_separation = 40;
|
||||
axes_Zsmooth_separation = 35;
|
||||
|
||||
|
||||
// Parameters for the axis-nut offsets (along same axes)
|
||||
axes_Xnut_offset = 10;
|
||||
axes_Ynut_offset = 0;
|
||||
|
||||
// Carriage positions (for rendering)
|
||||
axes_Xcarriage_pos = 70;
|
||||
axes_Ycarriage_pos = 40;
|
||||
axes_Zcarriage_pos = 20;
|
||||
axes_Xcarriage_pos = axes_Xsmooth_rodLen/2+sin($t*360)*axes_Xsmooth_rodLen/3;
|
||||
axes_Ycarriage_pos = axes_Ysmooth_rodLen/2+sin($t*360)*axes_Ysmooth_rodLen/3;
|
||||
axes_Zcarriage_pos = axes_Zsmooth_rodLen/3+sin(5*$t*360)*axes_Zsmooth_rodLen/4;
|
||||
|
||||
// Draw auxiliary reference (LCS axis, etc)
|
||||
|
||||
|
||||
// Calculations
|
||||
axes_Xreference_posX = (axes_Ysmooth_separation-axes_Xsmooth_rodLen)/2; // relative to Y reference
|
||||
axes_Y_smoothThreaded_verticalSeparation = axes_Yreference_height-axes_Y_threaded_height;
|
||||
|
||||
// Activate/Deactivate rendering auxiliary references (LCS axis, etc)
|
||||
draw_references = true;
|
||||
|
||||
|
||||
|
||||
|
||||
// Useful command reference:
|
||||
//use <MCAD/motors.scad>
|
||||
//stepper_motor_mount(nema_standard=17, slide_distance=10, $fn=40, mochup=true);
|
||||
|
||||
//use <MCAD/boxes.scad>
|
||||
//roundedBox([10,20,30], radius=2, sidesonly=false, $fn=60);
|
||||
|
||||
//use <libs/obiscad/bcube.scad>
|
||||
//bcube([20,20,10],cr=4, cres=10);
|
||||
|
||||
//include <MCAD/stepper.scad>
|
||||
//motor(Nema17, size=NemaMedium, dualAxis=false);
|
||||
|
||||
//use <MCAD/teardrop.scad>
|
||||
//teardrop(radius=10, length=20, angle=90);
|
||||
|
||||
//use <MCAD/nuts_and_bolts.scad>
|
||||
//nutHole(size=3, tolerance=0.5, proj=-1);
|
||||
//boltHole(size=3, length=10, tolerance=0.5, proj=-1, $fn=40);
|
||||
|
||||
//use <libs/hole_for_screw.scad>
|
||||
//hole_for_screw(size=3,length=15,nutDepth=0,nutAddedLen=3.5,captiveLen=0);
|
||||
|
||||
|
||||
|
||||
|
||||
//-- Connector definitions
|
||||
// att. point att. axis roll
|
||||
//C_origin = [ [0,0,0], [0,0,1], 0 ];
|
||||
//C_other = [ [0,0,20], [0,1,1], 5 ];
|
||||
|
||||
//
|
||||
//if(draw_references) {
|
||||
// %frame();
|
||||
// %connector(C_origin);
|
||||
// %connector(C_other);
|
||||
//}
|
||||
|
||||
//attach(a,origin) cylinder(r=0.25, h=20, $fn=3);
|
||||
|
||||
// Include Cyclone parts
|
||||
include <Cyclone_X_carriage.scad>
|
||||
include <Cyclone_Z_carriage.scad>
|
||||
include <Cyclone_X_frames.scad>
|
||||
include <Cyclone_Y_SmoothRodIdlers.scad>
|
||||
include <Cyclone_Y_carriage.scad>
|
||||
include <Cyclone_Y_frames.scad>
|
||||
|
||||
|
||||
// BEGIN ASSEMBLING THE DESIGN
|
||||
|
||||
// Dummy part for allowing rendering of all objects with %
|
||||
cube([10,20,30]);
|
||||
if(draw_references) %frame();
|
||||
|
||||
// Main base for the machine
|
||||
beveledBase([base_size_X,base_size_Y,base_thickness], radius=base_corner_radius, res=base_corner_res);
|
||||
|
@ -141,42 +108,70 @@ translate([0,0,-base_thickness]) {
|
|||
rubberFoot();
|
||||
}
|
||||
|
||||
// CHANGE REFERENCE POSITION to the left frame, Y smooth rod end
|
||||
translate([axes_Ysmooth_separation/2,-axes_Ysmooth_rodLen/2,axes_Yreference_height]) {
|
||||
if(draw_references) %frame();
|
||||
}
|
||||
|
||||
// CHANGE REFERENCE POSITION to the left frame, Y smooth rod end
|
||||
translate([axes_Ysmooth_separation/2,-axes_Ysmooth_rodLen/2,axes_Yreference_height]) {
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the RIGHT frame, Y smooth rod end
|
||||
translate([-axes_Ysmooth_separation/2,axes_Ysmooth_rodLen/2,axes_Yreference_height]) {
|
||||
if(draw_references) %frame();
|
||||
|
||||
// Draw left Y smooth rod
|
||||
standard_rod(diam=axes_Ysmooth_rodD, length=axes_Ysmooth_rodLen, threaded=false);
|
||||
// Draw right Y smooth rod
|
||||
translate([-axes_Ysmooth_separation,0,0])
|
||||
standard_rod(diam=axes_Ysmooth_rodD, length=axes_Ysmooth_rodLen, threaded=false);
|
||||
|
||||
// CHANGE REFERENCE POSITION to the left frame, Y smooth rod end
|
||||
translate([axes_Xsmooth_rodLen/2-axes_Ysmooth_separation/2,axes_Xreference_posY,axes_Xreference_height]) {
|
||||
rotate([0,0,180]) standard_rod(diam=axes_Ysmooth_rodD, length=axes_Ysmooth_rodLen, threaded=false);
|
||||
|
||||
Cyclone_X_rightFrame();
|
||||
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the LEFT frame, Y smooth rod end
|
||||
translate([axes_Ysmooth_separation,0,0]) {
|
||||
if(draw_references) %frame();
|
||||
// Draw X threaded rod
|
||||
rotate([0,0,90]) standard_rod(diam=axes_Xsmooth_rodD, length=axes_Xsmooth_rodLen, threaded=true);
|
||||
// Draw bottom X smooth rod
|
||||
translate([0,axes_Xsmooth_separation,0])
|
||||
rotate([0,0,90]) standard_rod(diam=axes_Xsmooth_rodD, length=axes_Xsmooth_rodLen, threaded=false);
|
||||
// Draw top X smooth rod
|
||||
translate([0,0,axes_Xsmooth_separation])
|
||||
rotate([0,0,90]) standard_rod(diam=axes_Xsmooth_rodD, length=axes_Xsmooth_rodLen, threaded=false);
|
||||
|
||||
// CHANGE REFERENCE POSITION to the X carriage (nut)
|
||||
translate([-axes_Xcarriage_pos,0,0]) {
|
||||
// Draw right Y smooth rod
|
||||
rotate([0,0,180]) standard_rod(diam=axes_Ysmooth_rodD, length=axes_Ysmooth_rodLen, threaded=false);
|
||||
|
||||
Cyclone_X_leftFrame();
|
||||
}
|
||||
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the right frame, X lower smooth rod end
|
||||
translate([axes_Xreference_posX,axes_Xreference_posY,axes_Xreference_height]) {
|
||||
if(draw_references) %frame();
|
||||
|
||||
// Draw bottom X smooth rod
|
||||
rotate([0,0,-90]) standard_rod(diam=axes_Xsmooth_rodD, length=axes_Xsmooth_rodLen, threaded=false);
|
||||
// Draw X threaded rod
|
||||
translate([-(axes_Xthreaded_rodLen-axes_Xsmooth_rodLen)/2,axes_Xsmooth_separation,0])
|
||||
rotate([0,0,-90]) standard_rod(diam=axes_Xthreaded_rodD, length=axes_Xthreaded_rodLen, threaded=true);
|
||||
// Draw top X smooth rod
|
||||
translate([0,axes_Xsmooth_separation,axes_Xsmooth_separation])
|
||||
rotate([0,0,-90]) standard_rod(diam=axes_Xsmooth_rodD, length=axes_Xsmooth_rodLen, threaded=false);
|
||||
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the X carriage (centered)
|
||||
translate([axes_Xcarriage_pos,0,0]) {
|
||||
if(draw_references) %frame();
|
||||
cyclone_X_carriage();
|
||||
|
||||
// CHANGE REFERENCE POSITION to the X carriage (nut)
|
||||
translate([0,axes_Zreference_posY,axes_Zreference_height]) {
|
||||
Cyclone_X_carriage();
|
||||
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the Z axis origin (top of X carriage, right smooth rod)
|
||||
translate([-axes_Zsmooth_separation/2,axes_Zreference_posY,axes_Zreference_height]) {
|
||||
if(draw_references) %frame();
|
||||
cyclone_Z_carriage();
|
||||
|
||||
// Draw Z smooth rod (right)
|
||||
rotate([90,0,0]) standard_rod(diam=axes_Zsmooth_rodD, length=axes_Zsmooth_rodLen, threaded=false);
|
||||
// Draw Z smooth rod (left)
|
||||
translate([axes_Zsmooth_separation,0,0])
|
||||
rotate([90,0,0]) standard_rod(diam=axes_Zsmooth_rodD, length=axes_Zsmooth_rodLen, threaded=false);
|
||||
// Draw Z threaded rod
|
||||
translate([axes_Zsmooth_separation/2,0,0])
|
||||
rotate([90,0,0]) standard_rod(diam=axes_Zthreaded_rodD, length=axes_Zthreaded_rodLen, threaded=true);
|
||||
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the Z axis reference
|
||||
translate([0,0,axes_Zcarriage_pos]) {
|
||||
if(draw_references) %frame();
|
||||
|
||||
Cyclone_Z_carriage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,3 +179,53 @@ translate([axes_Ysmooth_separation/2,-axes_Ysmooth_rodLen/2,axes_Yreference_heig
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the FRONT RIGHT Y rod idler, Y smooth rod end
|
||||
translate([-axes_Ysmooth_separation/2,-axes_Ysmooth_rodLen/2,axes_Yreference_height]) {
|
||||
if(draw_references) %frame();
|
||||
|
||||
Cyclone_Y_rightSmoothRodIdler();
|
||||
}
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the FRONT LEFT Y rod idler, Y smooth rod end
|
||||
translate([axes_Ysmooth_separation/2,-axes_Ysmooth_rodLen/2,axes_Yreference_height]) {
|
||||
if(draw_references) %frame();
|
||||
|
||||
Cyclone_Y_leftSmoothRodIdler();
|
||||
}
|
||||
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the FRONT Y frame, Y threaded rod end
|
||||
translate([0,-axes_Ythreaded_rodLen/2,axes_Y_threaded_height]) {
|
||||
if(draw_references) %frame();
|
||||
|
||||
// Draw Y threaded rod
|
||||
standard_rod(diam=axes_Ythreaded_rodD, length=axes_Ythreaded_rodLen, threaded=true);
|
||||
|
||||
Cyclone_Y_frontFrame();
|
||||
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the BACK Y frame, Y threaded rod end
|
||||
translate([0,axes_Ythreaded_rodLen,0]) {
|
||||
if(draw_references) %frame();
|
||||
|
||||
Cyclone_Y_backFrame();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TRANSLATE REFERENCE POSITION to the CENTERED Y carriage nut, Y threaded rod
|
||||
translate([0,-axes_Ysmooth_rodLen/2+axes_Ycarriage_pos,axes_Y_threaded_height]) {
|
||||
if(draw_references) %frame();
|
||||
|
||||
Cyclone_Y_carriage();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
|
||||
// http://reprap.org/wiki/Cyclone_PCB_Factory
|
||||
// Original author: Carlosgs (http://carlosgs.es)
|
||||
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
// Designed with http://www.openscad.org/
|
||||
|
||||
|
||||
module Cyclone_X_carriage() {
|
||||
color("lightblue") translate([-(axes_Zsmooth_separation+10)/2,-5,-5])
|
||||
cube([axes_Zsmooth_separation+10,50,axes_Xsmooth_separation+10]);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
|
||||
// http://reprap.org/wiki/Cyclone_PCB_Factory
|
||||
// Original author: Carlosgs (http://carlosgs.es)
|
||||
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
// Designed with http://www.openscad.org/
|
||||
|
||||
|
||||
module Cyclone_X_rightFrame() {
|
||||
color("lightyellow")
|
||||
translate([axes_Xreference_posX,axes_Xreference_posY-5,-axes_Yreference_height]) {
|
||||
cube([15,-axes_Xreference_posY+5,axes_Yreference_height+axes_Xreference_height+axes_Xsmooth_separation+5]);
|
||||
}
|
||||
color("lightyellow") // smooth rod idler
|
||||
translate([axes_Xreference_posX,-10,-axes_Yreference_height]) {
|
||||
cube([abs(axes_Xreference_posX)+5,10,axes_Yreference_height+5]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module Cyclone_X_leftFrame() {
|
||||
scale([-1,1,1]) Cyclone_X_rightFrame();
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
|
||||
// http://reprap.org/wiki/Cyclone_PCB_Factory
|
||||
// Original author: Carlosgs (http://carlosgs.es)
|
||||
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
// Designed with http://www.openscad.org/
|
||||
|
||||
|
||||
module Cyclone_Y_rightSmoothRodIdler() {
|
||||
color("lightcyan")
|
||||
translate([-5,0,-axes_Yreference_height]) {
|
||||
cube([20,10,axes_Yreference_height+5]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module Cyclone_Y_leftSmoothRodIdler() {
|
||||
scale([-1,1,1]) Cyclone_Y_rightSmoothRodIdler();
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
|
||||
// http://reprap.org/wiki/Cyclone_PCB_Factory
|
||||
// Original author: Carlosgs (http://carlosgs.es)
|
||||
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
// Designed with http://www.openscad.org/
|
||||
|
||||
|
||||
Ycarriage_linearBearingSeparation = 60;
|
||||
|
||||
module Cyclone_Y_carriage() {
|
||||
color("lightgreen") {
|
||||
translate([-10,-5,-5])
|
||||
cube([20,15,axes_Y_smoothThreaded_verticalSeparation+10]);
|
||||
translate([0,0,axes_Y_smoothThreaded_verticalSeparation]) {
|
||||
translate([axes_Ysmooth_separation/2,Ycarriage_linearBearingSeparation/2])
|
||||
cube([10,10,10], center=true);
|
||||
translate([-axes_Ysmooth_separation/2,Ycarriage_linearBearingSeparation/2])
|
||||
cube([10,10,10], center=true);
|
||||
translate([-axes_Ysmooth_separation/2,-Ycarriage_linearBearingSeparation/2])
|
||||
cube([10,10,10], center=true);
|
||||
translate([axes_Ysmooth_separation/2,-Ycarriage_linearBearingSeparation/2])
|
||||
cube([10,10,10], center=true);
|
||||
}
|
||||
}
|
||||
|
||||
translate([0,0,8+5+axes_Y_smoothThreaded_verticalSeparation])
|
||||
beveledBase(size=[axes_Ysmooth_separation+50,Ycarriage_linearBearingSeparation+50,8], radius=3, res=15);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
|
||||
// http://reprap.org/wiki/Cyclone_PCB_Factory
|
||||
// Original author: Carlosgs (http://carlosgs.es)
|
||||
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
// Designed with http://www.openscad.org/
|
||||
|
||||
|
||||
module Cyclone_Y_frontFrame() {
|
||||
color("lightred")
|
||||
translate([-10,0,-axes_Y_threaded_height])
|
||||
cube([20,10,axes_Y_threaded_height+5]);
|
||||
}
|
||||
|
||||
|
||||
module Cyclone_Y_backFrame() {
|
||||
scale([1,-1,1]) Cyclone_Y_frontFrame();
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
|
||||
// http://reprap.org/wiki/Cyclone_PCB_Factory
|
||||
// Original author: Carlosgs (http://carlosgs.es)
|
||||
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
// Designed with http://www.openscad.org/
|
||||
|
||||
|
||||
|
||||
module Cyclone_Z_carriage() {
|
||||
color("cyan") translate([-5,-100+5,0]) {
|
||||
cube([axes_Zsmooth_separation+10,100,10]);
|
||||
translate([0,0,30])
|
||||
cube([axes_Zsmooth_separation+10,100,10]);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
// Useful OpenScad command reference:
|
||||
|
||||
//use <MCAD/motors.scad>
|
||||
//stepper_motor_mount(nema_standard=17, slide_distance=10, $fn=40, mochup=true);
|
||||
|
||||
//use <MCAD/boxes.scad>
|
||||
//roundedBox([10,20,30], radius=2, sidesonly=false, $fn=60);
|
||||
|
||||
//use <libs/obiscad/bcube.scad>
|
||||
//bcube([20,20,10],cr=4, cres=10);
|
||||
|
||||
//include <MCAD/stepper.scad>
|
||||
//motor(Nema17, size=NemaMedium, dualAxis=false);
|
||||
|
||||
//use <MCAD/teardrop.scad>
|
||||
//teardrop(radius=10, length=20, angle=90);
|
||||
|
||||
//use <MCAD/nuts_and_bolts.scad>
|
||||
//nutHole(size=3, tolerance=0.5, proj=-1);
|
||||
//boltHole(size=3, length=10, tolerance=0.5, proj=-1, $fn=40);
|
||||
|
||||
//use <libs/hole_for_screw.scad>
|
||||
//hole_for_screw(size=3,length=15,nutDepth=0,nutAddedLen=3.5,captiveLen=0);
|
||||
|
||||
|
||||
|
||||
|
||||
//-- Connector definitions
|
||||
// att. point att. axis roll
|
||||
//C_origin = [ [0,0,0], [0,0,1], 0 ];
|
||||
//C_other = [ [0,0,20], [0,1,1], 5 ];
|
||||
|
||||
//
|
||||
//if(draw_references) {
|
||||
// %frame();
|
||||
// %connector(C_origin);
|
||||
// %connector(C_other);
|
||||
//}
|
||||
|
||||
//attach(a,origin) cylinder(r=0.25, h=20, $fn=3);
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
// This file is part of Cyclone PCB Factory: a 3D printable CNC machine for PCB manufacture
|
||||
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
|
||||
// http://reprap.org/wiki/Cyclone_PCB_Factory
|
||||
// Author: Carlosgs (http://carlosgs.es)
|
||||
// License: Attribution - Share Alike - Creative Commons (http://creativecommons.org/licenses/by-sa/3.0/)
|
||||
// Original author: Carlosgs (http://carlosgs.es)
|
||||
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
// Designed with http://www.openscad.org/
|
||||
|
||||
include <MCAD/nuts_and_bolts.scad>
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
//-- Released under the GPL license
|
||||
//---------------------------------------------------------------
|
||||
|
||||
obiscad_drawing_resolution = 6;
|
||||
|
||||
//----------------------------------------
|
||||
//-- FUNCTIONS FOR WORKING WITH VECTORS
|
||||
//----------------------------------------
|
||||
|
@ -26,19 +28,16 @@ function dot(u,v) = u[0]*v[0]+u[1]*v[1]+u[2]*v[2];
|
|||
//-- Return the unit vector of a vector
|
||||
function unitv(v) = v/mod(v);
|
||||
|
||||
//-- Return the angle between two vectors
|
||||
//-- Return the angle between two vectores
|
||||
function anglev(u,v) = acos( dot(u,v) / (mod(u)*mod(v)) );
|
||||
|
||||
//-- Return a vector that is perpendicular
|
||||
function perpendicular(vec) = vec.x == 0 ? [1,0,0] : vec.y == 0 ? [0,1,0] : vec.z == 0 ? [0,0,1] : [-vec.y,vec.x,0];;
|
||||
|
||||
//----------------------------------------------------------
|
||||
//-- Draw a point in the position given by the vector p
|
||||
//----------------------------------------------------------
|
||||
module point(p)
|
||||
{
|
||||
translate(p)
|
||||
sphere(r=0.7,$fn=20);
|
||||
sphere(r=0.7,$fn=obiscad_drawing_resolution);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
|
@ -62,7 +61,7 @@ module vectorz(l=10, l_arrow=4, mark=false)
|
|||
|
||||
//-- Draw the arrow
|
||||
translate([0,0,lb/2])
|
||||
cylinder(r1=2/2, r2=0.2, h=l_arrow, $fn=20);
|
||||
cylinder(r1=2/2, r2=0.2, h=l_arrow, $fn=obiscad_drawing_resolution);
|
||||
|
||||
//-- Draw the mark
|
||||
if (mark) {
|
||||
|
@ -72,11 +71,11 @@ module vectorz(l=10, l_arrow=4, mark=false)
|
|||
}
|
||||
|
||||
//-- Draw the body
|
||||
cylinder(r=1/2, h=lb, center=true, $fn=20);
|
||||
cylinder(r=1/2, h=lb, center=true, $fn=obiscad_drawing_resolution);
|
||||
}
|
||||
|
||||
//-- Draw a sphere in the vector base
|
||||
sphere(r=1/2, $fn=20);
|
||||
sphere(r=1/2, $fn=obiscad_drawing_resolution);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
@ -180,7 +179,7 @@ module frame(l=10, l_arrow=4)
|
|||
|
||||
//-- Origin
|
||||
color("Gray")
|
||||
sphere(r=1, $fn=20);
|
||||
sphere(r=1, $fn=obiscad_drawing_resolution);
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
|
||||
// http://reprap.org/wiki/Cyclone_PCB_Factory
|
||||
// Original author: Carlosgs (http://carlosgs.es)
|
||||
// License: Attribution - Share Alike - Creative Commons (http://creativecommons.org/licenses/by-sa/3.0/)
|
||||
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
// Designed with http://www.openscad.org/
|
||||
|
||||
use <obiscad/bcube.scad>
|
||||
|
|
Loading…
Reference in New Issue