Search found 877 matches

Go to advanced search

by keithsloan52
Tue Jul 16, 2019 4:07 pm
Forum: Install / Compile
Topic: reinstall of freecad-daily
Replies: 1
Views: 96

reinstall of freecad-daily

Think my copy of freecad-daily got corrupted so did sudo apt-get remove freecad-daily and sudo ap-get purge freecad-daily then installed again sudo apt-get install freecad-daily but on startup I get FreeCAD 0.19, Libs: 0.19R © Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019 ##### #### ### ##...
by keithsloan52
Tue Jul 16, 2019 3:59 pm
Forum: Developers corner
Topic: Function when a workbench opens a new file.
Replies: 19
Views: 647

Re: Function when a workbench opens a new file.

Getting more convinced this is a problem because I am trying to define the workbench in InitGui.py and also the Observer class.
So where else do people put them?
by keithsloan52
Tue Jul 16, 2019 2:42 pm
Forum: Developers corner
Topic: Function when a workbench opens a new file.
Replies: 19
Views: 647

Re: Function when a workbench opens a new file.

I only extended the system sligthly. Have a look at the test cases , there you get a good impression how to use the observers. They are registered in the tests setup method and unregistered in the tests teardown method With your code I don't get the same error, and the objects are created after ope...
by keithsloan52
Tue Jul 16, 2019 12:15 pm
Forum: Developers corner
Topic: Parsing different App::FeaturePython
Replies: 4
Views: 159

Re: Parsing different App::FeaturePython

wmayer wrote:
Tue Jul 16, 2019 9:10 am
You don't really need the Type attribute in your proxy classes. Instead you can use Python's type-system mechanism:

Code: Select all

if isinstance(obj.Proxy, GDMLTriangular):
Thanks
by keithsloan52
Tue Jul 16, 2019 7:22 am
Forum: Developers corner
Topic: Parsing different App::FeaturePython
Replies: 4
Views: 159

Re: Parsing different App::FeaturePython

I have a number of App::FeaturePython classes This being typical class GDMLTriangular(GDMLcommon) : def __init__(self, obj, v1, v2, v3, vtype): obj.addProperty("App::PropertyString","v1","Triangular", \ "v1").v1=v1 obj.addProperty("App::PropertyString","v2","Triangular", \ "v1").v2=v2 obj.addPropert...
by keithsloan52
Mon Jul 15, 2019 4:30 pm
Forum: Developers corner
Topic: Parsing different App::FeaturePython
Replies: 4
Views: 159

Parsing different App::FeaturePython

In scanning a document I am trying to distinguish between objects defined as different App::FeaturePython.

I have tried with

Code: Select all

def __init__(self, obj)
self.Type = 'MyType'
It did not like obj.Type

But cannot see how to successfully test.
by keithsloan52
Mon Jul 15, 2019 7:10 am
Forum: Developers corner
Topic: Debugging shell with check().
Replies: 0
Views: 68

Debugging shell with check().

I am trying to debug some code that creates a shell. When I run shell.check() I get the following Traceback (most recent call last): File "/usr/share/freecad/Mod/GDML/GDMLObjects.py", line 931, in execute shell.check() <class 'ValueError'>: Unorientable shape Unorientable shape Unorientable shape Un...
by keithsloan52
Thu Jul 11, 2019 5:10 pm
Forum: Python scripting and macros
Topic: FreeCAD python object not being entering execute.
Replies: 2
Views: 102

Re: FreeCAD python object not being entering execute.

Most obvious reason would be that the object (the python class) is not properly set as the object's Proxy. Check that the obj.Proxy property actually contains your python class. Usually that is done by setting obj.Proxy = self in the classes __init__.py function Thanks but obj.Proxy = self is alrea...
by keithsloan52
Thu Jul 11, 2019 1:00 pm
Forum: Python scripting and macros
Topic: FreeCAD python object not being entering execute.
Replies: 2
Views: 102

FreeCAD python object not being entering execute.

I have a number of FreeCAD python objects implemented, but with one the execute function does not get entered. I am struggling to see why
as things are very similar in all implementations, so looking for suggestions on how to track the problem down.
by keithsloan52
Mon Jul 08, 2019 8:25 pm
Forum: Python scripting and macros
Topic: Extrude & Expand.
Replies: 3
Views: 164

Re: Extrude & Expand.

jmplonka wrote:
Mon Jul 08, 2019 6:58 pm
PartDesign offers extrude that would do the job for you. Just calculate the tapper angle for your desired expansion.
Does PartDesign have an API? I need to do it with a python script

Go to advanced search