Replacing all points to one plane

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!
Post Reply
Unnamed Paricipant
Posts: 3
Joined: Sun Feb 16, 2020 6:21 pm

Replacing all points to one plane

Post by Unnamed Paricipant »

Dear community.
I created a drawing with a lot of subjects, but unfortunately I had detected to late that some subjects were in first plane, another subjects in second plane, some lines between subjects connect subjects in different planes. But I need all subjects in one plane.
How to place all points of subjects to one plane?
Example is attached.
Attachments
All2one_plane.FCStd
(20.01 KiB) Downloaded 17 times
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Replacing all points to one plane

Post by chrisb »

Make the origin visible and select the target plane.
Select Menu->PartDesign->Map sketch to face or use the icon.
Select the sketch you want to map to the plane.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Unnamed Paricipant
Posts: 3
Joined: Sun Feb 16, 2020 6:21 pm

Re: Replacing all points to one plane

Post by Unnamed Paricipant »

Thanks for your answer, but this variant is not suitable for my case. Also, I tried to use sketches from different workbenches but result is not acceptable, because there are too many of different kind objects and I need to save a color for each one.
Maybe is there a way to change just one coordinate ("Z" for example) for all points using just one script and shift all of them to XY-plane?
drmacro
Veteran
Posts: 9002
Joined: Sun Mar 02, 2014 4:35 pm

Re: Replacing all points to one plane

Post by drmacro »

Not sure what you are trying to do...I don't understand your description.

But, if you select the rectangles and, in the properties window, set the z position to 0.00 they are now on the yx plane.

Then edit the lines from the corners as needed.

:?:
Attachments
All2one_plane-mac.FCStd
(17.53 KiB) Downloaded 8 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Unnamed Paricipant
Posts: 3
Joined: Sun Feb 16, 2020 6:21 pm

Re: Replacing all points to one plane

Post by Unnamed Paricipant »

That's right, this solution lets to move object, but there are really many parts in my drawing and it's annoying to change z position for each one separately. I thought, that there could be special way (script, or some thing else) which may change one coordinate for all objects in one time.
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Replacing all points to one plane

Post by chrisb »

Here is a script that sets all z values of the Placement to 0. Please note that it does not work on the single points of e.g. a polyline.

Code: Select all

doc=FreeCAD.ActiveDocument
for o in doc.Objects:
   o.Placement.Base.z = 0
doc.recompute()
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply