Sketcher: Ellipse support
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Sketcher: Ellipse support
It's very raw now, but can be tried. To create the constraint, do this:
select two ellipses and a point (the point must be selected last!). Click tangency. Constrain the point to both ellipses using standard point on ellipse. Done.
https://github.com/DeepSOIC/FreeCAD-ell ... cyViaPoint
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Sketcher: Ellipse support
Sorry, can't help myself... Another teaser
- Attachments
-
- TangentViaPoint teaser2.png (108.03 KiB) Viewed 2154 times
Re: Sketcher: Ellipse support
I am happy you managed.DeepSOIC wrote:Sorry, can't help myself... Another teaser
Just a question: Apart from the aesthetics (a point may be more aesthetic than a construction line), do you see any functional advantage? (does it go smoothier,...)
Re: Sketcher: Ellipse support
In a very general sense, one "problem" I have found with construction geometry in general is that to get a fully constrained sketch you need to also constraint the construction line, even when this constraint is meaningless, e.g. the length of a construction line can be meaning less if that line is just being used to define an angle, being used as a "PartDesign feature custom axis", or here where you are using it to make a tangent with two different curves...abdullah wrote:I am happy you managed.DeepSOIC wrote:Sorry, can't help myself... Another teaser
Just a question: Apart from the aesthetics (a point may be more aesthetic than a construction line), do you see any functional advantage? (does it go smoothier,...)
Re: Sketcher: Ellipse support
Ok. I see an advantage there.
Do we have this way (object1, object2, pointoftangency) supported for other elements like circles? Can this be seen as an extension of that mechanism, if existing?
DeepSOIC, your current implementation works for tangency Ellipse-Ellipse. Does it work for Ellipse-Circle too? In other words, these modification what does it cover exactly?
I am thinking of the following:
If this can be seen as an extension of such an existing mechanism, then both tangency methods can "live together". If the user does not select a point, the "ugly" with the construction line is generated, if the user does select a point the "beauty" is used.
Most of this, I could findout myself by looking into code and doing trials with FreeCAD. However, I am trying to invest the little time I have available for real coding... thanks for your patience!!
Do we have this way (object1, object2, pointoftangency) supported for other elements like circles? Can this be seen as an extension of that mechanism, if existing?
DeepSOIC, your current implementation works for tangency Ellipse-Ellipse. Does it work for Ellipse-Circle too? In other words, these modification what does it cover exactly?
I am thinking of the following:
If this can be seen as an extension of such an existing mechanism, then both tangency methods can "live together". If the user does not select a point, the "ugly" with the construction line is generated, if the user does select a point the "beauty" is used.
Most of this, I could findout myself by looking into code and doing trials with FreeCAD. However, I am trying to invest the little time I have available for real coding... thanks for your patience!!
Re: Sketcher: Ellipse support
Jim, if you have some time, could you checkout DeepSOIC's branch, give it a try and let us know your impressions from the user point of view??
Re: Sketcher: Ellipse support
I am away from home for a few days so not until Tuesday.abdullah wrote:Jim, if you have some time, could you checkout DeepSOIC's branch, give it a try and let us know your impressions from the user point of view??
Re: Sketcher: Ellipse support
Do not worry!!jmaustpc wrote:I am away from home for a few days so not until Tuesday.
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Sketcher: Ellipse support
Currently I have almost done support for any combinations of arcs, circles, ellipses and arcs of ellipses. But there are some todos, like adding automatic point-on-curve constraints. It will cause problems if I just blindly add two point-on-curves since the point can be an endpoint of an arc to be constrained, which is already on one of the curves. And I have used numeric partials for testing and still haven't changed that.
I have an interesting idea to generalize it into an angle constraint. Tangency is just an angle constraint with an angle of zero.
I have an interesting idea to generalize it into an angle constraint. Tangency is just an angle constraint with an angle of zero.
Re: Sketcher: Ellipse support
Done!!
1. Tangency between two arcs of ellipse
https://github.com/abdullahtahiriyo/Fre ... master.git
1a57e2f..c6fc528 skt2_marktaff_creation
1. Tangency between two arcs of ellipse
https://github.com/abdullahtahiriyo/Fre ... master.git
1a57e2f..c6fc528 skt2_marktaff_creation