Permissions to Documents on MacOS - BSOL OpenSCAD library

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
keithsloan52
Posts: 2090
Joined: Mon Feb 27, 2012 5:31 pm

Permissions to Documents on MacOS - BSOL OpenSCAD library

Post by keithsloan52 »

I am trying to use the BOSL OpenSCAD library https://github.com/revarbat/BOSL I have installed as per the instructions and all works if I use the OpenSCAD GUI.

But If I try and import into FreeCAD a scad file that uses I get the following errors
18:58:37 WARNING: Can't open include file 'BOSL/constants.scad'.
WARNING: Can't open library file '/Users/keithsloan/Documents/OpenSCAD/libraries/BOSL/shapes.scad'

WARNING: Ignoring unknown module 'cuboid' in file Cube_Fillet.scad, line 3
Seems to be a problem with MacOS as @chennes reports it works on Windows.

If I perform the following from the FreeCAD python console I get

Code: Select all

>>> os.listdir(os.curdir)
['home', 'usr', '.DS_Store', '.PKInstallSandboxManager-SystemSoftware', 'bin', 'sbin', '.file', 'etc', 'var', 'Library', '.Trashes', 'System', '.VolumeIcon.icns', '.fseventsd', 'private', '.vol', 'Users', 'Applications', 'opt', 'dev', 'Volumes', 'tmp', 'cores']
>>> os.listdir('/Users/keithsloan')
['exported.step', '.config', '.macports', 'Music', '.gmshrc', '.zprofile.pysave', '.condarc', '.docker', '.qt', 'quad', 'alice.gdml', 'Jupyter_FreeCAD', '.vim', '.DS_Store', '.avidemux6', 'testA.scad', '.thumbnails', '.CFUserTextEncoding', 'BezierCurve_screenshot.png', 'test', '.maplesoft', '.hgignore_global', 'g4e_output.geo.gdml', '.subversion', 'exported.brep', 'HouseK&T.pdf', 'exported', '.rtd-remote', 'juypter-notebooks', 'Creative Cloud Files', 'Pictures', 'test.gdml', '.zprofile', 'Maple', 'prism', '.invesalius', 'Qt', 'MastersThesis.lyx', '.flexlmrc', 'prism.brep', '.zsh_history', '.ipython', 'Desktop', 'Library', '.matplotlib', '.oracle_jre_usage', '.gitignore_global', '.cups', 'MSc_Project', 'saveTT', 'Public', 'getting-started', 'solids1', 'GeantV', 'MEGA', 'fc-03428-609331-000004.dxf', 'RootsMagic', '.anaconda', '.ssh', 'blender-git', 'Movies', 'Applications', 'ce_EMCAL_GVol_Logic', '.Trash', 'wfi', '.gitflow_export', 'MEGAsync Downloads', '.jupyter', 'Case Study', 'Documents', 'test3.gdml', '.vscode', '.bash_profile', 'untitled.geo', '.Xauthority', '.nx', '.skycat', 'Downloads', '.python_history', '.cache', '.gitconfig', 'auxilliary.gdml', 'GDML.wiki', 'GAMOS', '.bash_history', '.viminfo', 'test2.gdml', '.astropy', 'gemc.log', '.conda', 'ce_EMCAL_GVol_Logic_2']
>>> os.listdir('/Users/keithsloan/Documents')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
PermissionError: [Errno 1] Operation not permitted: '/Users/keithsloan/Documents'
Test scad file being used

Code: Select all

include <BOSL/constants.scad>
use <BOSL/shapes.scad>
cuboid([30,40,50],fillet=10);
keithsloan52
Posts: 2090
Joined: Mon Feb 27, 2012 5:31 pm

Re: Permissions to Documents on MacOS - BSOL OpenSCAD library

Post by keithsloan52 »

This web page has info on allowing an application called nicepage to access the Documents folder
https://nicepage.com/doc/84207/access-d ... lder-macos

Following the procedure OpenSCAD and a number of other apps show up and allow access. FreeCAD does NOT !! :-(
Looks like FreeCAD on a Mac is not doing all it should visa vi security on the Mac.
Post Reply