Search found 885 matches

Go to advanced search

by keithsloan52
Sat Aug 17, 2019 7:29 am
Forum: Developers corner
Topic: Output a single STEP file from muliple shapes.
Replies: 30
Views: 518

Re: Output a single STEP file from muliple shapes.

I found https://searchcode.com/codesearch/view/1618194/

and Part has

Code: Select all

 __toPythonOCC__(Part.Shape)
Description: Helper method to convert an internal shape to pythonocc shape
Returns: an OCC.Shape
But is there a better way?
by keithsloan52
Sat Aug 17, 2019 2:43 am
Forum: Developers corner
Topic: Output a single STEP file from muliple shapes.
Replies: 30
Views: 518

Output a single STEP file from muliple shapes.

Okay in my GDML workbench the GDML solids are implemented as FreeCAD python objects, but apart from having the GDML solid parameters they also each have a Shape for FreeCAD display purposes. I have asked in the Geant4 forum if people would find it useful if apart from importing, editing the GDML if ...
by keithsloan52
Thu Aug 15, 2019 3:27 pm
Forum: Python scripting and macros
Topic: PYTHONPATH ignored
Replies: 7
Views: 1733

Re: PYTHONPATH ignored

I am trying to test a source build of a python module/library that exists.

If I start with freecad -P <location of built>

Will FreeCAD not still pick up the original version?
by keithsloan52
Thu Aug 15, 2019 10:25 am
Forum: Python scripting and macros
Topic: Where does FreeCAD find Python modules/Libraries
Replies: 5
Views: 189

Where does FreeCAD find Python modules/Libraries

I have bit a bug, missing function in lxml so am building it from source.
For testing I now need to get my FreeCAD workbench to pick it up from where I have built it.

Also is there something different on the Mac, something about needing a link from the Resources?
by keithsloan52
Tue Aug 13, 2019 8:25 pm
Forum: Developers corner
Topic: FreeCAD.getResourceDir()
Replies: 13
Views: 419

Re: FreeCAD.getResourceDir()

Okay use of FreeCAD.getHomePath() rather than FreeCAD.getResourceDir() fixed things.

Wondering if it is just a bug in the Mac version of FreeCAD.getResourceDir()?
by keithsloan52
Tue Aug 13, 2019 11:03 am
Forum: Developers corner
Topic: FreeCAD.getResourceDir()
Replies: 13
Views: 419

Re: FreeCAD.getResourceDir()

The issue seems to be with use of : in the path name i.e. FreeCADGui.addIconPath(":/icons") I assume the : means some sort of relative reference, but relative to what? The plot thickens. When I go check the OpenSCAD icons subdirectory of Resources I only see the workbench svg so it must be getting t...
by keithsloan52
Tue Aug 13, 2019 10:47 am
Forum: Developers corner
Topic: FreeCAD.getResourceDir()
Replies: 13
Views: 419

Re: FreeCAD.getResourceDir()

Where is your module installed? Is it also a build-in or is it pure python and external. If the latter is the case you can try using: FreeCAD.getUserAppDataDir() It is python and also needs lxml I use softlinks so that it appears as a subdirectory of FreeCAD's Mod called GDML i.e. on Linux ls -las ...
by keithsloan52
Tue Aug 13, 2019 7:29 am
Forum: Developers corner
Topic: FreeCAD.getResourceDir()
Replies: 13
Views: 419

Re: FreeCAD.getResourceDir()

Okay just to check my understanding I take it there are three methods of defining/installing Modules 1) Adding a Module in a sub directory of FreeCAD/Mod 2) Installable workbench 3) This new way which can be installed via pip? Is the new style strategic? Is it what the community is committed to movi...
by keithsloan52
Mon Aug 12, 2019 4:12 pm
Forum: Developers corner
Topic: FreeCAD.getResourceDir()
Replies: 13
Views: 419

Re: FreeCAD.getResourceDir()

Just in case it makes a difference OS: macOS 10.14 Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.16131 (Git) Build type: Release Branch: (HEAD detached at 0.18.3) Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3 Python version: 3.6.7 Qt version: 5.6.2 Coin version: 4.0.0a OCC vers...
by keithsloan52
Mon Aug 12, 2019 12:18 am
Forum: Developers corner
Topic: FreeCAD.getResourceDir()
Replies: 13
Views: 419

Re: FreeCAD.getResourceDir()

During initialization the error name '__file__' is not defined occurred in /Applications/FreeCAD.app/Contents/Resources/Mod/GDML/InitGui.py In new-style workbenches, you should have init_gui.py instead of InitGui.py. Your workbench is still old-style. Thanks Tried renaming InitGui.py to initGui.py ...

Go to advanced search