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 ...
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 ...
Hi I am able, to make an observer by using addEventCall. Apparently its better to use addEventCallPivy. Really, why? I made an "Soevent" and don't know, how to recognize, which event has happened: With addEventCall I used: if arg["Type"] == "SoKeyboardEvent": ..... But with addEventCallPivy? (The st...
Before I can use Draft.makeRectangle(), I would to have to take care about userinput by my own (Observer,...), Drafttools-Rectangle does this anyway. I could copy the code of Drafttools in an own macro and adjust it a little bit (insert a call to another function, after it's job is done) , but I'm r...
Hi In a macro I use DrafTools.Rectangle The problem is, that the code does not stop till rectangle is finished ... r=None r = DraftTools.Rectangle().Activated() ###Here it should wait, till rectangle is finished print("Rectangle finished") # This appears immediately before the rectangle exists ... s...
Ja, das mit der Position habe ich gerade ausprobiert: Beide liegen parallel zur x-y-Ebene, Placement/Position/z beim einen=10mm, beim anderen 10,01mm: Funktioniert voll. (10,001 funktioniert nicht mehr). Aber irgendwie ... Krückenlösung. Und beim map on face (Attachement Offset/Position/z): Mit Sket...
Habe 2 teilweise überlappende Rechtecke (Wie 2 Papiere: eines rot, das andere blau):
Ob das rote oder das Blaue oben liegt und das andere verdeckt, soll umschaltbar sein.
Hi Wenn ich z.B ein rot gefülltes Rechteck auf eine Quaderfläche heften will: Im Sketcher die Fläche auswählen, "Neue Skizze erstellen", Rechteck zeichnen. Soweit ok. Oder? Nun das Problem: Das Rechteck ist nicht rot gefüllt, ich kann zwar die Linienfarbe ändern, aber Änderung der Flächenfarbe bewir...