reorder supermicro-sc808t stuff
This commit is contained in:
		| @@ -0,0 +1,82 @@ | ||||
| /** | ||||
|  * Model that draws a box that can have screws and slots and that can be used as a negative on another box and obtain the difference. | ||||
|  * can be used as a negative on another box and obtain the difference. | ||||
|  * | ||||
|  * @author Joaquín Fernández | ||||
|  * @url https://gitlab.com/joaquinfq/openscad/blob/master/Modules/Models/box.scad | ||||
|  * @license CC-BY-NC-4.0 | ||||
|  * | ||||
|  * @ @param {Float} width Width of the model to generate. | ||||
|  * @ @param {Float} height Height of the model to generate. | ||||
|  * @param {Float} length Length of the model to be generated. | ||||
|  * @param {Float} thickness Thickness of the block where the model will be inserted. | ||||
|  * @param {Float} screw Diameter of the screw to be used. | ||||
|  * @param {Float} slot Length of the slot where the screws will be inserted. | ||||
|  * @param {Float} tolerance Value to be used to adjust the standard dimensions. | ||||
|  * @param {Float[]} side Coordinates of the side holes. | ||||
|  * @param {Float[]} bottom Coordinates of the bottom holes. | ||||
|  */ | ||||
| module modelBox(width, height, length, thickness, screw = 0, slot = 0, side = [], bottom = []) | ||||
| { | ||||
|     cube([ width, height, length ]); | ||||
|     // Side holes | ||||
|     for (_side = side) | ||||
|     { | ||||
|         if (slot) | ||||
|         { | ||||
|             hull() | ||||
|             { | ||||
|                 for (_n = [ - slot / 2, slot / 2 ]) | ||||
|                 { | ||||
|                     translate([ width / 2, _side[0], _side[1] + _n ]) | ||||
|                     { | ||||
|                         rotate([ 0, 90, 0 ]) | ||||
|                         { | ||||
|                             cylinder(d = screw, h = width + thickness * 2, center = true); | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             translate([ width / 2, _side[0], _side[1] ]) | ||||
|             { | ||||
|                 rotate([ 0, 90, 0 ]) | ||||
|                 { | ||||
|                     cylinder(d = screw, h = width + thickness * 2, center = true); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     // Bottom holes | ||||
|     for (_bottom = bottom) | ||||
|     { | ||||
|         if (slot) | ||||
|         { | ||||
|             hull() | ||||
|             { | ||||
|                 for (_n = [ - slot / 2, slot / 2 ]) | ||||
|                 { | ||||
|                     translate([ width - _bottom[0], 0, _bottom[1] + _n ]) | ||||
|                     { | ||||
|                         rotate([ 90, 0, 0 ]) | ||||
|                         { | ||||
|                             cylinder(d = screw, h = thickness); | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             translate([ width - _bottom[0], 0, _bottom[1] ]) | ||||
|             { | ||||
|                 rotate([ 90, 0, 0 ]) | ||||
|                 { | ||||
|                     cylinder(d = screw, h = thickness); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,74 @@ | ||||
| /** | ||||
|  * Models and variables according to SFF-8300 specification. | ||||
|  * | ||||
|  * @author  Joaquín Fernández | ||||
|  * @url     https://gitlab.com/joaquinfq/openscad/blob/master/Modules/Models/SFF/8300.scad | ||||
|  * @license CC-BY-NC-4.0 | ||||
|  * | ||||
|  * @see     SFF-8300 3.5" Form Factor Drives | ||||
|  */ | ||||
| //---------------------------------------------------------- | ||||
| use <./box.scad> | ||||
| //---------------------------------------------------------- | ||||
| /** | ||||
|  * Returns the specifications of the measurements according to SFF-8300. | ||||
|  * | ||||
|  * @param {Float} tolerance Tolerance to be used to adjust the measurements. | ||||
|  * @param {Integer} type Type of unit (0: small, 1: medium, 2: large). | ||||
|  * | ||||
|  * @return {Float[]} | ||||
|  */ | ||||
| function sff8300(tolerance = 0, type = 1) = [ | ||||
|       3.00, // Screw diameter | ||||
|      type == 0 ? 42.00 : (type == 1 ? 26.10 : 17.80) + tolerance, | ||||
|     147.00 + tolerance, | ||||
|     101.60 + tolerance, | ||||
|      95.25 + tolerance, | ||||
|       3.18, | ||||
|      44.45 + tolerance / 2, | ||||
|      41.28 + tolerance / 2, | ||||
|      28.50 + tolerance / 2, | ||||
|     101.60 + tolerance / 2, | ||||
|       6.35 + tolerance / 2, | ||||
|       0.25, | ||||
|       0.50, | ||||
|      76.20 + tolerance / 2 | ||||
| ]; | ||||
| //---------------------------------------------------------- | ||||
| /** | ||||
|  * Draw a model of a 3.5" drive according to the SFF-8300 specification. | ||||
|  * | ||||
|  * This model allows the volume to be removed later to create a slot | ||||
|  * like those used in PC cases. | ||||
|  * | ||||
|  * @param {Float} length Length of the drive to be generated. | ||||
|  * @param {Float} thickness Thickness of the block where the model will be inserted. | ||||
|  * @param {Float} screw Diameter of the screw to be used. | ||||
|  * @param {Float} slot Length of the slot where the screws will be inserted. | ||||
|  * @param {Float} tolerance Value to be used to adjust the standard dimensions. | ||||
|  * @param {Integer} type Type of unit (0: small, 1: medium, 2: large). | ||||
|  */ | ||||
| module sff8300Model(length = 0, thickness = 5, screw = 0, slot = 15, tolerance = 0.3, type = 0) | ||||
| { | ||||
|     _A = sff8300(tolerance, type); | ||||
|     modelBox( | ||||
|         _A[3], | ||||
|         _A[1], | ||||
|         length ? length : _A[2], | ||||
|         thickness, | ||||
|         screw ? screw : _A[0], | ||||
|         slot, | ||||
|         [ | ||||
|             [ _A[10], _A[2] - _A[8]         ], | ||||
|             [ _A[10], _A[2] - _A[8] - _A[9] ] | ||||
|         ], | ||||
|         [ | ||||
|             [ _A[5],         _A[2] - _A[7]          ], | ||||
|             [ _A[5],         _A[2] - _A[7] - _A[6]  ], | ||||
|             [ _A[5],         _A[2] - _A[7] - _A[13] ], | ||||
|             [ _A[3] - _A[5], _A[2] - _A[7]          ], | ||||
|             [ _A[3] - _A[5], _A[2] - _A[7] - _A[6]  ], | ||||
|             [ _A[3] - _A[5], _A[2] - _A[7] - _A[13] ] | ||||
|         ] | ||||
|     ); | ||||
| } | ||||
| @@ -0,0 +1,130 @@ | ||||
| /** | ||||
|  * Modelos y variables según la especificación SFF-8200. | ||||
|  * | ||||
|  * @author  Joaquín Fernández | ||||
|  * @url     https://gitlab.com/joaquinfq/openscad/blob/master/Modules/Models/SFF/8200.scad | ||||
|  * @license CC-BY-NC-4.0 | ||||
|  * | ||||
|  * @see     SFF-8200 2.5" Form Factor Drives | ||||
|  */ | ||||
| //---------------------------------------------------------- | ||||
| use <./box.scad> | ||||
| //---------------------------------------------------------- | ||||
| /** | ||||
|  * Devuelve las especificaciones de las medidas según SFF-8200. | ||||
|  * | ||||
|  * @param {Float}   tolerance Tolerancia a usar para ajustar las medidas. | ||||
|  * @param {Integer} type      Tipo de unidad (0: pequeña, 1: mediana, 2: grande). | ||||
|  * | ||||
|  * @return {Float[]} | ||||
|  */ | ||||
| function sff8200(tolerance = 0, type = 0) = [ | ||||
|       3.00, // Diámetro del tornillo | ||||
|      ( | ||||
|          type == 0  | ||||
|             ? 19.05  | ||||
|             : type == 1  | ||||
|                 ? 17.00  | ||||
|                 : type == 2 | ||||
|                     ? 15.00  | ||||
|                     : type == 3 | ||||
|                         ? 12.70  | ||||
|                         : type == 4 | ||||
|                             ? 10.50  | ||||
|                             : type == 5 | ||||
|                                 ? 9.50  | ||||
|                                 : type == 6 | ||||
|                                     ? 8.47 | ||||
|                                     : type == 7 | ||||
|                                         ? 7.00 | ||||
|                                         : 5.00 | ||||
|     ) + tolerance, | ||||
|       0.00, | ||||
|       0.50, | ||||
|      69.85 + tolerance, | ||||
|       0.25, | ||||
|     100.45 + tolerance, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|     100.20 + tolerance,     // #10 | ||||
|     100.50 + tolerance, | ||||
|     110.20 + tolerance, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef,                 // #20 | ||||
|      undef, | ||||
|      undef, | ||||
|       3.00 + tolerance / 2, | ||||
|      34.93, | ||||
|      38.10, | ||||
|      undef, | ||||
|       0.50, | ||||
|       4.07 + tolerance / 2, | ||||
|      61.72, | ||||
|      34.93,                 // #30 | ||||
|      38.10, | ||||
|      undef, | ||||
|       0.50, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|       8.00, | ||||
|       3.00, | ||||
|      undef, | ||||
|      undef,                 // #40 | ||||
|       2.50, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      undef, | ||||
|      14.00 + tolerance / 2, // #50 | ||||
|      90.60 + tolerance / 2, | ||||
|      14.00 + tolerance / 2, | ||||
|      90.60 + tolerance / 2 | ||||
| ]; | ||||
| //---------------------------------------------------------- | ||||
| /** | ||||
|  * Draw a model of a 3.5" drive according to the SFF-8200 specification. | ||||
|  * | ||||
|  * This model allows the volume to be removed later to create a slot as used in PC cases. | ||||
|  * like those used in PC cases. | ||||
|  * | ||||
|  * @param {Float} length Length of the drive to be generated. | ||||
|  * @param {Float} thickness Thickness of the block where the model will be inserted. | ||||
|  * @param {Float} screw Diameter of the screw to be used. | ||||
|  * @param {Float} slot Length of the slot where the screws will be inserted. | ||||
|  * @param {Float} tolerance Value to be used to adjust the standard dimensions. | ||||
|  * @param {Integer} type Type of unit (0: small, 1: medium, 2: large). | ||||
|  */ | ||||
| module sff8200Model(length = 0, thickness = 5, screw = 0, slot = 15, tolerance = 0.3, type = 0) | ||||
| { | ||||
|     _A = sff8200(tolerance, type); | ||||
|     modelBox( | ||||
|         _A[4], | ||||
|         _A[1], | ||||
|         length ? length : _A[6], | ||||
|         thickness, | ||||
|         screw ? screw : _A[0], | ||||
|         slot, | ||||
|         [ | ||||
|             [ _A[23], _A[6] - _A[52] ], | ||||
|             [ _A[23], _A[6] - _A[53] ] | ||||
|         ], | ||||
|         [ | ||||
|             [ _A[28],         _A[6] - _A[50] ], | ||||
|             [ _A[28],         _A[6] - _A[51] ], | ||||
|             [ _A[4] - _A[28], _A[6] - _A[50] ], | ||||
|             [ _A[4] - _A[28], _A[6] - _A[51] ] | ||||
|         ] | ||||
|     ); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user