diff --git a/cadquery/FCAD_script_generator/Converter_DCDC/cq_parameters.py b/cadquery/FCAD_script_generator/Converter_DCDC/cq_parameters.py index f53e35d9..cfab9750 100644 --- a/cadquery/FCAD_script_generator/Converter_DCDC/cq_parameters.py +++ b/cadquery/FCAD_script_generator/Converter_DCDC/cq_parameters.py @@ -1,6 +1,5 @@ - -# -*- coding: utf8 -*- #!/usr/bin/python +# -*- coding: utf8 -*- # # This is derived from a cadquery script for generating QFP/GullWings models in X3D format. # @@ -55,7 +54,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): ]) all_params = { - 'Converter_DCDC_Cincon_EC5BExx_Single_THT': Params( # ModelName # # @@ -79,7 +77,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Cincon_EC5BExx_Dual_THT': Params( # ModelName # # @@ -103,7 +100,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Cincon_EC6Cxx_Single_THT': Params( # ModelName # # @@ -126,7 +122,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Cincon_EC6Cxx_Dual-Triple_THT': Params( # ModelName # # @@ -150,7 +145,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Bothhand_CFUSxxxx_THT': Params( # ModelName # # @@ -174,7 +168,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Bothhand_CFUSxxxxEH_THT': Params( # ModelName # # @@ -198,7 +191,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Bothhand_CFUDxxxx_THT': Params( # ModelName # # @@ -222,7 +214,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_MeanWell_NID30_THT': Params( # ModelName # # @@ -246,7 +237,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_MeanWell_NID60_THT': Params( # ModelName # # @@ -270,6 +260,51 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), + 'Converter_DCDC_Murata_MEE1SxxxxSC_THT': Params( # ModelName + # + # + # + modelName = 'Converter_DCDC_Murata_MEE1SxxxxSC_THT', # Model name + pintype = 'tht', # Pin type, 'tht', 'smd' + L = 11.53, # Package length + W = 6.1, # Package width + H = 10.0, # Package height + A1 = 0.02, # Package board separation + rim = (0.4, 0.4, 0.4), # No rim + pin = (('rect', 0.0, 0.0, 0.5, 0.25, 4.1), ('rect', 2.54, 0.0, 0.5, 0.25, 4.1), ('rect', 5.08, 0.0, 0.5, 0.25, 4.1), ('rect', 7.62, 0.0, 0.5, 0.25, 4.1)), # Pin placement + pin1corner = (-2.08, -4.97), # Left upp corner relationsship to pin 1 + show_top = False, # 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 = -90, # 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 = '../Converter_DCDC.3dshapes' # Destination directory + ), + + 'Converter_DCDC_Murata_MEE3SxxxxSC_THT': Params( # ModelName + # + # + # + modelName = 'Converter_DCDC_Murata_MEE3SxxxxSC_THT', # Model name + pintype = 'tht', # Pin type, 'tht', 'smd' + L = 14.15, # Package length + W = 8.15, # Package width + H = 10.15, # Package height + A1 = 0.02, # Package board separation + rim = (0.4, 0.4, 0.4), # No rim + pin = (('rect', 0.0, 0.0, 0.5, 0.25, 4.1), ('rect', 2.54, 0.0, 0.5, 0.25, 4.1), ('rect', 5.08, 0.0, 0.5, 0.25, 4.1), ('rect', 7.62, 0.0, 0.5, 0.25, 4.1)), # Pin placement + pin1corner = (-3.265, -6.925), # Left upp corner relationsship to pin 1 + show_top = False, # 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 = -90, # 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 = '../Converter_DCDC.3dshapes' # Destination directory + ), 'Converter_DCDC_Murata_NCS1SxxxxSC_THT': Params( # ModelName # @@ -294,7 +329,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Murata_CRE1xxxxxx3C_THT': Params( # ModelName # # @@ -318,7 +352,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Murata_CRE1xxxxxxDC_THT': Params( # ModelName # # @@ -342,7 +375,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Murata_CRE1xxxxxxSC_THT': Params( # ModelName # # @@ -366,7 +398,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Murata_NMAxxxxDC_THT': Params( # ModelName # # @@ -390,7 +421,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Murata_NMAxxxxSC_THT': Params( # ModelName # # @@ -413,7 +443,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_Murata_NXE2SxxxxMC_THT': Params( # ModelName # # @@ -460,7 +489,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_RECOM_R-78E-0.5_THT': Params( # ModelName # # @@ -484,7 +512,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_RECOM_R-78HB-0.5_THT': Params( # ModelName # # @@ -508,7 +535,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_RECOM_R-78S-0.1_THT': Params( # ModelName # # @@ -532,7 +558,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_RECOM_R-78HB-0.5L_THT': Params( # ModelName # # @@ -556,7 +581,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_RECOM_R5xxxDA_THT': Params( # ModelName # # @@ -580,7 +604,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_RECOM_R5xxxPA_THT': Params( # ModelName # # @@ -604,7 +627,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TMR-1SM_SMD': Params( # ModelName # # @@ -628,7 +650,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TMR-1-xxxx_Single_THT': Params( # ModelName # # @@ -652,7 +673,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TMR-1-xxxx_Dual_THT': Params( # ModelName # # @@ -676,7 +696,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TMR-xxxx_THT': Params( # ModelName # # @@ -700,7 +719,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TSR-1_THT': Params( # ModelName # # @@ -724,7 +742,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TEN10-xxxx_THT': Params( # ModelName # # @@ -748,7 +765,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TEN10-xxxx_Single_THT': Params( # ModelName # # @@ -772,7 +788,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TEN10-xxxx_Dual_THT': Params( # ModelName # # @@ -796,7 +811,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TEN20-xxxx_THT': Params( # ModelName # # @@ -820,7 +834,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TEN20-xxxx-N4_THT': Params( # ModelName # # @@ -844,7 +857,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TEN20-xxxx_Single_THT': Params( # ModelName # # @@ -868,7 +880,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_TRACO_TEN20-xxxx_Dual_THT': Params( # ModelName # # @@ -892,7 +903,6 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - 'Converter_DCDC_XP_POWER_JTExxxxDxx_THT': Params( # ModelName # # @@ -1239,5 +1249,4 @@ def namedtuple_with_defaults(typename, field_names, default_values=()): pin_color_key = 'metal grey pins', # Pin color dest_dir_prefix = '../Converter_DCDC.3dshapes' # Destination directory ), - } diff --git a/cadquery/FCAD_script_generator/Converter_DCDC/main_generator.py b/cadquery/FCAD_script_generator/Converter_DCDC/main_generator.py index 80adfafb..96c61b09 100644 --- a/cadquery/FCAD_script_generator/Converter_DCDC/main_generator.py +++ b/cadquery/FCAD_script_generator/Converter_DCDC/main_generator.py @@ -1,5 +1,5 @@ -# -*- coding: utf-8 -*- #!/usr/bin/python +# -*- coding: utf-8 -*- # # This is derived from a cadquery script for generating PDIP models in X3D format # @@ -92,7 +92,11 @@ # Import cad_tools import cq_cad_tools # Reload tools -reload(cq_cad_tools) +try: + reload(cq_cad_tools) +except NameError: + import importlib + importlib.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, \