openscad-compatible 3d part models, and Attribute entries to reference them
authorBdale Garbee <bdale@gag.com>
Thu, 29 Oct 2020 16:24:58 +0000 (10:24 -0600)
committerBdale Garbee <bdale@gag.com>
Thu, 29 Oct 2020 16:24:58 +0000 (10:24 -0600)
packages/0402.fp
packages/0402.scad
packages/0603.fp
packages/0603.scad
packages/0805.fp
packages/0805.scad
packages/1206.fp
packages/SOT23-5.fp
packages/SOT23.fp
packages/sot23-5.scad [new file with mode: 0644]
packages/sot23.scad

index 50ffb67257473bca885c8e873bbe608a06872397..78c5951725417b2c21b82d5ba6770c3ea698e782 100644 (file)
@@ -7,6 +7,7 @@
 # text_x, text_y, text_direction, text_scale, text_flags
 Element[0x00000000 "Standard SMT resistor, capacitor etc" "" "0402" 0 0 -3150 -3150 0 100 ""]
 (
+  Attribute("openscad" "0402")
 # 
 # Pad[x1, y1, x2, y2, thickness, clearance, mask, name , pad number, flags]
        Pad[-1574 -393
index ab9b305d720573034736011c79feec4826bfdb7f..0c9eb6809ebffb55cbf48ff656a57a641a990a5f 100644 (file)
@@ -18,4 +18,3 @@ module part_0402(len=1.0, width=0.5, height=0.35, pad_len=0.25)
        }
 }
 
-part_0402();
index 88564d9f7feb10643993c4aec9043b44448e90a9..fd62108312cba841d18351a04286c8048b349d64 100644 (file)
@@ -12,6 +12,7 @@
 # text_x, text_y, text_direction, text_scale, text_flags
 Element[0x00000000 "Standard SMT resistor, capacitor etc" "" "0603" 0 0 -3150 -3150 0 100 ""]
 (
+  Attribute("openscad" "0603")
 # 
 # Pad[x1, y1, x2, y2, thickness, clearance, mask, name , pad number, flags]
        Pad[-2559 -492
index 8aed1e5889debd095fe597e9e8c608d05c1b0dd8..751ec840c38c177d678d96837b093e20b5457e1a 100644 (file)
@@ -18,4 +18,3 @@ module part_0603(len=1.6, width=0.8, height=0.45, pad_len=0.3)
        }
 }
 
-part_0603();
index 6454ad9d7faced48db325c433b4b6e1f15af1422..eb2700e3c3721f23fff3fed70e2ea2b1db2cec1d 100644 (file)
@@ -12,6 +12,7 @@
 # text_x, text_y, text_direction, text_scale, text_flags
 Element[0x00000000 "Standard SMT resistor, capacitor etc" "" "0805" 0 0 -3150 -3150 0 100 ""]
 (
+  Attribute("openscad" "0805")
 # 
 # Pad[x1, y1, x2, y2, thickness, clearance, mask, name , pad number, flags]
        Pad[-3543 -393
index 7151939986b95938ba175fd87bfb9b7670ded06d..3aa937d5e37210b0b5d8b947beedd0b7f52ffaaf 100644 (file)
@@ -18,4 +18,3 @@ module part_0805(len=2, width=1.2, height=0.5, pad_len=0.4)
        }
 }
 
-part_0805();
index 6bddc3c2b9129d0d7b603700c10b8b6d1ee2d637..934bcb56f8abc9240bc02b5ae1861d7e2e209e5d 100644 (file)
@@ -12,6 +12,7 @@
 # text_x, text_y, text_direction, text_scale, text_flags
 Element[0x00000000 "Standard SMT resistor, capacitor etc" "" "1206" 0 0 -3150 -3150 0 100 ""]
 (
+  Attribute("openscad" "1206")
 # 
 # Pad[x1, y1, x2, y2, thickness, clearance, mask, name , pad number, flags]
        Pad[-5905 -1181
index 7cd739f4ce6b6f1c31eb0e84e114d108364e0a5a..46388b74ff27e4874c2f81a14170e9395ebbda0b 100644 (file)
@@ -1,6 +1,7 @@
 
 Element["" "LP2980 SOT23-5" "U1" "SOT25" 289000 132000 6300 -5000 3 89 ""]
 (
+       Attribute("openscad" "sot23-5")
        Pad[0 -800 0 800 2400 3000 3000 "4" "4" "square,edge2"]
        Pad[7800 -800 7800 800 2400 3000 3000 "5" "5" "square,edge2"]
        Pad[7800 -9000 7800 -7400 2400 3000 3000 "1" "1" "square"]
index 4f89c2d0dc192306dd0788cae0704457aa7149f0..a3335b5d6d3097bceb384be4f8adbb0619c7c43f 100644 (file)
@@ -4,6 +4,7 @@
                       # 34 for SOT23, 24 for SOT25
 Element(0x00 "SMT transistor, 3 pins" "" "SOT23" 148 0 3 100 0x00)
 (
+       Attribute("openscad" "sot23")
        ElementLine(0 0 0 139 10)
        ElementLine(0 139 128 139 10)
        ElementLine(128 139 128 0 10)
diff --git a/packages/sot23-5.scad b/packages/sot23-5.scad
new file mode 100644 (file)
index 0000000..10ff8f7
--- /dev/null
@@ -0,0 +1,39 @@
+
+module sot23()
+{
+
+       // pin prototype
+       module pin(length, height, thick)
+       {
+               linear_extrude(height=thick)
+                       scale([length, -height, 1])
+                               polygon([[0.3400,0.0000],[0.3900,0.0100],[0.4300,0.0300],[0.4600,0.0600],[0.4789,0.0908],[0.6279,0.8307],[0.6500,0.8600],[0.6900,0.8900],[0.7300,0.9000],[1.0000,0.9000],[1.0000,1.0000],[0.6700,1.0012],[0.6100,0.9900],[0.5600,0.9600],[0.5300,0.9200],[0.5200,0.9000],[0.3721,0.1693],[0.3500,0.1400],[0.3100,0.1100],[0.2700,0.1000],[0.0000,0.1000],[0.0000,0.0000]]);
+       }
+
+       rotate([90,0,-90]) scale([1.13,1.13,1.13]) translate([-0.9, 0.4, -2.1 - 0.43/2]) {
+               // body
+               color([0.1,0.1,0.1])
+                       linear_extrude(height=2.9)
+                               polygon([[-0.55,0],[-0.45,0.53],[0.45,0.53],[0.55,0],[0.45,-0.35],[-0.45,-0.35]]);
+
+               // 3 pins
+               color([0.9, 0.9, 0.9]) {
+                       translate([0.5,0,0.5-0.43/2])
+                               pin(0.5, 0.4, 0.43);
+
+                       translate([0.5,0,1.4-0.43/2])
+                               pin(0.5, 0.4, 0.43);
+
+            translate([0.5,0,2.3-0.43/2])
+                               pin(0.5, 0.4, 0.43);
+            
+                       translate([-0.5,0,0.5-0.43/2])
+                               pin(-0.5, 0.4, 0.43);
+            
+           translate([-0.5,0,2.3-0.43/2])
+                               pin(-0.5, 0.4, 0.43);
+               }
+       }
+}
+
+sot23();
index 8d500f78e2210b5e04595a14c9e9eaf700624d5e..b3d2b319ee3657a64785a488194bfdb32a54d144 100644 (file)
@@ -30,5 +30,3 @@ module sot23()
        }
 }
 
-
-sot23();