Skip to content

import_scad() does not look in 'Installation library' location #194

Description

@occivink

Hi,

'Installation library' is the terminology used on the OpenScad wiki and described as:
"The Installation library location is the libraries directory under the directory where OpenSCAD is installed."
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

So this use <MCAD/2Dshapes.scad> is valid in openscad,
in SolidPython import_scad("MCAD/2Dshapes.scad") is not valid, it fails with the error

Locations searched were: [PosixPath('MCAD/2Dshapes.scad'), PosixPath('/home/user/.local/share/OpenSCAD/libraries/MCAD/2Dshapes.scad')]

indicating that the installation library path is not search at all.

This is occuring with solidpython 1.1.1 on arch linux

Activity

  1. jeff-dh commented on Feb 13, 2022

    @jeff-dh
    Collaborator

    already mentioned in #176

    (more or less a duplicate, even though the main issue in #176 is a different)

  2. jeff-dh commented on Feb 13, 2022

    @jeff-dh
    Collaborator

    Btw: If you plan to use sophisticated OpenSCAD libraries, it might be worth to have a look at expSolid, because there are several issues with OpenSCAD libraries in the master branch (i.e. #173, #176).

  3. occivink commented on Feb 13, 2022

    @occivink
    Author

    Thanks for the hint. I was experimenting with dotScad but so far it seems to work as expected. I'll keep your warning in mind though

  4. etjones commented on Feb 15, 2022

    @etjones
    Contributor

    Hi @occivink. Thanks for noting this. I wasn't aware of this extra library location. Is there a standard installation spot on Linux systems? On MacOS or Windows, that's pretty well defined, but it seems like different Linux distributions have different app layouts. If we have some solid guesses about where to try, I can make sure those paths are searched.

  5. occivink commented on Feb 15, 2022

    @occivink
    Author

    On Arch linux, Ubuntu and Fedora this path is /usr/share/openscad/libraries, so maybe this a rare case where distributions can actually agree on something

  6. etjones commented on Feb 15, 2022

    @etjones
    Contributor

    That's great. I'll add that to the search paths. Was just looking at the linux install page and I counted 9 different install methods so I don't know if this covers all the bases, but I guess that's why there's a designated libraries directory separate from the app install.

  7. added a commit that references this issue on Feb 15, 2022
  8. etjones commented on Feb 15, 2022

    @etjones
    Contributor

    Should be fixed in v1.1.3, on PyPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions