View Issue Details

IDProjectCategoryView StatusLast Update
0001576SketcherBugpublic2018-09-30 16:28
Reporterwmayer Assigned To 
PrioritylowSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.14 
Target Version0.18 
Summary0001576: Slow performance using trim tool ([s]due to Solver[/s])

Also after doing the trim on the left arc the trim on the right arc always gives unexpected results.

Using 0.14.3647 the trim doesn't take 18 min for me but it still takes around 30 sec which is still too much for this simple sketch.
Additional InformationOS: Windows 7
Platform: 64-bit
Version: 0.14.3647 (Git)
Branch: master
Hash: c05801d6edff634a4edab338e4f66ceca6da3b72
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.6.0
Tagssketcher, slow, Solver, trim
FreeCAD Information


related to 0002463 closedabdullah Sketcher Trim tool ignore tangent constraint to arch on circle 
related to 0001478 closed FreeCAD trim edge fails to maintain constraints 



2017-01-13 13:00

administrator   ~0007710

Confirmed by @nemesis he writes:
> but for me a classic boolean problem due to the vertex on the edge of the cube, and I guess due to OCCT, not Freecad


2017-01-14 08:42

reporter   ~0007754

confirmed on :
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: tag: 0.16.6706
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17


2017-05-08 22:53

administrator   ~0008920

@Abdullah is the FC or OCC related?


2017-05-09 12:16

manager   ~0008924

Last edited: 2017-05-09 12:33

View 4 revisions

I downloaded the file and tried it with:

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10993 (Git)
Build type: None
Branch: master
Hash: bf5f3484f6f5506795b6e9b86288c75ab7357291
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

There is no time problem at all (it executes under 1 second). What happens, as in other tickets, is that the trimming support in the Sketcher has a way lots of room for improvement. I would dare to say, it needs a good redesign. In presence of Point on Object and tangency constraints it generally fails.

To be clear, generally the result is not the expected one, lines from the wrong side of the semicircle get removed and contraints get added.

Trimming calculations are done in the sketcher, OCC only handles the values provided by the sketcher. This is the relevant function:

int SketchObject::trim(int GeoId, const Base::Vector3d& point)

I am not sure when the solver improvements got merged, but I would say anything like 18 minutes wait time must be related to the solver not being able to reach a solution for the involved constraints. We had similar tickets in the past (for the solver). The agreement with solver improvements was to default to 100-200 iterations no escaling due to size in number of geometric elements in the sketch (though this configuration may be overriden via the by default hidden "Advanced solver dialog"). If a solution can not be reached by then, then it exits. Therefore, it is very unlikely not to say impossible to have the solver running for 18 minutes nowadays (the dossier should be huge so that each iteration requires some 10-20 seconds).

Unless somebody can reproduce the slow behaviour with 0.17, I would just merge this ticket with the other "trim support provides unexpected results". Hopefully, somebody will dedicate some coding time to this issue before 0.17 is released ;)


2017-05-09 12:46

administrator   ~0008925

Tagged as part of the Solver tickets.
Thanks Abdullah!


2018-04-27 10:08

manager   ~0011206

The remaining of this ticket is sketcher, as solver improvements solved the time problem.


2018-06-20 14:32

administrator   ~0011454

modified summary to reflect abdullah's comment 0001576:0011206


2018-09-30 16:28

administrator   ~0011878

I think this can be closed as it's not reproducible any more that it takes a lot of time.

Issue History

Date Modified Username Field Change
2014-06-07 08:31 wmayer New Issue
2014-06-08 11:06 shoogen Tag Attached: sketcher
2017-01-13 13:00 Kunda1 Note Added: 0007710
2017-01-14 08:42 nemesis Note Added: 0007754
2017-01-23 18:36 Kunda1 Relationship added related to 0002463
2017-04-26 02:35 Kunda1 Status new => confirmed
2017-04-26 02:35 Kunda1 Product Version => 0.14
2017-05-08 05:02 Kunda1 Tag Attached: slow
2017-05-08 22:53 Kunda1 Note Added: 0008920
2017-05-09 12:16 abdullah Note Added: 0008924
2017-05-09 12:19 Kunda1 Tag Attached: Solver
2017-05-09 12:19 Kunda1 Tag Attached: trim
2017-05-09 12:32 Kunda1 Note Edited: 0008924 View Revisions
2017-05-09 12:32 Kunda1 Note Edited: 0008924 View Revisions
2017-05-09 12:33 Kunda1 Note Edited: 0008924 View Revisions
2017-05-09 12:46 Kunda1 Note Added: 0008925
2017-05-09 12:50 Kunda1 Summary Slow performance using trim tool => Slow performance using trim tool due to Solver
2017-05-11 14:25 Kunda1 Relationship added related to 0001478
2017-12-13 15:20 Kunda1 Project Sketcher => GCS
2018-04-27 10:08 abdullah Note Added: 0011206
2018-04-27 10:08 abdullah Project GCS => Sketcher
2018-06-20 14:29 Kunda1 Target Version => 0.18
2018-06-20 14:32 Kunda1 Summary Slow performance using trim tool due to Solver => Slow performance using trim tool (due to Solver)
2018-06-20 14:32 Kunda1 Note Added: 0011454
2018-09-30 16:28 wmayer Status confirmed => closed
2018-09-30 16:28 wmayer Resolution open => fixed
2018-09-30 16:28 wmayer Note Added: 0011878