Commit Graph

5 Commits

Author SHA1 Message Date
wmayer
723cd53cd6 Sketcher: [skip ci] close directory in unit test 2022-03-19 13:54:59 +01:00
wmayer
947f9cfbaa Sketch: [skip ci] add unit test to detect missing point-on-point constraints 2022-02-28 14:50:35 +01:00
wmayer
8e428b0a31 Sketcher: add unit test for sketch with expressions 2021-12-23 15:32:24 +01:00
Abdullah Tahiri
30a93b648b Sketcher: Coverity fix in Sketch::analyseBlockedGeometry
========================================================

Users chennes and hyarion made me aware of this covereity issue:

Fixes Coverity: geoit can be end() when dereferenced
https://github.com/FreeCAD/FreeCAD/pull/4429/files#

When analysing the block where the dereferrencing appears, it
appears that it is a left-over that no longer makes sense:
- The algorithm classifies block constraints into those that are
not affected by any other driving constraint and those that are
affected by other driving constraints.
- The offending block deals with internal aligned geometry, thus
per definition has a driving internal alignment constraint, for which
the previous block already set the need of post-analysis.
- No matter what, the geometries, the complex one and the internal one
will have at least the driving internal alignment constraint, so they
cannot become "not affected by any other driving constraint".
- If the geometry had a block constraint on it, it was already added for
post-analysis in the previous block. If it did not have one block constraint,
the fact that it is internal aligned geometry is an irrelevant consideration.

Probably there was a point during development when this made sense, but with
the current post-analysis, it does not appear to make sense anymore. So the
block was removed.

This commit adds a unit test for blocked geometry (new block constraint).
2021-02-13 11:44:06 +01:00
j
140dcc3134 Sketcher: Group tests in different directories 2021-02-04 08:10:28 +01:00