Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relay_THT: Add a new Panasonic model #289

Merged
merged 1 commit into from
Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions cadquery/FCAD_script_generator/Relay_THT/cq_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,40 @@ def namedtuple_with_defaults(typename, field_names, default_values=()):
])

all_params = {

'Relay_1P1T_Panasonic_ADW11_FormA': Params( # ModelName
#
# https://www.panasonic-electric-works.com/pew/es/downloads/ds_dw_hl_en.pdf
#
modelName = 'Relay_1P1T_Panasonic_ADW11_FormA', # Model name
pintype = 'tht', # Pin type, 'tht', 'smd', 'thtsmd' or 'tht_n'
L = 24, # Package length
W = 10, # Package width
H = 18.8, # Package height
A1 = 0.1, # Package board seperation
#rim_h = 0.7 # TODO: Improve the model by adding the correct rim
#rim = (
# (5, 1.25, 2, -0.5),
# (17, 1.25, 2, -0.5),
# (5, -8.75, 2, 0.5),
# (15, -8.75, 2, 0.5)),
pin = (
(0.0, 0.0, 'round', 0.4),
(0.0, -7.5, 'round', 0.4),
(21, 0.0, 'rect', 0.8, 0.2),
(17.5, -7.5, 'rect', 0.8, 0.2)), # Pin placement
pin1corner = (-1.5, -8.75), # Left up corner relationsship to pin 1
pinpadh = 3.5, # Pin length, pad height
pinpadsize = 1.0, # Pin diameter or pad size
show_top = 0, # If top should be visible or not
corner = 'none', # If top should be cut, 'none', 'chamfer' or 'fillet'
roundbelly = 0, # If belly of caseing should be round (or flat)
rotation = 0, # If belly of caseing should be round (or flat)
body_color_key = 'black body', # Body color
body_top_color_key = 'black body', # Body top color
pin_color_key = 'metal grey pins', # Pin color
dest_dir_prefix = '../Relay_THT.3dshapes' # Destination directory
),

'Relay_SPST_SANYOU_SRD_Series_Form_A': Params( # ModelName
#
Expand Down
12 changes: 11 additions & 1 deletion cadquery/FCAD_script_generator/Relay_THT/main_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,17 @@
# Import cad_tools
import cq_cad_tools
# Reload tools
reload(cq_cad_tools)
'''
try:
import importlib
importlib.reload(module)
except Exception:
try:
import imp
imp.reload(module)
except Exception:
reload(cq_cad_tools)
'''
# Explicitly load all needed functions
from cq_cad_tools import FuseObjs_wColors, GetListOfObjects, restore_Main_Tools, \
exportSTEP, close_CQ_Example, exportVRML, saveFCdoc, z_RotateObject, Color_Objects, \
Expand Down