mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-01-17 05:28:14 +01:00
Started radial components with crystals.
This commit is contained in:
parent
0e5e15a747
commit
470d6d6216
100
readme.md
100
readme.md
@ -21,33 +21,33 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
|
||||
## Table of Contents<a name="top"/>
|
||||
<table><tr>
|
||||
<th align="left"> Vitamins A-H </th><th align="left"> Vitamins I-Q </th><th align="left"> Vitamins R-Z </th><th align="left"> Printed </th><th align="left"> Utilities </th><th align="left"> Core Utilities </th></tr>
|
||||
<tr><td> <a href = "#7_segments">7_segments</a> </td><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Rails">Rails</a> </td><td> <a href = "#Box">Box</a> </td><td> <a href = "#Annotation">Annotation</a> </td><td> <a href = "#BOM">BOM</a> </td></tr>
|
||||
<tr><td> <a href = "#Axials">Axials</a> </td><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</a> </td><td> <a href = "#Butt_box">Butt_box</a> </td><td> <a href = "#Bezier">Bezier</a> </td><td> <a href = "#Clip">Clip</a> </td></tr>
|
||||
<tr><td> <a href = "#BLDC_motors">BLDC_motors</a> </td><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Cable_clip">Cable_clip</a> </td><td> <a href = "#Catenary">Catenary</a> </td><td> <a href = "#Global">Global</a> </td></tr>
|
||||
<tr><td> <a href = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#LDRs">LDRs</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Core_xy">Core_xy</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#Batteries">Batteries</a> </td><td> <a href = "#LED_meters">LED_meters</a> </td><td> <a href = "#SK_brackets">SK_brackets</a> </td><td> <a href = "#Camera_housing">Camera_housing</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#Bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#LEDs">LEDs</a> </td><td> <a href = "#SMDs">SMDs</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#Belts">Belts</a> </td><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#SSRs">SSRs</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Gears">Gears</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Box_sections">Box_sections</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Horiholes">Horiholes</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Magnets">Magnets</a> </td><td> <a href = "#Servo_motors">Servo_motors</a> </td><td> <a href = "#Drag_chain">Drag_chain</a> </td><td> <a href = "#Layout">Layout</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Shaft_couplings">Shaft_couplings</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Maths">Maths</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Cameras">Cameras</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#Knob">Knob</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#LED_bezel">LED_bezel</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Terminals">Terminals</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td></td><td></td><td></td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#7_segments">7_segments</a> </td><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Radials">Radials</a> </td><td> <a href = "#Box">Box</a> </td><td> <a href = "#Annotation">Annotation</a> </td><td> <a href = "#BOM">BOM</a> </td></tr>
|
||||
<tr><td> <a href = "#Axials">Axials</a> </td><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Rails">Rails</a> </td><td> <a href = "#Butt_box">Butt_box</a> </td><td> <a href = "#Bezier">Bezier</a> </td><td> <a href = "#Clip">Clip</a> </td></tr>
|
||||
<tr><td> <a href = "#BLDC_motors">BLDC_motors</a> </td><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</a> </td><td> <a href = "#Cable_clip">Cable_clip</a> </td><td> <a href = "#Catenary">Catenary</a> </td><td> <a href = "#Global">Global</a> </td></tr>
|
||||
<tr><td> <a href = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#LDRs">LDRs</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Core_xy">Core_xy</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#Batteries">Batteries</a> </td><td> <a href = "#LED_meters">LED_meters</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Camera_housing">Camera_housing</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#Bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#LEDs">LEDs</a> </td><td> <a href = "#SK_brackets">SK_brackets</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#Belts">Belts</a> </td><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#SMDs">SMDs</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Gears">Gears</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#SSRs">SSRs</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Box_sections">Box_sections</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Horiholes">Horiholes</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Magnets">Magnets</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Drag_chain">Drag_chain</a> </td><td> <a href = "#Layout">Layout</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Servo_motors">Servo_motors</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Maths">Maths</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Shaft_couplings">Shaft_couplings</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Cameras">Cameras</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Knob">Knob</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#LED_bezel">LED_bezel</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Terminals">Terminals</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td></td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td></td><td></td><td></td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
@ -2437,6 +2437,11 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `potentiometer(BTT_encoder)` | BTT_encoder |
|
||||
| 1 | `box_header(2p54header, 4, 2)` | Box header 4 x 2 |
|
||||
| 1 | `rd_xtal(ACT1100, "40MHz")` | Crystal ACT1100 40MHz |
|
||||
| 1 | `rd_xtal(ACT1700, "80MHz")` | Crystal ACT1700 80MHz |
|
||||
| 1 | `rd_xtal(C_002RX, "60KHz")` | Crystal C_002RX 60KHz |
|
||||
| 1 | `rd_xtal(HC49, "4MHz")` | Crystal HC49 4MHz |
|
||||
| 1 | `rd_xtal(HC49_4H, "10MHz")` | Crystal HC49_4H 10MHz |
|
||||
| 1 | `d_plug(DCONN9, pcb = true)` | D-type 9 way PCB mount plug |
|
||||
| 1 | `dil_socket(12, 15.24)` | DIL socket 24 x 0.6" |
|
||||
| 1 | `smd_diode(DO241AC)` | DO241AC package SS34 |
|
||||
@ -3053,6 +3058,46 @@ Timing belt pulleys, both toothed and plain with internal bearings for idlers.
|
||||
| 1 | `screw(M4_grub_screw, 6)` | Screw M4 grub x 6mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Radials"></a>
|
||||
## Radials
|
||||
Radial components for PCBs.
|
||||
|
||||
[vitamins/radials.scad](vitamins/radials.scad) Object definitions.
|
||||
|
||||
[vitamins/radial.scad](vitamins/radial.scad) Implementation.
|
||||
|
||||
[tests/radials.scad](tests/radials.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `rd_xtal_flange(type)` | Crystal flange width and thickness |
|
||||
| `rd_xtal_lead_d(type)` | Crystal lead diameter |
|
||||
| `rd_xtal_pitch(type)` | Crystal lead pitch |
|
||||
| `rd_xtal_size(type)` | Crystal length, width and height and optional corner radius |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `cylindrical_wrap(r, h = eps)` | Wrap a 2D child extruded to height `h` around a cylinder with radius `r`. |
|
||||
| `rd_xtal(type, value, z = 0, pitch = undef, tail = 3)` | Draw a crystal |
|
||||
|
||||
![radials](tests/png/radials.png)
|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `rd_xtal(ACT1100, "ACT1100")` | Crystal ACT1100 ACT1100 |
|
||||
| 1 | `rd_xtal(ACT1700, "ACT1700")` | Crystal ACT1700 ACT1700 |
|
||||
| 1 | `rd_xtal(C_002RX, "C_002RX")` | Crystal C_002RX C_002RX |
|
||||
| 1 | `rd_xtal(HC49, "HC49")` | Crystal HC49 HC49 |
|
||||
| 1 | `rd_xtal(HC49_4H, "HC49_4H")` | Crystal HC49_4H HC49_4H |
|
||||
| 1 | `pcb(PERF60x40)` | Perfboard 60 x 40mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@ -3748,6 +3793,7 @@ Surface mount components for PCBs.
|
||||
| 1 | `smd_resistor(RES0603, 1R0)` | SMD resistor 0603 1R0 0.1W |
|
||||
| 1 | `smd_resistor(RES0805, 10M)` | SMD resistor 0805 10M 0.125W |
|
||||
| 1 | `smd_resistor(RES1206, 100K)` | SMD resistor 1206 100K 0.25W |
|
||||
| 1 | `smd_soic(SOIC14)` | SOIC14 package SOIC14 |
|
||||
| 1 | `smd_soic(SOIC16)` | SOIC16 package SOIC16 |
|
||||
| 1 | `smd_soic(SOIC18)` | SOIC18 package SOIC18 |
|
||||
| 1 | `smd_soic(SOIC8)` | SOIC8 package SOIC8 |
|
||||
|
@ -21,6 +21,7 @@ include <../vitamins/microswitches.scad>
|
||||
include <../vitamins/d_connectors.scad>
|
||||
include <../vitamins/leds.scad>
|
||||
include <../vitamins/axials.scad>
|
||||
include <../vitamins/radials.scad>
|
||||
include <../vitamins/smds.scad>
|
||||
include <../vitamins/7_segments.scad>
|
||||
include <../vitamins/potentiometers.scad>
|
||||
@ -117,6 +118,13 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 80, 17, 0, "ax_res", res1_4, 100, 2, inch(0.1)],
|
||||
[ 80, 22, 0, "ax_res", res1_2, 10, 10, inch(0.2)],
|
||||
|
||||
[ 33, 110, -90, "rd_xtal", HC49, "4MHz" ],
|
||||
[ 28, 110, -90, "rd_xtal", HC49_4H, "10MHz" ],
|
||||
[ 28, 103, -90, "rd_xtal", C_002RX, "60KHz", 2 ],
|
||||
|
||||
[ 30, 130,-90, "rd_xtal", ACT1100, "40MHz", 0.5 ],
|
||||
[ 30, 150,-90, "rd_xtal", ACT1700, "80MHz", 0.5 ],
|
||||
|
||||
[ 60, 3, 0, "flex"],
|
||||
[ 50, 15, -90, "flat_flex"],
|
||||
[ 40, 15, -90, "flat_flex", true],
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 186 KiB |
BIN
tests/png/radials.png
Normal file
BIN
tests/png/radials.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 214 KiB |
32
tests/radials.scad
Normal file
32
tests/radials.scad
Normal file
@ -0,0 +1,32 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2023
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib 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.
|
||||
//
|
||||
// NopSCADlib 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 NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/pcbs.scad>
|
||||
|
||||
module radials() {
|
||||
pcb = PERF60x40;
|
||||
pcb(pcb);
|
||||
|
||||
for(i = [0 : len(rd_xtals) - 1])
|
||||
pcb_grid(pcb, [0.5, 1, 1.5, 9, 1][i], [0, 2, 6.5, 6.5, 11][i])
|
||||
rd_xtal(rd_xtals[i], value = rd_xtals[i][0], z = 1.5, pitch = [inch(0.1), inch(0.2), [inch(0.3), inch(0.3)], [inch(0.6), inch(0.3)], inch(0.2)][i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
radials();
|
@ -37,6 +37,7 @@ use <d_connector.scad>
|
||||
use <led.scad>
|
||||
use <dip.scad>
|
||||
use <axial.scad>
|
||||
use <radial.scad>
|
||||
use <smd.scad>
|
||||
use <terminal.scad>
|
||||
include <potentiometers.scad>
|
||||
@ -1133,6 +1134,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "led")) translate_z(eps) led(comp[4], comp[5], 2.6);
|
||||
if(show(comp, "pdip")) pdip(comp[4], comp[5], param(6, false), param(7, inch(0.3)));
|
||||
if(show(comp, "ax_res")) ax_res(comp[4], comp[5], param(6, 5), param(7, 0));
|
||||
if(show(comp, "rd_xtal")) rd_xtal(type = comp[4], value = param(5, undef), z = param(6, 0), pitch = param(7, undef)); // type, value, z, forced pitch
|
||||
if(show(comp, "link")) wire_link(l = comp[4], h = param(5, 1), d = param(6, 0.8), tail = param(7, 3));
|
||||
if(show(comp, "D_plug")) translate_z(d_pcb_offset(comp[4])) d_plug(comp[4], pcb = true);
|
||||
if(show(comp, "molex_hdr")) molex_254(comp[4], param(5, 0), param(6, undef));
|
||||
|
@ -20,6 +20,7 @@ include <microswitches.scad>
|
||||
include <d_connectors.scad>
|
||||
include <leds.scad>
|
||||
include <axials.scad>
|
||||
include <radials.scad>
|
||||
include <smds.scad>
|
||||
include <green_terminals.scad>
|
||||
include <7_segments.scad>
|
||||
|
137
vitamins/radial.scad
Normal file
137
vitamins/radial.scad
Normal file
@ -0,0 +1,137 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2023
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib 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.
|
||||
//
|
||||
// NopSCADlib 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 NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Radial components for PCBs.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/sweep.scad>
|
||||
include <../utils/rounded_polygon.scad>
|
||||
include <../utils/rounded_cylinder.scad>
|
||||
|
||||
function rd_xtal_size(type) = type[1]; //! Crystal length, width and height and optional corner radius
|
||||
function rd_xtal_flange(type) = type[2]; //! Crystal flange width and thickness
|
||||
function rd_xtal_pitch(type) = type[3]; //! Crystal lead pitch
|
||||
function rd_xtal_lead_d(type) = type[4]; //! Crystal lead diameter
|
||||
|
||||
module cylindrical_wrap(r, h = eps) { //! Wrap a 2D child extruded to height `h` around a cylinder with radius `r`.
|
||||
sides = r2sides(r);
|
||||
dx = 2 * r * tan(180 / sides);
|
||||
for(i = [0 : sides - 1])
|
||||
rotate((i - 0.5) * 360 / sides)
|
||||
translate([0, r])
|
||||
rotate([-90, 0, 0])
|
||||
linear_extrude(h, center = true)
|
||||
intersection() {
|
||||
translate([(sides / 2 - i) * -dx, 0])
|
||||
children();
|
||||
|
||||
square([dx, inf], center = true);
|
||||
}
|
||||
}
|
||||
|
||||
module lead_positions(p, z) {
|
||||
if(is_list(p))
|
||||
for($x = [-1, 1], $y = [-1, 1])
|
||||
translate([$x * p.x / 2, $y * p.y / 2, z])
|
||||
children();
|
||||
else
|
||||
for($x = [-1, 1])
|
||||
translate([$x * p / 2, 0, z])
|
||||
children();
|
||||
}
|
||||
|
||||
module radial_leads(ap, p, z, d, tail)
|
||||
color(silver) {
|
||||
assert(p == ap || z > 3 * d, "Must be space to bend the wires");
|
||||
zl = tail + (p == ap ? z : 0);
|
||||
let($fn = 16) {
|
||||
lead_positions(p, -tail)
|
||||
rotate(90)
|
||||
cylinder(d = d, h = zl);
|
||||
|
||||
|
||||
if(p != ap) {
|
||||
assert(!is_list(p), "Bending four leads not supported yet");
|
||||
sd = d * sign(p - ap);
|
||||
path = [[0, z, 0], [0 + sd, z - d / 2, -sd], [p / 2 - ap / 2 - sd, d / 2, sd], [p / 2 - ap / 2, 0, 0]];
|
||||
rpath = let($fn = 32) rounded_polygon(path);
|
||||
lead_positions(ap, 0)
|
||||
rotate([90, 0, 90 * -$x + 90])
|
||||
sweep([for(p = rpath) [p.x, p.y, 0]], circle_points(d / 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module rd_xtal(type, value, z = 0, pitch = undef, tail = 3) { //! Draw a crystal
|
||||
vitamin(str("rd_xtal(", type[0], ", \"", value, "\"): Crystal ", type[0], " ", value));
|
||||
s = rd_xtal_size(type);
|
||||
r = len(s) < 4 ? s.y / 2 - eps : s[3];
|
||||
f = rd_xtal_flange(type);
|
||||
cp = rd_xtal_pitch(type);
|
||||
p = is_undef(pitch) ? cp : pitch;
|
||||
d = rd_xtal_lead_d(type);
|
||||
r2 = 0.2;
|
||||
|
||||
color(silver) {
|
||||
translate_z(z) {
|
||||
if(s.y) {
|
||||
$fn = 32;
|
||||
rounded_rectangle([s.x, s.y, s.z - r2], r);
|
||||
|
||||
translate_z(s.z - r2)
|
||||
rounded_top_rectangle([s.x, s.y, r2], r, r2);
|
||||
}
|
||||
else
|
||||
let($fn = 32)
|
||||
rounded_cylinder(r = s.x / 2, h = s.z, r2 = r2);
|
||||
|
||||
if(f) {
|
||||
rounded_rectangle([s.x + 2 * f.x, s.y + 2 * f.x, f[1]], r + f.x);
|
||||
|
||||
if(is_list(cp))
|
||||
translate([-s.x / 2 - f.x, -s.y / 2 - f.x])
|
||||
cube([r + f.x, r + f.x, f[1]]); // Pin 1 marked by sharp corner on 4 pin packages
|
||||
}
|
||||
}
|
||||
radial_leads(cp, p, z, d, tail);
|
||||
}
|
||||
|
||||
color(grey(10)) {
|
||||
if(!is_undef(value))
|
||||
if(s.y)
|
||||
translate_z(z + s.z)
|
||||
linear_extrude(eps)
|
||||
resize([s.x * 0.75, s.y / 2])
|
||||
text(value, halign = "center", valign = "center");
|
||||
else
|
||||
translate_z(z + s.z / 2)
|
||||
let($fn = 32)
|
||||
cylindrical_wrap(s.x / 2)
|
||||
rotate(-90)
|
||||
resize([s.z * 0.9, s.x * PI / 4])
|
||||
text(value, halign = "center", valign = "center");
|
||||
if(s.y)
|
||||
lead_positions(cp, z)
|
||||
cylinder(d = d * 4, h = 2 * eps, center = true);
|
||||
else
|
||||
translate_z(z)
|
||||
cylinder(d = (s.x + cp) / 2, h = 2 * eps, center = true);
|
||||
}
|
||||
}
|
33
vitamins/radials.scad
Normal file
33
vitamins/radials.scad
Normal file
@ -0,0 +1,33 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2023
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib 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.
|
||||
//
|
||||
// NopSCADlib 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 NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Radial components for PCBs.
|
||||
//
|
||||
|
||||
// Crystals
|
||||
HC49 = ["HC49", [10.5, 3.7, 13.5], [0.475, 0.6], 4.88, 0.45];
|
||||
HC49_4H = ["HC49_4H", [10.5, 3.7, 3.5], [0.475, 0.6], 4.88, 0.43];
|
||||
C_002RX = ["C_002RX", [ 2.0, 0, 6], false, 0.7, 0.2];
|
||||
ACT1700 = ["ACT1700", [10.8, 10.8, 5.3, 1], [1, 0.6], [ inch(0.3), inch(0.3)], 0.45 ];
|
||||
ACT1100 = ["ACT1100", [20.4, 10.8, 5.3, 1], [1, 0.6], [ inch(0.6), inch(0.3)], 0.45 ];
|
||||
|
||||
rd_xtals = [C_002RX, HC49_4H, ACT1700, ACT1100, HC49];
|
||||
|
||||
use <radial.scad>
|
Loading…
x
Reference in New Issue
Block a user