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

Draft: Add macOS paths to importDWG.py #9830

Merged

Conversation

Roy-043
Copy link
Contributor

@Roy-043 Roy-043 commented Jun 27, 2023

This PR adds adds handling of macOS paths to importDWG.py.

Paths taken from this forum topic:
https://forum.freecad.org/viewtopic.php?t=79125&start=10

  • Your Pull Request meets the requirements outlined in section 5 of CONTRIBUTING.md for a Valid PR

@github-actions github-actions bot added the WB Draft Related to the Draft Workbench label Jun 27, 2023
@yorikvanhavre yorikvanhavre merged commit 095ad1f into FreeCAD:master Jun 28, 2023
7 checks passed
@yorikvanhavre
Copy link
Member

LGTM!

path = "/usr/bin/ODAFileConverter"
if os.path.exists(path) and os.path.isfile(path):
return path
else: # for macOS
Copy link

@Nailig Nailig Jul 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a check if macOS, else unknown system, same for other if-then-else statements...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree. Two reasons:

  1. FreeCAD officially only supports 3 operating system. Anybody who chooses a different OS is doing so at their own risk.
  2. The if-then-else statements only result in a default path which is then checked. So if an unkown OS is used and the suggested path does not exist there is no problem.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Let’s say we disagree about programming practices.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In any case I don't know what we would do right now on a system that is not mac, linux or windows... I think if someone comes up with a new config, then we see about what paths to use...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Roy-043 FreeBSD fixes are submitted to FreeCAD from time to time. So while it is unofficial, it still supported
https://github.com/search?q=repo%3AFreeCAD%2FFreeCAD%20freebsd&type=code

@Roy-043 Roy-043 deleted the Draft-Add-macOS-paths-to-importDWG.py branch July 15, 2023 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WB Draft Related to the Draft Workbench
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants