From ab8a986a1cd9778d8f70173c868d96085697839f Mon Sep 17 00:00:00 2001 From: Jeremy Wright Date: Sat, 6 Dec 2014 22:21:26 -0500 Subject: [PATCH] Added a comment about the default introduction example. --- CadQuery/Examples/Ex000_Introduction.py | 2 ++ CadQuery/Libs/cadquery/freecad_impl/__init__.py | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CadQuery/Examples/Ex000_Introduction.py b/CadQuery/Examples/Ex000_Introduction.py index e4fa87f..f179cf0 100644 --- a/CadQuery/Examples/Ex000_Introduction.py +++ b/CadQuery/Examples/Ex000_Introduction.py @@ -1,6 +1,8 @@ # This example is meant to be used from within the CadQuery module of FreeCAD. # From within FreeCAD, you can make changes to this script and then click # CadQuery > Execute Script, or you can press F2. +# There are more examples in the Examples directory included with this module. +# Ex026_Lego_Brick.py is highly recommended as a great example of what CadQuery can do. import cadquery import Part diff --git a/CadQuery/Libs/cadquery/freecad_impl/__init__.py b/CadQuery/Libs/cadquery/freecad_impl/__init__.py index 069fcd3..5b3fafa 100644 --- a/CadQuery/Libs/cadquery/freecad_impl/__init__.py +++ b/CadQuery/Libs/cadquery/freecad_impl/__init__.py @@ -37,6 +37,7 @@ def _fc_path(): os.path.join(os.path.expanduser("~"), "lib/freecad/lib"), "/usr/local/lib/freecad/lib", "/usr/lib/freecad/lib", + "/opt/freecad/lib/", "/usr/bin/freecad/lib", ]: if os.path.exists(_PATH): @@ -84,6 +85,14 @@ def _fc_path(): ]: if os.path.exists(_PATH): return _PATH + else: + #Assume we're dealing with a Mac + for _PATH in [ + os.path.join(os.path.expanduser("~"), "~/Library/Application Support/FreeCAD/lib"), + "/Applications/FreeCAD.app/lib", + ]: + if os.path.exists(_PATH): + return _PATH #Make sure that the correct FreeCAD path shows up in Python's system path -sys.path.insert(0, _fc_path()) \ No newline at end of file +sys.path.insert(0, _fc_path())