Commit Graph

31 Commits

Author SHA1 Message Date
wmayer
b052470b93 Sketch: Refactor SketchAnalysis
Refactor makeMissingVerticalHorizontal
2024-05-28 14:08:44 +02:00
wmayer
7f00aad6aa Sketch: Refactor SketchAnalysis
Refactor makeMissingPointOnPoint
2024-05-28 13:40:38 +02:00
wmayer
8abbed295e Sketch: Refactor SketchAnalysis
Refactor detectMissingPointOnPointConstraints
2024-05-28 13:24:05 +02:00
wmayer
7a2fa1dce8 Sketch: Refactor SketchAnalysis
Move helper classes to anonymous namespace
2024-05-28 12:26:23 +02:00
wmayer
1e81b7f393 Sketch: Add test case for degenerated geometry 2024-05-27 19:15:18 +02:00
wmayer
0a5a049c87 Sketcher: Fixes #14240 2024-05-27 12:09:35 +02:00
Florian Foinant-Willig
c0e8fa1e75 Sketcher: modernize type checking 2023-10-23 18:09:23 +02:00
pre-commit-ci[bot]
e92ed45df9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
Chris Hennes
fcedce3c42 Sketcher: Reformat to current clang-format standard 2023-09-04 07:17:28 -05:00
Abdullah Tahiri
0f14065d0a Sketcher: App - Clang-format 2023-05-20 07:55:05 +02:00
Chris Hennes
07dbe74c34 Sketcher: Silence Coverity warning
Coverity CID 350580: Uninitialized scalar variable. The analyzer doesn't like the incomplete construction of the ConstraintId object (the 'Type' field was uninitialized).
2023-02-26 13:48:48 +01:00
Uwe
365d968ae8 [Sketch] App P - End: remove unused headers
- also some sorting
2022-12-11 22:36:00 +01:00
berniev
180edfa3cc Mod: Single arg ctors must be explicit 2022-08-24 16:55:20 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Uwe
0399b3f087 [Sketch] remove superfluous nullptr checks 2022-07-18 02:51:49 +02:00
0penBrain
430166b7fc Sketch: Fix algorithm seeking for missing coincidences in Validate 2022-02-28 14:52:55 +01:00
Abdullah Tahiri
44567167ff Sketcher: Convert PointPos into an enum CLASS 2021-12-11 16:17:21 +01:00
Abdullah Tahiri
182596ba08 Sketcher: GeoId, GeoElementId and GeoUndef refactor
===================================================

This commit is an independent refactor of the identifications used at Sketcher level.

It introduces a new type "GeoElementId" as a combination of GeoId and PointPos.

It moves the Undefined GeoId, previous Constraint::GeoUndef to GeoEnum, together with all
other fixed values of GeoIds.
2021-12-11 16:17:21 +01:00
Abdullah Tahiri
994bd9d92b Part/Sketcher - Construction Migration - step 3: Removal of Geometry construction data member
=============================================================================================

This commits removes the Geometry construction data member and adapts sketcher code to use
GeometryFacade to access construction information via the SketchGeometryExtension.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
00a1aa6225 Part: Geometry - encapsulate construction access 2020-10-25 03:52:51 +01:00
wmayer
2b34145e4c Sketcher: [skip ci] add function to sketch validation panel to remove degenerated geometry 2020-08-13 17:24:10 +02:00
wmayer
36363b3f14 Coverity: Resource leak 2020-07-20 17:34:24 +02:00
wmayer
5ece278c94 remove deprecated std::binary_function 2020-05-11 13:46:37 +02:00
Abdullah Tahiri
893d7afccc Sketcher: PCH 2019-05-02 07:12:27 +02:00
luz.paz
1233fbe64e Fix for a previous commits
Crowdin:  Sketcher/App/SketcherAnalysis remove newlines
Crowdin:  Part/AttachmentEditor/TaskAttachmentEditor.py fix previous commiit
Crowdin:  Gui/NetworkRetriever.cpp correct previous commit
2019-01-30 11:08:03 -02:00
luz.paz
356d18e873 Crowdin: Sketcher/App/SketchAnalysis.cpp remove superflous whitespace 2019-01-30 11:08:03 -02:00
Abdullah Tahiri
8fbbf4ea9e Move Open vertices detection routine to SketchAnalysis 2018-12-03 12:11:11 +01:00
Abdullah Tahiri
716d53b86e Sketcher: Move autoremoveredundants method from SketchAnalyser to SketchObject 2018-08-26 20:54:01 +02:00
wmayer
a7f261dc13 fix warnings 2018-08-08 18:02:59 +02:00
Markus Lampert
e13c09235f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
Abdullah Tahiri
8431385b44 Sketcher: Sketch Analysis tool and autoconstraining algorithms
A series of algorithms to detect missing constraints and create them.

Each of the algorithms is divided in different steps for maximum flexibility:

    /// There is a first type of routines, simple routines, which work in the following order:
    /// Detect - (Analyse) - [Get] - [Set] - Make
    ///
    /// The Detect step just identifies possible missing constraints.
    ///
    /// The Analyse, which is not available for all the routines, operates in detected constraints of the same routine, to
    /// look for alternatives. For example, a general pointonpoint detection leads to a search for coincident constraints, which
    /// can be later run via Analyse if it is intended to convert endpoint coincidence to endpoint perpendicular and tangent constraints.
    ///
    /// The Get retrieves the result of the analysis as a vector of ConstraintIds, indicating the suggested constraints. This step is intended
    /// for enabling the user to check the result of the analysis, rather than applying it. If only applying is intended, this step is not necessary
    /// as the Make will operate on the result of the Detect - Analyse directly.
    ///
    /// The Set changes the detected result. It modifies the SketchAnalysis object. It only modifies the SketchObject as far as the SketchAnalysis is changed.
    /// It does not apply any changes to the sketch. It is intended so as to enable the user to change the result that will be applied.
    ///
    /// Neither the Detect, nor the Analyse, nor the Get steps modify the Sketch geometry.
    ///
    /// Make applies the constraints stored internally in the SketchAnalysis object.

It includes an automatic constraining algorithm for coincidences, horizontals/verticals and equality:

    /// A second type of routines, complex routines, are thought for running fully automatic and they Detect, Analyse and Make.
    /// They may also apply a variaty of types of Constraints.

It also includes some helper functions, like autoRemoveRedundants
2018-07-29 13:44:06 +02:00