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

[WIP] Python 3 Compatibility #374

Merged
merged 7 commits into from
Jun 29, 2020
Merged

[WIP] Python 3 Compatibility #374

merged 7 commits into from
Jun 29, 2020

Conversation

Qbort
Copy link
Contributor

@Qbort Qbort commented Jun 18, 2020

Fix Python 3 (FreeCad 0.18) compatibility.

Other fixes / cleanup carried out:

  • Removed ribbon.py duplicate in cadquery/FCAD_script_generator/4UCON_17809/cq_models/ribbon.py
  • Defined reload_lib() in cq_cad_tools.py for cleaner code
  • More functionality added to check_requirements() for cleaner code:
    *Created open_CQ_Example() - this is required to be called before close_CQ_Example(), otherwise an exception is raised
    *Added tests open_CQ_Example() and close_CQ_Example() into check_requirements().
    *Removed references of close_CQ_Example() in the files from modules 4UCON_17809, BGA_packages and QFN_packages, since this is covered by check_requirements().

Current status:

  • 4UCON_17809
  • Altech
  • Battery
  • BGA_packages
  • Box_Headers
  • Buzzer_Beeper
  • Capacitor_THT
  • Connector_Audio
  • Connector_Coaxial
  • Connector_Dsub
  • Connector_FFC-FPC
  • Connector_PinHeader
  • Connector_USB
  • Conn_PinSocket
  • Conn_Stocko
  • Converter_ACDC
  • Converter_DCDC
  • CP_Radial_SMD
  • CP_Radial_THT
  • CP_Tantalum_SMD
  • CP_Tantalum_THT
  • Crystal
  • C_Chip_SMD
  • C_Trimmer
  • diodes_SMx_SMD
  • DIP_packages
  • DIP_parts
  • Directfet_SMD
  • exportVRML
  • Filter
  • Flat_Pin_packages
  • Fuse
  • GW_QFP_SOIC_SSOP_TSSOP_SOT
  • Inductors_SMD
  • jst
  • LED_SMD
  • L_Chip_SMD
  • molex
  • Molex_5569
  • mounting_wuerth
  • Package_SIP
  • phoenix_contact
  • Potentiometer_THT
  • QFN_packages
  • Relay_THT
  • resistors_array_SMD
  • Resistor_SMD
  • Resistor_THT
  • RF_Antenna_Chip_SMD
  • Standoff_FF_MF
  • Switch_SMD
  • TerminalBlock_Phoenix
  • TO_SOT_Packages_SMD_custom
  • Transformer_THT
  • Valves
  • Varistor
  • WIP

- 4UCON_17809  - Tested FC 0.17 & FC 0.18
- BGA_packages - Tested FC 0.17 & FC 0.18
- QFN_packages - Tested FC 0.17 & FC 0.18. Fixes issue easyw#373  Note: In FreeCad 0.17 the "Report View" shows the warning "File format not supported: DFN-6-1EP_1.2x1.2mm_P0.4mm_EP0.3x0.94mm ", but it still generates the 3D model

Other fixes / cleanup:
- Removed ribbon.py duplicate in cadquery/FCAD_script_generator/4UCON_17809/cq_models/ribbon.py
- Defined reload_lib() in cq_cad_tools.py
- More functionality to check_requirements() for cleaner code
   *Created open_CQ_Example() - this is required to be called before close_CQ_Example(), otherwise an exception is raised
   *Added tests open_CQ_Example() and close_CQ_Example() into check_requirements().
   *Removed references of close_CQ_Example() in the files from modules 4UCON_17809, BGA_packages and QFN_packages, since this is covered by check_requirements().
@Qbort
Copy link
Contributor Author

Qbort commented Jun 18, 2020

First commit:

@Qbort
Copy link
Contributor Author

Qbort commented Jun 18, 2020

@easyw Before I go too far with these changes, would you be able to check the ones I've done so far in case you want me to change the approach?

In particular regarding reload_lib. I have defined this function just once in cq_cad_tools.py so that I don't need to keep re-creating the function.

Thanks.

Generic python3 fixes and other manual fixes. Works fine in FC 0.17, but in FC 0.18 screen goes black.
@Qbort
Copy link
Contributor Author

Qbort commented Jun 21, 2020

Buzzer_Beeper generator module marked as done for purpose of this pull request (all python3 fixes are done). However there is another issue that needs resolving. See: #375

@easyw easyw merged commit 28fd355 into easyw:master Jun 29, 2020
@easyw
Copy link
Owner

easyw commented Jun 29, 2020

Thx

@Qbort
Copy link
Contributor Author

Qbort commented Jun 30, 2020

@easyw I hadn't finished yet... i had only done 10 out of 57 modules. It was marked as [WIP] for that reason...

Anyway I'll keep working on updates offline and submit a merge request when I'm finished to avoid too many merge requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants