0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

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!
abdullah
Posts: 3898
Joined: Sun May 04, 2014 3:16 pm

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby abdullah » Sun Nov 04, 2018 8:19 am

RogerK wrote:
Sun Nov 04, 2018 7:23 am
abdullah wrote:
Sat Nov 03, 2018 1:14 pm
In your sketch, there is a "missing" coincidence between the line and the ellipse.
Your are perfectely right, the right coincident constraint was missing. I'm sorry, I hadn't seen that.

I have retried the construction several time. When the line is drawn, the fix point on object constraints are set on both ends. When I now trim the ellipse, the first time the fix point on object is converted to a coincident constriant. On the second trim, the fix point on object is just removed, but no coincident constraint is placed.
SketcherTrimConeLineIssue.gif
you just discovered a bug from 2014... let me step on it:
git commit 92e68e2c3a742f49654871223fde8b0934f58b94
RogerK
Posts: 27
Joined: Thu Oct 04, 2018 6:25 pm
Location: Elsau

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby RogerK » Tue Nov 06, 2018 10:04 am

Hi abdullah
abdullah wrote:
Sun Nov 04, 2018 8:19 am
you just discovered a bug from 2014... let me step on it:
git commit 92e68e2c3a742f49654871223fde8b0934f58b94
I can confirm with the current build 15150 the trim bug is solved. But unfortunately, there is another bug :roll:. When I trim first the right part of the ellipse, then the line looks like it was deleted too and the fix point on object constraint remain. A closer look reveals something different. The Line and ellipse segment is still there, but it was collapsed to one point:
SketcherTrimEllipseLineIssue2.gif
SketcherTrimEllipseLineIssue2.gif (245.34 KiB) Viewed 435 times

Kind regards

Roger
abdullah
Posts: 3898
Joined: Sun May 04, 2014 3:16 pm

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby abdullah » Tue Nov 06, 2018 1:22 pm

RogerK wrote:
Tue Nov 06, 2018 10:04 am
But unfortunately, there is another bug :roll:.
Yup! You are getting proficient a unveiling long introduced bugs.

If you want to see something funny, just delete the line, and trace a new line from right to left (roughly same positions), now trimming the right part works, but if you trim the left part instead, the line "jumps".

I know where the bug is, I have to find a solution...
abdullah
Posts: 3898
Joined: Sun May 04, 2014 3:16 pm

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby abdullah » Wed Nov 07, 2018 6:39 pm

RogerK wrote:
Tue Nov 06, 2018 10:04 am
But unfortunately, there is another bug :roll:.
Only to note that it is a general bug of the trim tool, it also happens for circles:
Circle.gif
Circle.gif (49.77 KiB) Viewed 406 times
abdullah
Posts: 3898
Joined: Sun May 04, 2014 3:16 pm

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby abdullah » Fri Nov 09, 2018 3:35 pm

https://github.com/FreeCAD/FreeCAD/pull/1784

There were problems with some constraints (internal alignment) and with multiple intersections among trimming curves.
Trim_Improvements.gif
Trim_Improvements.gif (342.41 KiB) Viewed 385 times
abdullah
Posts: 3898
Joined: Sun May 04, 2014 3:16 pm

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby abdullah » Fri Nov 09, 2018 3:37 pm

I forgot to say. I have made the trim tool a little bit more picky, because sometimes it was creating invalid coincident constraints. If you happen to get an exception and the result "undo", file a bug report and/or ping me. There may still be more trimming bugs in the wild.
abdullah
Posts: 3898
Joined: Sun May 04, 2014 3:16 pm

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby abdullah » Sat Nov 10, 2018 6:08 pm

It is merged and in the PPA (thanks sgrogan!). I will appreciate some testing of this trimming functionality. :D
RogerK
Posts: 27
Joined: Thu Oct 04, 2018 6:25 pm
Location: Elsau

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby RogerK » Sun Nov 11, 2018 11:30 am

Hi abdullah
abdullah wrote:
Sat Nov 10, 2018 6:08 pm
It is merged and in the PPA (thanks sgrogan!). I will appreciate some testing of this trimming functionality. :D
I did some more testing with the fillet and trim functionallity.

One Issue I found was regarding filleting two arcs. When you click near the center of the arc's notthing happend. I guess this is because the algorythm couldn't found a proper solution for filleting the two arcs. When I click on the right side, it works, but the fillet is placed in the wrong direction and the arcs are shorten way to mutch:
SketcherFilletArcArcIssue.gif
SketcherFilletArcArcIssue.gif (126.11 KiB) Viewed 339 times

Testfile:
SketcherFilletArcArc.FCStd
(9.27 KiB) Downloaded 8 times

When testing the trim function I noticed that the hyperbola and parabola are not supported. You always get a forbidden/blocked sign when you want select them. Filleting on them works fine in my test cases, except in a similar setup like the issue described above, it could happen that the fillet won't work either between an arc and a parabola. Do you want a Testcase for this too? I hope I can repeat it, it won't always happend, its somehow depending on the geometry :oops: .

FreeCAD Version:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15184 (Git)
Build type: Release
Branch: master
Hash: 9e2acc477cc8806f5b7ff13160f40c207a82aa50
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)


Kind regards

Roger
RogerK
Posts: 27
Joined: Thu Oct 04, 2018 6:25 pm
Location: Elsau

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby RogerK » Sun Nov 11, 2018 11:40 am

abdullah wrote:
Fri Nov 09, 2018 3:37 pm
I forgot to say. I have made the trim tool a little bit more picky, because sometimes it was creating invalid coincident constraints. If you happen to get an exception and the result "undo", file a bug report and/or ping me.
When this happend, is there an error message in the python console? Or hasn't the user any indication of this, from his perspective just nothing happend?
I had noticed multiple times where a trim doesn't changed anything, but in this cases also a delete of the segmet was possible. Maybe this is an intendet behavior because you wouldn't trim anything, you would just delete the clicked segement.
abdullah
Posts: 3898
Joined: Sun May 04, 2014 3:16 pm

Re: 0001304: Allow Sketcher to Fillet Arcs, Not Only Lines

Postby abdullah » Mon Nov 12, 2018 12:42 pm

RogerK wrote:
Sun Nov 11, 2018 11:40 am
abdullah wrote:
Fri Nov 09, 2018 3:37 pm
I forgot to say. I have made the trim tool a little bit more picky, because sometimes it was creating invalid coincident constraints. If you happen to get an exception and the result "undo", file a bug report and/or ping me.
When this happend, is there an error message in the python console? Or hasn't the user any indication of this, from his perspective just nothing happend?
I had noticed multiple times where a trim doesn't changed anything, but in this cases also a delete of the segmet was possible. Maybe this is an intendet behavior because you wouldn't trim anything, you would just delete the clicked segement.
Whenever a problem trimming or filleting ensues, you get either an exception or a fail message. Something like this in the "Report View":
Exception (Mon Nov 12 13:39:03 2018): Not able to fillet curves with ids : (0, 1) and points (77.5314, 12.4934, 0) & (64.1419, -20.637, 0) In PyObject* Sketcher::SketchObjectPy::fillet(PyObject*) in src/Mod/Sketcher/App/SketchObjectPyImp.cpp:914

Failed to trim edge: Not able to trim curve with the given index: 2