Search found 54 matches

Go to advanced search

by Chri1
Thu Nov 14, 2019 2:55 pm
Forum: Forum in Deutsch
Topic: Befehle in eigener Symbolleiste verschwinden
Replies: 3
Views: 94

Re: Befehle in eigener Symbolleiste verschwinden

Ah ja! Wenn ich in der neuen FreeCAD-Sitzung zuerst Draft und dann meine Workbench lade, funktioniert es. Wollte noch nachvollziehen, weswegen ich manchmal die Draft-Befehle in meiner Workbench verloren habe: In neuer Sitzung gleich meinen Workbench laden (-> Draft-Befehle werden nicht angezeigt) un...
by Chri1
Thu Nov 14, 2019 8:39 am
Forum: Forum in Deutsch
Topic: Befehle in eigener Symbolleiste verschwinden
Replies: 3
Views: 94

Befehle in eigener Symbolleiste verschwinden

Hi Habe einen eigenen Arbeitsbereich mit Symbolleisten erstellt. In den Symbolleisten habe ich Buttons für die von mir erstellten Makros. Soweit ok. Das Problem: Wenn ich nun z.B. den Draft-Move-Befehl in einer meiner Symbolleisten haben will, funktioniert das auch, doch beim Neustart von FreeCAD (0...
by Chri1
Tue Nov 05, 2019 2:20 pm
Forum: Python scripting and macros
Topic: setPropertyByName
Replies: 3
Views: 108

Re: setPropertyByName

Thanks, this works
by Chri1
Tue Nov 05, 2019 1:17 pm
Forum: Python scripting and macros
Topic: setPropertyByName
Replies: 3
Views: 108

setPropertyByName

Hi I created a python-object and added propérties (w1,w2,w3, w4) I managed to get the value of a property: … wi=["w1","w2","w3","w4"] # i generated by Code before val =bk.Object.getPropertyByName(winkel[i].Value) is there something equivalent to set the value of an property? Something like: val=50 b...
by Chri1
Sat Oct 19, 2019 2:59 pm
Forum: Python scripting and macros
Topic: origin of face of a prism, map rectangle to face
Replies: 3
Views: 354

Re: origin of face of a prism, map rectangle to face

I think I got it! Has nothing to do with the actual workplane obj: circle is already drawn #Before mapped: P0 = obj.Placement.Base ... #After mapped: mi=obj.Placement.toMatrix() mi=mi.inverse() P2=multVec(P0) obj.AttachmentOffset.Base.x=P2.x obj.AttachmentOffset.Base.y=P2.y mp = wp.getLocalCoords(mp...
by Chri1
Fri Oct 18, 2019 12:34 pm
Forum: Python scripting and macros
Topic: origin of face of a prism, map rectangle to face
Replies: 3
Views: 354

Re: origin of face of a prism, map rectangle to face

Ok, I also have to take care about rotation, but not now - first, I take a circle instead of rectangle. I dont' understand it!: The manual workflow would be: I draw a cube (10,10,10) in position(0,0,0) I select the face of the cube, which is parallel to yz and x = 10 and make it to current workingpl...
by Chri1
Tue Oct 15, 2019 8:14 am
Forum: Python scripting and macros
Topic: origin of face of a prism, map rectangle to face
Replies: 3
Views: 354

Re: origin of face of a prism, map rectangle to face

Ok, as I have thought so far, it does not work.
Will have to deal with coordinate system transformations...
by Chri1
Mon Oct 14, 2019 8:39 pm
Forum: Python scripting and macros
Topic: origin of face of a prism, map rectangle to face
Replies: 3
Views: 354

origin of face of a prism, map rectangle to face

Hi I have a prism, select one face of the prism, make the face to actual workingplane and draw a rectangle (-> obj) Now I map the rectangle to the face by code: .... bk = FreeCADGui.Selection.getSelectionEx()[0] #The selected face flae = bk.SubElementNames[0] ... P0 = obj.Placement.Base #The origin ...
by Chri1
Mon Oct 14, 2019 6:47 pm
Forum: Python scripting and macros
Topic: pause macro till other macro is finished
Replies: 5
Views: 378

Re: pause macro till other macro is finished

I found a dirty solution: Because my macro requires, that a face of a prism has to be selected, before it starts. When DraftTools.Rectangle().Activated() is finished, the new rectangle is selected and it has no subelements. -> I made an observer (addEventCallback "SoEvent"), which observes: ... sel ...
by Chri1
Sat Oct 12, 2019 12:14 pm
Forum: Python scripting and macros
Topic: addEventCallPivy - type of event
Replies: 5
Views: 335

Re: addEventCallPivy - type of event

Joel_graff wrote:
Fri Oct 11, 2019 9:41 am
Either one is fine.
I'll stay at addEventCallback()
Somehow it seems more handy for me ...

Incidentally, I just noticed that I forgot on "back" in my post (addEventCallback)

Thanks to all of you

Go to advanced search