Mirror with any plane (part wb)

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Vincent B
Veteran
Posts: 4731
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Mirror with any plane (part wb)

Post by Vincent B »

How to mirror an object with any plane (or datum plane) in part wb?
Or this feature is missing?
Attachments
Capture.JPG
Capture.JPG (32.43 KiB) Viewed 1355 times
User avatar
Roy_043
Veteran
Posts: 8539
Joined: Thu Dec 27, 2018 12:28 pm

Re: Mirror with any plane (part wb)

Post by Roy_043 »

You can change the Normal of the plane in the properties later. Or use Draft_Mirror.
User avatar
Vincent B
Veteran
Posts: 4731
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Mirror with any plane (part wb)

Post by Vincent B »

Not easy to get the normal vector. :roll:
User avatar
Roy_043
Veteran
Posts: 8539
Joined: Thu Dec 27, 2018 12:28 pm

Re: Mirror with any plane (part wb)

Post by Roy_043 »

I agree.
mario52
Veteran
Posts: 4690
Joined: Wed May 16, 2012 2:13 pm

Re: Mirror with any plane (part wb)

Post by mario52 »

hi

Macro_Normal_Vector Image

Code: Select all

Gui.Selection.getSelectionEx()[0].SubObjects[0].Faces[0].normalAt(0,0)
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: Mirror with any plane (part wb)

Post by chrisb »

mario52 wrote: Mon Jun 21, 2021 8:20 am

Code: Select all

Gui.Selection.getSelectionEx()[0].SubObjects[0].Faces[0].normalAt(0,0)
While I can use an expression for the placement, I didn's succeed with the normal vector. Does anyone know how to do that?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
edwilliams16
Veteran
Posts: 3179
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Mirror with any plane (part wb)

Post by edwilliams16 »

If you have an xy plane, then Placement.Rotation(Vector(0,0,1), NormalVector) will rotate it into the NormalVector direction.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Mirror with any plane (part wb)

Post by openBrain »

chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: Mirror with any plane (part wb)

Post by chrisb »

edwilliams16 wrote: Mon Jun 21, 2021 8:56 am If you have an xy plane, then Placement.Rotation(Vector(0,0,1), NormalVector) will rotate it into the NormalVector direction.
I failed to use this as an Expression for the normal vector, probably due to the function call. How is it possible - if at all?

Edit: Have to check openBrain's/GlouGlou's example.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: Mirror with any plane (part wb)

Post by chrisb »

openBrain wrote: Mon Jun 21, 2021 9:16 am Makes me think to this old topic : https://forum.freecadweb.org/viewtopic. ... 88#p325356
Thanks for the trick with the line indicating the direction
As a simplification it is possible to use for the Base of the mirror a single expression: plane.Placement.Base.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply