[Sketcher] Origin based Ellipse do not use Object Constraints to x or y axis during creation

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
C4e
Posts: 324
Joined: Thu Jan 20, 2022 9:31 pm

[Sketcher] Origin based Ellipse do not use Object Constraints to x or y axis during creation

Post by C4e »

Hello.

Code: Select all

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.27936 (Git)
Build type: Release
Python 3.9.10, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: C/Default (C)
Installed mods: 
  * Trails 2022.1.0
  * ThreadProfile 1.81.0
  * Reporting
  * Behave-Dark-Colors 0.0.1
  * dodo
  * Plot
  * parts_library
  * fcgear 1.0.0
  * workfeature
  * fasteners 0.3.38
  * 3D_Printing_Tools
  * Assembly4 0.11.10
I try to create some Ellipsis by center, major radius and point. While creation, the third click doesn't use constraints.

I did:
  1. Create new file
  2. Create a Body
  3. Create a Sketch (XY plane)
  4. Hit Sketcher_CreateEllipseByCenter
  5. Click the origin (coincident constraint is shown and used for center)
  6. Click somewhere on the x-axis for the radius (axis is highlighted, no constraint is shown for the radius, which I guess is normal)
  7. Click on the y-axis (axis is highlighted, no constraint is shown for the point)
Now I have to fill in a point onto object constraint manually.

Shouldn't be used constraints for the third point?
chrisb
Veteran
Posts: 53786
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] Origin based Ellipse do not use Object Constraints to x or y axis during creation

Post by chrisb »

C4e wrote: Fri Mar 18, 2022 5:13 am I try to create some Ellipsis by center, major radius and point. While creation, the third click doesn't use constraints.
You are probably talking about auto constraints, right? The third click doesn't create a point, so a tangent constraint is created if you are near a line or axis. Seems all correct to me.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
C4e
Posts: 324
Joined: Thu Jan 20, 2022 9:31 pm

Re: [Sketcher] Origin based Ellipse do not use Object Constraints to x or y axis during creation

Post by C4e »

chrisb wrote: Fri Mar 18, 2022 10:46 am You are probably talking about auto constraints, right?
Yes.
chrisb wrote: Fri Mar 18, 2022 10:46 am The third click doesn't create a point,
Ok, this was my misunderstanding. I expected a point on object constraint, because of the highlighted axis.

Maybe an idea for a Feature Request?

It is clear, that when I start in the origin the tangent constraints can't be created because of the fact, that the ellipse will cross the axis by 90 degree.

When I start the ellipse somewhere else the tangent constraints occours.

Thank you @chrisb getting clear with this.
chrisb
Veteran
Posts: 53786
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] Origin based Ellipse do not use Object Constraints to x or y axis during creation

Post by chrisb »

C4e wrote: Fri Mar 18, 2022 9:35 pm Maybe an idea for a Feature Request?
No, which point should this be?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
paddle
Veteran
Posts: 1364
Joined: Mon Feb 03, 2020 4:47 pm

Re: [Sketcher] Origin based Ellipse do not use Object Constraints to x or y axis during creation

Post by paddle »

chrisb wrote: Fri Mar 18, 2022 10:31 pm No, which point should this be?
The internal geometries minor and major axis lines end points.

C4e wrote: Fri Mar 18, 2022 9:35 pm Maybe an idea for a Feature Request?
+1
chrisb
Veteran
Posts: 53786
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] Origin based Ellipse do not use Object Constraints to x or y axis during creation

Post by chrisb »

Aah, you mean a different way of constructing the ellipse. A problem with this approach and possible (e.g. coincidence) autoconstraints could be, that the points are not independent from each other.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
C4e
Posts: 324
Joined: Thu Jan 20, 2022 9:31 pm

Re: [Sketcher] Origin based Ellipse do not use Object Constraints to x or y axis during creation

Post by C4e »

paddle wrote: Sat Mar 19, 2022 6:48 am The internal geometries minor and major axis lines end points.
Yes.
chrisb wrote: Sat Mar 19, 2022 7:16 am Aah, you mean a different way of constructing the ellipse.
Right. I want to create an ellipse with its center point at the origin or on a line and then lock the major or minor axis to the x- or y-axis or onto the line. In this case, I am aware that the points are not independent from each other and I do not need a tangent constraint.
Workshop_Notes
Posts: 565
Joined: Wed Sep 29, 2021 8:35 am

Re: [Sketcher] Origin based Ellipse do not use Object Constraints to x or y axis during creation

Post by Workshop_Notes »

Can I return to this thread as it seems to have sunk without trace with no solution to it. Sketcher CreateEllipseByCenter gives very strange results that are not intuitive.

There are two methods to draw an ellipse: 1) centre, major radius and minor radius (Sketcher CreateEllipseByCenter); 2) end of major axis, other end of major axis, minor radius (Sketcher CreateEllipseBy3Points).

Is is without problem to say that if I pick equivalent points for these two methods, I should get the same ellipse in each case?

Alternatively, what do I need to do with each command to get an ellipse of known dimensions and known orientation in the plane?

Draw a horizontal line from the origin, constrained to the X-axis and 1 unit long (0,0) to (1,0).
Draw a vertical line from the origin, constrained to the Y-axis going upwards and 2 units long (0,0) to (0,2).
Draw a second vertical line from the origin, constrained to the Y-axis, going downwards. Give it equality constraint to the one above (0,0) to (0,-2).

Use CreateEllipseBy3Points with point 1 being (0,-2), point 2 being (0,2) and point 3 being (1,0). In each case, the autoconstraints light up and stick as expected. The ellipse is four units high and two wide, and is aligned with the axes.

Now use Sketcher CreateEllipseByCenter with point 1 being (0,0), point 1 being (0,-2) and point 3 being (1,0). Again, the autoconstraints light up, but the ellipse produced is not the same as the one above. In particular, it does not have its axes aligned with the sketch axes - the grey helper lines are slightly rotated.

Why does one method give a different result to the other?
Post Reply