Resilient design with the sketcher

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!
ulrich1a
Posts: 1920
Joined: Sun Jul 07, 2013 12:08 pm

Resilient design with the sketcher

Postby ulrich1a » Sat Apr 26, 2014 2:51 pm

I am trying to divide a given distance into three equal length partitions with the sketcher. As this should be a resilient design, it has to work, if the distance is changed from a minimal to a maximal length in a ration of 1 to 100 and vice versa. I thought, this is not as a difficult task, but then I started to discover the sketcher traps.

My first attempt: Three connected lines with two equality constraints for the length of the partitions. This worked in an not fully constrained case, but did not give the full range of variability in a fully constrained sketch. At reduction of the distance at factor 100 two or three partitions are placed onto the same location, thus changing the orientation of the partition lines. I then thought, dividing the distance with two symmetry constraint could do the job. This works in principle and for small changes of the distance. But after a few changes, I got an underconstrained sketch, where I could move nothing. If such a constraint condition is placed in a complicated construction, finding any missing constraints will be nearly impossible. Making this sketch fully constrained also failed in a lot of cases. Dividing a line by this method should avoid changing the orientation of lines, but the usage with the current sketcher is not practical. I then had a look into an technical drawing handbook, how this task would have bin done with traditionally methods. This worked for me with a fully constrained case. Whereas cases with a not fully constrained distance do not work for a reduction of the distance for factors 100 or more.
Three_divisions_test_drawing_solution.fcstd
(4.47 KiB) Downloaded 30 times
Drawing_solution.png
Drawing_solution.png (48.55 KiB) Viewed 2471 times
I am not sure, if there is a possibility to improve the sketcher, so it does not change the orientation of lines at large changes of constraints. Or do we have to set up some rules about best construction methods for the sketcher?

Ulrich
User avatar
tanderson69
Posts: 1516
Joined: Thu Feb 18, 2010 1:07 am

Re: Resilient design with the sketcher

Postby tanderson69 » Sat Apr 26, 2014 3:16 pm

I took your first example and used angular dimensions instead of parallel constraints. I can toggle the overall length between 1 and 100 and the sketch behaves as expected. A parallel constraint will have 2 possible solutions, but an angular dimension of 180 (or 0) will only have one solution.

You should have posted this in the help forum.
Attachments
Three_divisions_test_three_length_one_equality_fully_constrained_ta.fcstd
(2.89 KiB) Downloaded 35 times
ulrich1a
Posts: 1920
Joined: Sun Jul 07, 2013 12:08 pm

Re: Resilient design with the sketcher

Postby ulrich1a » Sat Apr 26, 2014 3:59 pm

Thanks tanderson69 for your example.
After considering three different solutions I was not openminded enought, that there could be another better one. It is now clear to me, that a best practice guide for the sketcher will be needed, to avoid falling into these sketcher traps.
Normandc may be so kind to move the topic to request for help.

Ulrich
triplus
Posts: 9136
Joined: Mon Dec 12, 2011 4:45 pm

Re: Resilient design with the sketcher

Postby triplus » Sat Apr 26, 2014 4:32 pm

It is now clear to me, that a best practice guide for the sketcher will be needed, to avoid falling into these sketcher traps.
Practice indeed. Without this no guide will help. ;)
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Resilient design with the sketcher

Postby NormandC » Sat Apr 26, 2014 8:53 pm

I've used a few constraint-based parametric modelers over the years, and have never found any set of rules to "good sketching" assembled in a manual. Most of what I know I've learned from experience, or from advice here and there. And I'm sure I don't know everything! ;)

A best practice guide would certainly be useful, but as usual someone or a collective would have to dedicate time to it. I'll be honest, I won't contribute at least for the time being. Lately I've been quite content to take a back seat and let others do the helping.
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Resilient design with the sketcher

Postby quick61 » Sat Apr 26, 2014 9:42 pm

normandc wrote:And I'm sure I don't know everything! ;)
NO! Say it ain't so... :mrgreen:

With all the work, advancement, added features, etc., making such a guide could end up being either labor intensive keeping up with it or having it become obsolete, at least to some extent, sooner rather than later. Along with the the fact it could all go out the window if/when we see a 3D sketcher. As triplus mentions -
triplus wrote:Practice indeed. Without this no guide will help. ;)
Just keep using it and visit the forum regularly and you'll get the hang of it quickly. I'm still picking up on new things here and there but in the mean time, the very basics will usually get you a model that works and once there,
resilient design will come. Maybe for now, you can take the Thomas Edison approach. :P

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
ulrich1a
Posts: 1920
Joined: Sun Jul 07, 2013 12:08 pm

Re: Resilient design with the sketcher

Postby ulrich1a » Sat May 03, 2014 9:51 pm

I am using now 180° constraints, where those are needed. But most times these constraints dissapear in the sketcher plane. So at selecting one, you never know, which lines are constrained.
I got all kind of different behavior of the visibility of 180°-constraints:
- Make a polyline with two not straight lines and add a 180° constraint. The old angle is still displayed.
- Add another line to the two lines. The 180° constraints disappear, or is shown in a unusual way at the zero-point.
- Add a second 180°-constraint. Here both constraints are shown!
- Add another line to the polyline and add a third 180°-constraint. Then only the last 180°-constraint is shown.
After adding additional lines with additional 180°-constraints those unusual and different views do continue with unexpected results of visibility.

Do I something wrong?

Ulrich

OS: Debian GNU/Linux 7.5 (wheezy)
Platform: 64-bit
Version: 0.14.3511 (Git)
Branch: master
Hash: 07f3f8257ba8d8a9e4837a37089c77636137413d
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.2
ulrich1a
Posts: 1920
Joined: Sun Jul 07, 2013 12:08 pm

Re: Resilient design with the sketcher

Postby ulrich1a » Sat May 17, 2014 4:36 pm

As already discussed, some lines may flip their orientation at changing dimension constraints. I was surprised to find dimensioned lines itself seems to not suffering from this phenomenon. See both pictures below. The upper rectangle has an explicit horizontal dimension. The horizontal length from the lower rectangle is defined by an equality constraint. Only the lower rectangle flips the orientation at changing the position of the rectangle from -50 to 100 mm. See Nonflipping_dimension.fcstd
Is there a possibility to change the behavior of non-dimensioned lines to the behavior of dimensioned lines?
Two_rectangles.png
Both rectangles at -50 mm
Two_rectangles.png (20.26 KiB) Viewed 2272 times
Flipped_rectangle.png
Rectangles moved to +100 mm
Flipped_rectangle.png (18.82 KiB) Viewed 2272 times
In the following case, I got dimensions that behave different from all others: those with a minus sign. The dimensions with a minus sign needs an absolute input. Negative input dimensions to the negative side of the axis. Positive input dimensions to the positive side of the axis.
All other dimensions change their sign with a negative input. A positive input changes the length but not the sign. I have attached a picture and the file.
I could not find any hint, how to create those dimensions with absolute behavior. Having both types in the same sketch is irritating. Any hint?
The dimensions to test are named in Different_lenght_behavior.fcstd.
Two_rectangles.png
Both rectangles at -50 mm
Two_rectangles.png (20.26 KiB) Viewed 2272 times
Ulrich

OS: Debian GNU/Linux 7.5 (wheezy)
Platform: 32-bit
Version: 0.14.3609 (Git)
Branch: master
Hash: 052b628cbf02624f53e5b844e0c92083b83d368e
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
Attachments
Different_lenght_behavior.fcstd
(3.32 KiB) Downloaded 22 times
different_lenght_behavior.png
Sketch with inverting Dimension and Absolute Dimension
different_lenght_behavior.png (26.32 KiB) Viewed 2272 times
Nonflipping_dimension.fcstd
(3.4 KiB) Downloaded 22 times
ulrich1a
Posts: 1920
Joined: Sun Jul 07, 2013 12:08 pm

Re: Resilient design with the sketcher

Postby ulrich1a » Sat May 17, 2014 8:51 pm

I found it myself. The lock constraint produces "absolute dimensions" which behave different from horizontal or vertical length constraints.
Is this intended behavior?

Ulrich