Copy constraints when merging sketches

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!
llll
Posts: 173
Joined: Fri Nov 12, 2021 1:56 am

Copy constraints when merging sketches

Post by llll »

Hi, hello all.

Had to separate sketch into two parts due to solve times being +15secs for every alteration.

Now when combining two sketches, it appears all constraints are gone. The Sketcher_Validate tool does some of the coincidents automatically but that is 2-300 short of total.

How to copy all constraints into the merged sketches? I have no clue (as usual ;)

What's the process to solve this issue?

Thanks


Edit:
Shalmeneser wrote: Thu May 19, 2022 5:21 am The more you explain and give details, the more we have a chance to understand your question and have an answer.
Separated 1 sketch.. into 2 sketches.. they are separated by ideas as you suggest.. too many constraints were causing lag.. @ChrisB book says over 100 constraints per sketch is not recommended...

Merging with Sketcher_MergeSketches causes loss of all constraints contained in source sketches.
To even open the merged sketch you need at least some coincidences which are added automatically after this popup, by the Sketch_ValidateSketch tool
FreeCADLink_pD7KAXYK7P.png
FreeCADLink_pD7KAXYK7P.png (7.73 KiB) Viewed 852 times
Last edited by llll on Thu May 19, 2022 8:32 am, edited 1 time in total.
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Copy constraints when merging sketches

Post by Shalmeneser »

llll wrote: Thu May 19, 2022 12:51 am 1) Had to separate sketch into two parts due to solve times being +15secs for every alteration.
2)Now when combining two sketches, it appears all constraints are gone.
3) The Sketcher_Validate tool does some of the coincidents automatically but that is 2-300 short of total.
4) How to copy all constraints into the merged sketches? I have no clue (as usual ;)
5) What's the process to solve this issue?
1) Imho, it's not the sketch but the downward operations which take time.
2) Combining : which tool ? Explain clearly how do you separate then combine.
3) Sketcher_ValidateSketch is for exceptionnal errors, not for all your constraints.
4) Ctrl+C, Ctrl+V, suppress lines in each sketches.
5) KISS : keep it stupidly simple. One sketch = one logical idea. Separate idea and functions in different actions.

The more you explain and give details, the more we have a chance to understand your question and have an answer.
llll
Posts: 173
Joined: Fri Nov 12, 2021 1:56 am

Re: Copy constraints when merging sketches

Post by llll »

Shalmeneser wrote: Thu May 19, 2022 5:21 am Ctrl+C, Ctrl+V, suppress lines in each sketches.
What do you mean by suppress?
It is only a sketch at this stage.
I am using the stable Link Branch on windows, but do not see this option when right clicking the tree
Last edited by llll on Thu May 19, 2022 7:14 am, edited 1 time in total.
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Copy constraints when merging sketches

Post by Shalmeneser »

If your aim is to minimize your sketch, why do you merge 2 sketches ?

1) Duplicate the big sketch
2) Open each sketches then suppress [SUPPR] the duplicated lines. (One (only) sketch can refer to the other via external geometry)
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Copy constraints when merging sketches

Post by drmacro »

Multiple, simple sketches are far better.

The fact that you are discussing this indicates to me your sketch is too complicated and should be broken up, possibly into far more than two sketches.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Copy constraints when merging sketches

Post by Shalmeneser »

Do you dream of a file ? impossible with OP.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Copy constraints when merging sketches

Post by chrisb »

A good start would be to explain what you finally want to have as a model. Are there any images to link?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Copy constraints when merging sketches

Post by drmacro »

Shalmeneser wrote: Thu May 19, 2022 9:54 am Do you dream of a file ? impossible with OP.
What? Is your crystal ball not working? :mrgreen:
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Copy constraints when merging sketches

Post by adrianinsaval »

to be expected, crystal ball techs are scammers, sent mine for repair months ago and still haven't got it back :roll:
llll wrote: Thu May 19, 2022 12:51 am Separated 1 sketch.. into 2 sketches.. they are separated by ideas as you suggest.. too many constraints were causing lag.. @ChrisB book says over 100 constraints per sketch is not recommended...

Merging with Sketcher_MergeSketches causes loss of all constraints contained in source sketches.
To even open the merged sketch you need at least some coincidences which are added automatically after this popup, by the Sketch_ValidateSketch tool
FreeCADLink_pD7KAXYK7P.png
So you know you shouldn't make overcomplicated sketches, then why are you trying to merge them? Keep them separate.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Copy constraints when merging sketches

Post by thomas-neemann »

llll wrote: Thu May 19, 2022 12:51 am ...
is that a solution (coarboncopy)?

https://www.youtube.com/watch?v=YVWNpu-KDEo

phpBB [video]
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Post Reply