## Search found 1896 matches

Fri May 07, 2021 7:11 pm
Forum: Python scripting and macros
Topic: Moving a rotated Part in Global XYZ
Replies: 15
Views: 512

### Re: Moving a rotated Part in Global XYZ

Here is a link to what I started about a year ago. https://forum.freecadweb.org/viewtopic.php?f=22&t=43020&p=367028&hilit=Sim#p365829 Because it's a world like simulation there is always a need for ground under the model to base where items sit, kind of like what gravity would do. This works well to...
Fri May 07, 2021 4:05 pm
Forum: Python scripting and macros
Topic: Moving a rotated Part in Global XYZ
Replies: 15
Views: 512

### Re: Moving a rotated Part in Global XYZ

I found what I need with some google searching, at least for the XY axis. Here is some code that rotates coords XY to a new XY by angle. self.point = (3, 4) self.origin = (2, 2) self.angle = math.radians(10) def rotate_sub(self,origin, point, angle): # Rotate a point counterclockwise by a given angl...
Wed May 05, 2021 7:08 pm
Forum: Python scripting and macros
Topic: Moving a rotated Part in Global XYZ
Replies: 15
Views: 512

### Re: Moving a rotated Part in Global XYZ

onekk wrote to have as example the correct coordinates of a point, in the simpler user case you have to take in account the fact that zoom level might alter the correspondance by screen coordinates (that in good approximations are pixels) and "3d world" dimensions, so some math is involved, and is ...
Wed May 05, 2021 7:04 am
Forum: Python scripting and macros
Topic: Moving a rotated Part in Global XYZ
Replies: 15
Views: 512

### Re: Moving a rotated Part in Global XYZ

Thanks all, I will digest the responses. The goal of the macro is to select and drag/stack Part objects with a mouse and also rotate with a keyboard, it has options to drag different levels of Part, like Part in Part in Part. This all works until a parent Part is rotated. The issue is this funtion, ...
Mon May 03, 2021 7:02 pm
Forum: Python scripting and macros
Topic: Moving a rotated Part in Global XYZ
Replies: 15
Views: 512

### Re: Moving a rotated Part in Global XYZ

chrisb, while I'm not using the dialog I did read this:

Code: Select all

``getGlobalPlacement()   # return the GlobalPlacement``
I didn't know this existed. If it does what it says it is exactly what I need.

Thank you
Mon May 03, 2021 3:51 pm
Forum: Python scripting and macros
Topic: Moving a rotated Part in Global XYZ
Replies: 15
Views: 512

### Moving a rotated Part in Global XYZ

What I am calling Global is also the screen XYZ. When I create a Part the placement angle is set to zero so everything is fine but once Part rotation occurs then moving the Part in the global XYZ gets complicated and that's what I want to do. That's my first question: Is there a way to move a rotate...
Sun May 02, 2021 6:29 am
Topic: What would this be called: flat sheet with indents?
Replies: 7
Views: 326

### Re: What would this be called: flat sheet with indents?

Using PartDesign; I made a plate, cut some holes in it, filled in the holes with rotated features.
Used version 0.20
Mon Apr 26, 2021 6:39 pm
Forum: Open discussion
Topic: Feature Request - Active (automated) visual axis for selections
Replies: 1
Views: 127

### Feature Request - Active (automated) visual axis for selections

The Part container works fine for holding and moving objects X,Y,Z but once you want to rotate :roll: , it boggles the mind where the center axis is located, so this got me thinking. What I'm requesting is selection axis activation, it works like this; if an object is selected then the Origin will b...
Sat Apr 24, 2021 11:51 pm
Forum: Open discussion
Topic: Could this work for a Nav cube addition?
Replies: 4
Views: 284

### Re: Could this work for a Nav cube addition?

How about a dot in the upper left corner (pic), this would be minimal impact. It could be a toggle of global transparency, 0 and 50, back and forth.
Sat Apr 24, 2021 6:36 pm
Forum: Open discussion
Topic: New macro MapV8, default mapping to standard planes
Replies: 2
Views: 172

### Re: New macro MapV8, default mapping to standard planes

chrisb wrote I tested your macro, and have some comments: - The macro does nothing with sketches mapped to faces of a Part object - When the macro is started it has AutoON enabled. This is not clear from the GUI. I had thought that the button "Auto ON" has to be pressed to switch it on I can fix bo...