Search found 1111 matches

Go to advanced search

by freedman
Wed Jan 22, 2020 11:50 pm
Forum: Python scripting and macros
Topic: How to read object placement angle
Replies: 9
Views: 219

Re: How to read object placement angle

This is a Part design file. The first Part is the original, the next two are links. Using 19.187
by freedman
Wed Jan 22, 2020 9:16 pm
Forum: Python scripting and macros
Topic: How to read object placement angle
Replies: 9
Views: 219

Re: How to read object placement angle

Thanks Mario. It would be great if someone could add to the "Code snippets" how to read/write/search for linked objects and their params.
by freedman
Wed Jan 22, 2020 8:12 pm
Forum: Python scripting and macros
Topic: How to move the cursor to selected objects 0,0,0?
Replies: 4
Views: 128

Re: How to move the cursor to selected objects 0,0,0?

joel, I seem to have another issue, I read up in the forum and found many of your responses. I use "mouse_pos = v.getObjectInfo(v.getCursorPos()) to get the mouse position and then place the part on those coords, this allows me to drag the part around. It appears that if I move the mouse quickly the...
by freedman
Wed Jan 22, 2020 1:26 am
Forum: Python scripting and macros
Topic: How to move the cursor to selected objects 0,0,0?
Replies: 4
Views: 128

Re: How to move the cursor to selected objects 0,0,0?

Thanks joel, I will run those numbers and check that out. Good stuff :)
by freedman
Wed Jan 22, 2020 1:18 am
Forum: Python scripting and macros
Topic: How to read object placement angle
Replies: 9
Views: 219

Re: How to read object placement angle

Thanks all, I think I understand. Good explaination vocx. Placement. It's a bit old, but it should be helpful. I looked at that a bunch and there are plenty of examples of how to write to placement but just a couple lines showing how to read the variables. I don't remember seeing the Eular stuff in ...
by freedman
Tue Jan 21, 2020 2:02 pm
Forum: Python scripting and macros
Topic: How to read object placement angle
Replies: 9
Views: 219

Re: How to read object placement angle

openBrain, I had the "Rotation.Angle" printed and got .244346095279, the Euler is what I needed, it prints out at 14.0. Thank you. I was trying to get that info from this long thread about angles but that's a tough read at midnight. https://forum.freecadweb.org/viewtopic.php?f=3&t=42185&start=50&hil...
by freedman
Tue Jan 21, 2020 8:31 am
Forum: Python scripting and macros
Topic: How to read object placement angle
Replies: 9
Views: 219

How to read object placement angle

My goal is to rotate an object a certain amount but first I need to read it's current angle so I can add to it. I have done this: Ang = App.ActiveDocument.Body001.Placement print(Ang) and get a print out: Placement[Pos=(0,0,0), Yaw-Pitch-Roll=(14,0,0)] The angle is 14 degrees but how do access that ...
by freedman
Mon Jan 20, 2020 11:57 pm
Forum: Help on using FreeCAD
Topic: Sketcher Visibility
Replies: 4
Views: 115

Re: Sketcher Visibility

Another approach, I made a macro that helps with visualizations. It isn't finished yet but it does work.
https://forum.freecadweb.org/viewtopic.php?f=22&t=41494
by freedman
Mon Jan 20, 2020 7:36 pm
Forum: Python scripting and macros
Topic: How to move the cursor to selected objects 0,0,0?
Replies: 4
Views: 128

How to move the cursor to selected objects 0,0,0?

I would like to mouse select an object (Part container) in the graphic area and have the mouse jump to the 0,0,0 location of the object selected. I know FreeCAD knows how to do it because the transform tool does just that when it initially gets placed. I have looked around the forums and have not fo...
by freedman
Mon Jan 20, 2020 6:48 am
Forum: Python scripting and macros
Topic: Using FreeCADGui.Selection.getSelection() in 0.19
Replies: 2
Views: 179

Using FreeCADGui.Selection.getSelection() in 0.19

I'm using a SelObserver to select an object with a mouse, then I change it's location. What I have works except when I use it on 0.19 and select a link, the original moves but not the link. I read a bunch but I can't find how "sel = FreeCADGui.Selection.getSelection()[0]" needs a mod. Do I need to i...

Go to advanced search