From 8d5403260b72115cfd9f401289dfd0f894e272ea Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 29 Apr 2023 11:28:38 +0200 Subject: Fix aperture macro rotation issue and add missing data files --- gerbonara/cad/data/center-pad-spikes.kicad_mod | 16 ++++++++++++++++ gerbonara/cad/data/pad-between-spiked.kicad_mod | 24 ++++++++++++++++++++++++ gerbonara/cad/data/tht-0.8.kicad_mod | 16 ++++++++++++++++ gerbonara/cad/protoboard.py | 1 + 4 files changed, 57 insertions(+) create mode 100644 gerbonara/cad/data/center-pad-spikes.kicad_mod create mode 100644 gerbonara/cad/data/pad-between-spiked.kicad_mod create mode 100644 gerbonara/cad/data/tht-0.8.kicad_mod (limited to 'gerbonara/cad') diff --git a/gerbonara/cad/data/center-pad-spikes.kicad_mod b/gerbonara/cad/data/center-pad-spikes.kicad_mod new file mode 100644 index 0000000..e996861 --- /dev/null +++ b/gerbonara/cad/data/center-pad-spikes.kicad_mod @@ -0,0 +1,16 @@ +(module center-pad-spikes (layer F.Cu) (tedit 5B6B1C50) + (fp_text reference REF** (at 0 -1.4) (layer F.SilkS) hide + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_text value center-pad (at 0.1 -2.7) (layer F.Fab) hide + (effects (font (size 1 1) (thickness 0.15))) + ) + (pad 1 smd custom (at -0.06 -0.085) (size 0.47 0.52) (layers *.Cu *.Mask) + (options (clearance outline) (anchor rect)) + (primitives + (gr_poly (pts + (xy -0.585 0.085) (xy 0.06 -0.56) (xy 0.357 -0.263) (xy 0.583 -0.263) (xy 0.235 0.085) + (xy 0.582 0.432) (xy 0.407 0.432) (xy 0.407 0.607) (xy 0.06 0.26) (xy -0.288 0.608) + (xy -0.288 0.382)) (width 0.001)) + )) +) diff --git a/gerbonara/cad/data/pad-between-spiked.kicad_mod b/gerbonara/cad/data/pad-between-spiked.kicad_mod new file mode 100644 index 0000000..205101e --- /dev/null +++ b/gerbonara/cad/data/pad-between-spiked.kicad_mod @@ -0,0 +1,24 @@ +(module pad-between-spiked (layer F.Cu) (tedit 5B6B1D89) + (descr "Through hole pin header") + (tags "pin header") + (fp_text reference REF** (at 0 -5.1) (layer F.SilkS) hide + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_text value pad-between (at 0 -3.1) (layer F.Fab) hide + (effects (font (size 1 1) (thickness 0.15))) + ) + (pad 1 smd custom (at 0 -0.06) (size 0.7 0.85) (layers *.Cu *.Mask) + (options (clearance outline) (anchor rect)) + (primitives + (gr_poly (pts + (xy -0.55 -0.44) (xy -0.325 -0.44) (xy 0 -0.765) (xy 0.325 -0.44) (xy 0.55 -0.44) + (xy 0.35 -0.24) (xy 0.35 0.36) (xy 0.55 0.56) (xy 0.338 0.56) (xy 0.338 0.763) + (xy 0 0.425) (xy -0.01 0.425) (xy -0.348 0.763) (xy -0.348 0.56) (xy -0.55 0.56) + (xy -0.35 0.36) (xy -0.35 -0.24)) (width 0.001)) + )) + (model Pin_Headers.3dshapes/Pin_Header_Straight_1x01.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 90)) + ) +) diff --git a/gerbonara/cad/data/tht-0.8.kicad_mod b/gerbonara/cad/data/tht-0.8.kicad_mod new file mode 100644 index 0000000..3092f23 --- /dev/null +++ b/gerbonara/cad/data/tht-0.8.kicad_mod @@ -0,0 +1,16 @@ +(module tht-0.8 (layer F.Cu) (tedit 58D96FE6) + (descr "Through hole pin header") + (tags "pin header") + (fp_text reference REF** (at 0 -5.1) (layer F.SilkS) hide + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_text value tht-0.8 (at 0 -3.1) (layer F.Fab) hide + (effects (font (size 1 1) (thickness 0.15))) + ) + (pad 1 thru_hole circle (at 0 0) (size 1.4 1.4) (drill 0.8) (layers *.Cu *.Mask)) + (model Pin_Headers.3dshapes/Pin_Header_Straight_1x01.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 90)) + ) +) diff --git a/gerbonara/cad/protoboard.py b/gerbonara/cad/protoboard.py index 741d8a9..02cbb65 100644 --- a/gerbonara/cad/protoboard.py +++ b/gerbonara/cad/protoboard.py @@ -550,6 +550,7 @@ def _demo(): #pattern = PatternProtoArea(2.54, obj=THTPad.circle(0, 0, 0.9, 1.8, paste=False)) #pattern = PatternProtoArea(2.54, obj=PoweredProto()) pb = ProtoBoard(50, 50, pattern1, mounting_hole_dia=3.2, mounting_hole_offset=5) + #pb = ProtoBoard(10, 10, pattern1) print(pb.pretty_svg()) pb.layer_stack().save_to_directory('/tmp/testdir') -- cgit