Bug #1478: trim edge fails to maintain constraints

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Bug #1478: trim edge fails to maintain constraints

Post by Kunda1 »

issue #1478: trim edge fails to maintain constraints
Please decide if this is a bug. Thank you.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #1478: trim edge fails to maintain constraints

Post by Kunda1 »

jmaustpc wrote:I can't see why you think this is a bug?

You can't do as you have said because you can't trim any thing at 0,18,0 ...the top horizontal line is at (whatever, "16 point something", whatever). If I understand you correctly, you want to trim the top horizontal line in the sketch, this would then make the horizontal constrains invalid so they are automatically removed, so of course the sketch would become not fully constrained.
Can others please weigh in to this issue? Thanks!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Bug #1478: trim edge fails to maintain constraints

Post by NormandC »

Here or on the bug tracker?

I usually consider that when an element is trimmed, any constraint that was applied to it should be deleted. For example: a line that has an equal length constraint with another line. If one of the lines is trimmed, the equality constraint should be automatically deleted.

But the case of this specific report is different: Constraint37 and Constraint38 are not applied to the line to be trimmed, but on the vertical lines. See how the sketch looks like when I delete some constraints so I can detach the top horizontal line:
FC_trim_bug_1478_01.png
FC_trim_bug_1478_01.png (25.88 KiB) Viewed 2245 times
So IMO, the two 5mm constraints should not be deleted when the upper horizontal line is trimmed.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #1478: trim edge fails to maintain constraints

Post by Kunda1 »

@NormandC with these older bugs do you mind notating the ticket directly? It helps get them visible on the tracker and helps me from a monitoring perspective because I see that there is progress occurring, Thanks! Oh and thanks for your response as well!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Bug #1478: trim edge fails to maintain constraints

Post by NormandC »

Kunda1 wrote:@NormandC with these older bugs do you mind notating the ticket directly?
Done!
Kunda1 wrote: Oh and thanks for your response as well!
No sir, thank you for your tireless work on the bug tracker! ;)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #1478: trim edge fails to maintain constraints

Post by Kunda1 »

NormandC wrote:
Kunda1 wrote:@NormandC with these older bugs do you mind notating the ticket directly?
Done!
Kunda1 wrote: Oh and thanks for your response as well!
No sir, thank you for your tireless work on the bug tracker! ;)
Verdict on this ticket? issue #1478
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Bug #1478: trim edge fails to maintain constraints

Post by NormandC »

My verdict hasn't changed: IMHO it's a valid request. But it might take a while before someone is willing to tackle this...
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #1478: trim edge fails to maintain constraints

Post by Kunda1 »

NormandC wrote:My verdict hasn't changed: IMHO it's a valid request. But it might take a while before someone is willing to tackle this...
Should I merge this ticket with issue #1576 based on the feedback @Abdullah gave in:
https://freecadweb.org/tracker/view.php?id=1576#c8924
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Bug #1478: trim edge fails to maintain constraints

Post by abdullah »

Kunda1 wrote:
NormandC wrote:My verdict hasn't changed: IMHO it's a valid request. But it might take a while before someone is willing to tackle this...
Should I merge this ticket with issue #1576 based on the feedback @Abdullah gave in:
https://freecadweb.org/tracker/view.php?id=1576#c8924
Great job with the bug tracker!!

I am not sure about the merge, but maybe tagging all these "trim does not work as expected, not trimming right, not respecting constraints, unexpected behaviour, a user expects it to maintain these constraints (e.g. vertical/horizontal), but not those (equality constraints)...." into a single "sketcher trimming" tag may be very useful.

If somebody decides to work on the sketcher trimming support, given the high amount of issues involved, he should read every problem identified, so that the solution fulfills all user requirements. For this specific case, if somebody decides to tackle the problem, I think it is a good candidate for a thread in the forum and a lot of help/support with testing (bugs and user acceptance tests). I mean it is not a "very high hanging fruit", but it is the kind of fruit you think you can get just by jumping and you end up falling down to earth with empty hands after several tries unless you really decide to take your time to study the issue (i.e you take a ladder).
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #1478: trim edge fails to maintain constraints

Post by Kunda1 »

abdullah wrote:Great job with the bug tracker!!
Thanks! It's the way I contribute back to open-source ;)
abdullah wrote:I am not sure about the merge, but maybe tagging all these "trim does not work as expected, not trimming right, not respecting constraints, unexpected behaviour, a user expects it to maintain these constraints (e.g. vertical/horizontal), but not those (equality constraints)...." into a single "sketcher trimming" tag may be very useful.
Currently there are 2 tags I'm using in conjunction to identify these types of tickets and they are 'Solver' and 'trim'
See https://freecadweb.org/tracker/search.p ... %2C%2Btrim
abdullah wrote: If somebody decides to work on the sketcher trimming support, given the high amount of issues involved, he should read every problem identified, so that the solution fulfills all user requirements. For this specific case, if somebody decides to tackle the problem, I think it is a good candidate for a thread in the forum and a lot of help/support with testing (bugs and user acceptance tests). I mean it is not a "very high hanging fruit", but it is the kind of fruit you think you can get just by jumping and you end up falling down to earth with empty hands after several tries unless you really decide to take your time to study the issue (i.e you take a ladder).
#hangingfruitthatneedsaladder :lol:
Yea, I'll work on a forum post that will have as much as the legwork done in regards to organizing the tickets involved. So a Dev can step in and take it from there. Cheers!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply