Skip to content
Permalink
Browse files

refactoring power supply model to a separate file

  • Loading branch information
felipesanches committed May 16, 2013
1 parent 84b12e2 commit 41366caa593bd061e7d7ad79bd73c13eca61c2e8
Showing with 82 additions and 35 deletions.
  1. +1 −35 Metamaquina2.scad
  2. +26 −0 PowerSupply.h
  3. +55 −0 PowerSupply.scad
@@ -43,6 +43,7 @@ include <nuts.h>;
include <spacer.h>;
include <lm8uu_bearing.h>;
include <jhead.h>;
include <PowerSupply.h>;
use <608zz_bearing.scad>;
use <domed_cap_nuts.scad>;
use <belt-clamp.scad>;
@@ -243,41 +244,6 @@ if (render_metal && render_bolts){

// 2d shapes for laser-cutting:

//This is based on measurements of
// a HIQUA power supply
PowerSupply_width=110;
PowerSupply_height=198;
PowerSupply_thickness=50;
module HiquaPowerSupply_holes(){
translate([5, 6])
circle(r=5/2, $fn=20);

translate([6, PowerSupply_height - 22])
circle(r=5/2, $fn=20);

translate([PowerSupply_width - 5, 5])
circle(r=5/2, $fn=20);

translate([PowerSupply_width - 12, PowerSupply_height - 21])
circle(r=5/2, $fn=20);
}

module HiquaPowerSupply(){
BillOfMaterials("Power Supply");

{//TODO: Add this to the CAD model
BillOfMaterials("Power Supply cable");
BillOfMaterials("M3x10 bolt", 4);
BillOfMaterials("M3 washer", 4);
}

if (render_metal){
color(metal_color){
cube([PowerSupply_thickness, PowerSupply_width, PowerSupply_height]);
}
}
}

module RodEndTop_face(){
RodEnd_face(z_rod_z_bar_distance+8);
}
@@ -0,0 +1,26 @@
// (c) 2013 Metamáquina <http://www.metamaquina.com.br/>
//
// Author:
// * Felipe C. da S. Sanches <fsanches@metamaquina.com.br>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use <PowerSupply.scad>;

//This is based on measurements of
// a HIQUA power supply
PowerSupply_width=110;
PowerSupply_height=198;
PowerSupply_thickness=50;

@@ -0,0 +1,55 @@
// (c) 2013 Metamáquina <http://www.metamaquina.com.br/>
//
// Author:
// * Felipe C. da S. Sanches <fsanches@metamaquina.com.br>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

include <BillOfMaterials.h>;
include <PowerSupply.h>;
include <bolts.h>;
include <washers.h>;
include <render.h>;
include <colors.h>;

module HiquaPowerSupply_holes(){
translate([5, 6])
circle(r=5/2, $fn=20);

translate([6, PowerSupply_height - 22])
circle(r=5/2, $fn=20);

translate([PowerSupply_width - 5, 5])
circle(r=5/2, $fn=20);

translate([PowerSupply_width - 12, PowerSupply_height - 21])
circle(r=5/2, $fn=20);
}

module HiquaPowerSupply(){
BillOfMaterials("Power Supply");

{//TODO: Add this to the CAD model
BillOfMaterials("Power Supply cable");
BillOfMaterials("M3x10 bolt", 4);
BillOfMaterials("M3 washer", 4);
}

if (render_metal){
color(metal_color){
cube([PowerSupply_thickness, PowerSupply_width, PowerSupply_height]);
}
}
}

0 comments on commit 41366ca

Please sign in to comment.
You can’t perform that action at this time.