Skip to content

Commit

Permalink
Merge pull request #113 from LibrePCB/diode-outline
Browse files Browse the repository at this point in the history
Add script to generate axial THT diodes DO-204
  • Loading branch information
ubruhin authored Sep 16, 2023
2 parents dc0e4bd + a893870 commit 6d3afec
Show file tree
Hide file tree
Showing 10 changed files with 1,447 additions and 15 deletions.
9 changes: 9 additions & 0 deletions cadquery_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
from OCP.Message import Message, Message_Gravity # type: ignore


class StepConstants:
THT_LEAD_SOLDER_LENGTH = 3.0 # Lead length on the PCB solder side


class StepColor:
LEAD_SMT = cq.Color('gainsboro')
LEAD_THT = cq.Color('gainsboro')


class StepAssembly:
"""
A STEP assembly.
Expand Down
8 changes: 8 additions & 0 deletions entities/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ def __init__(self, x: float, y: float, z: float):
self.y = y
self.z = z

@staticmethod
def zero() -> 'Position3D':
return Position3D(0.0, 0.0, 0.0)

def __str__(self) -> str:
return '(3d_position {} {} {})'.format(format_float(self.x), format_float(self.y), format_float(self.z))

Expand All @@ -145,6 +149,10 @@ def __init__(self, x: float, y: float, z: float):
self.y = y
self.z = z

@staticmethod
def zero() -> 'Rotation3D':
return Rotation3D(0.0, 0.0, 0.0)

def __str__(self) -> str:
return '(3d_rotation {} {} {})'.format(format_float(self.x), format_float(self.y), format_float(self.z))

Expand Down
Loading

0 comments on commit 6d3afec

Please sign in to comment.