Skip to content

Connector_PinHeader generator script improvements

I made several improvements to the generator Connector_PinHeader/main_generator_cq_1.py:

  • Change output_directory to destination_dir as the latter is the one used in cq_parameters.yaml

  • Use os.path.join to join destination_dir path

  • Use Loader parameter when calling yaml.load.

    Use of yaml.load(input) was deprecated in PyYAML 5.1+ :

    https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
  • Accept a pin list string instead 'from' and 'to' dict

  • Added new script name to list, otherwise freecad <script_name> does nothing:

if __name__ == "__main__" or __name__ == "main_generator" or __name__ == "main_generator_cq_1":

Merge request reports