Commit Graph

575 Commits

Author SHA1 Message Date
wmayer
a67ee5648c remove trailing spaces 2018-11-05 10:53:01 +01:00
wmayer
0e9334aec2 remove leftover of boost.signals headers 2018-11-05 00:03:36 +01:00
Abdullah Tahiri
eac4352b75 Sketcher: Trim bug
==================

Trim tool fails to generate coincidence upon trimming an arc of ellipse at the end of the arc.

https://forum.freecadweb.org/viewtopic.php?f=3&t=31594&start=50#p266765
2018-11-04 14:43:24 -03:00
Abdullah Tahiri
20faec46ec Sketcher: Fillet radius estimation improvement 2018-11-04 14:43:24 -03:00
Abdullah Tahiri
f202961a6c Sketcher: SketchObject Debug disabled by default 2018-11-04 14:43:24 -03:00
Abdullah Tahiri
c454e1c908 Sketcher: Add DEBUG macro to SketchObject 2018-11-04 14:43:24 -03:00
Abdullah Tahiri
01bac7854f Sketcher: Intercurve fillet Improvement and delete constraint on point fix
==========================================================================

Intercurve fillet uses endpoint constraints for improved accuracy, but before this
commit was only considering a coincident constraint. Now it also considers an endpoint
tangency or perpendicular.

delConstraintOnPoint with coincidentonly=false, was not checking endpoint perpendiculars and
would therefore fail to delete them.

https://forum.freecadweb.org/viewtopic.php?f=3&t=31594&start=30#p265731
2018-11-04 14:43:24 -03:00
Abdullah Tahiri
843f636d85 Sketcher: Expose mass datum commands to python 2018-11-04 14:41:20 -03:00
Abdullah Tahiri
7129b3ca0e Sketcher: Mass operations on dimensionals
=========================================

This commit introduces two functions to operate on all datum constraints exclusively:

- Make all datum constraints driving or not driving, depending on the argument.
- Move all datum constraints at the end of the constraint list.

The practical use an ongoing effort towards improving the block constraint behaviour, that will be defered to 0.19
2018-11-04 14:41:20 -03:00
Abdullah Tahiri
21f2e79021 Sketcher: Refactor code relating to dimensional constraint checks 2018-11-04 14:41:20 -03:00
Abdullah Tahiri
66bcaf5405 Sketcher: Made constraints aware of whether they are dimensionals or not
========================================================================

Centralise the knowledge on whether a constraint is dimensional or not within the constraint
2018-11-04 14:41:20 -03:00
wmayer
36271b4052 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
Abdullah Tahiri
6c7684b2c7 Sketcher: Fillet extended CAD kernel information 2018-10-28 18:35:27 +01:00
Abdullah Tahiri
a93a5e9c93 Sketcher: Use transparent exception mechanism for fillets
=========================================================

This ensures that the exception back in the c++ that invoked python retains the type of exception and can be properly catched.
2018-10-28 18:34:50 +01:00
Abdullah Tahiri
026459675c Sketcher: Support for filleting bounded curves
==============================================

Generally, bounded curves require that the curves are coincident at one point, the vertex to be filleted.

Trimmed curves, like combinations of line segments, arcs of conics, do not require it, as they are able to extend the trimmed
curve using the basis curve. However, they work fine when there is such a coincidence.
2018-10-28 18:34:12 +01:00
Abdullah Tahiri
cb5827b140 Sketcher: Inter-trimmed-curve filleting
=======================================

Algorithm changed to use offset curves, so as to avoid moving geometry in the sketcher.
2018-10-28 18:32:30 +01:00
Abdullah Tahiri
187f5c9023 Sketcher: Fillet support inter-conics
==============================================

Specific support for filleting between conics.

It does not support B-Splines or line segments.
2018-10-28 18:31:48 +01:00
wmayer
d077c7333f fix crash in debug mode in sketcher in case the equation matrix has rank zero 2018-10-28 14:51:14 +01:00
wmayer
170913fbb4 make constraint validation consistent to evaluation 2018-10-16 23:21:40 +02:00
luz.paz
ce91b1f766 Misc. typo fix
Found via `codespell`
2018-10-11 16:21:28 -04:00
Abdullah Tahiri
d9015da662 Sketcher: Avoid transfering angle constraints
=============================================

Angle constraints are internally coded using the diverging points of the segments (PointPos != none) in normal 2 segment angle constraints.

This creates a problem with the mechanism to transfer enpoints on angle deletion.

fixes #3589
2018-10-08 15:16:27 +02:00
wmayer
7bf4c9d96f fixes 0003410: 0.17 Regression: recompute will make parts lose color and take a longer delay compared to FC0.16 2018-10-02 19:04:44 +02:00
luz.paz
360e581672 Misc. typo and whitespace fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=3&t=30988#p256964
along with other misc. fixes
2018-09-19 17:26:03 +02:00
Abdullah Tahiri
716d53b86e Sketcher: Move autoremoveredundants method from SketchAnalyser to SketchObject 2018-08-26 20:54:01 +02:00
Abdullah Tahiri
c1d6ccb0d8 GCS: Bug fixes
==============

- Zero initialization of the jacobian matrix
- Correct notification of redundant/conflicting in presence of non-driving constraints.

fixes #3529
2018-08-26 20:54:01 +02:00
wmayer
83dbba99c7 CMP0050: make Sketcher module aware of cmake policy 2018-08-20 18:04:58 +02:00
luz.paz
fab9cad50f Misc. typos
Found via `codespell`
Trivial typos

Found via `codespell`
2018-08-18 21:48:42 +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
49a71e9399 Sketcher: Python SketchObject support 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
76993592ab Sketcher: Diameter support for Sketch Object 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
b320f15909 Solver: Support for Diameter constraint 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
e54c33d585 GCS: Diameter constraint emulation through ConstraintEqual 2018-07-30 00:47:19 +02:00
Abdullah Tahiri
7270446ff9 GCS: Extension of ConstraintEqual to allow for a proportionality factor 2018-07-30 00:47:19 +02:00
Abdullah Tahiri
831e455e50 Sketcher: Diameter Constraint Python support 2018-07-30 00:47:18 +02:00
Abdullah Tahiri
5b9a794228 Sketcher: New Sketcher Constraint Diameter 2018-07-30 00:47:18 +02:00
wmayer
bc5a84cb09 add missing export macro 2018-07-29 15:53:56 +02:00
Abdullah Tahiri
9f969e558c Sketcher: Python command to delete all the constraints at once 2018-07-29 13:44:07 +02:00
Abdullah Tahiri
6e865aa3e5 Sketcher: Python SketchObject implementation
Exposure of all the functionality in the previous commits to Python
2018-07-29 13:44:07 +02:00
Abdullah Tahiri
d91f338a1a Sketcher: SketchObject adaptation to Sketch Analysis
Apart for the inclusion of the Analysis functionality, SketchObject has been improved to provide:

- A fast painless deleteAllConstraints() function

- A fast painless constraint group deletion, delConstraints(std::vector<int> ConstrIds, bool updategeometry)
2018-07-29 13:44:07 +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
hokieengr
8662d1af1b WIP. Moved code to hide units to seperate function 2018-07-23 12:43:46 -03:00
Bob
785770e66e Add getPresentationValue function prototype 2018-07-23 12:41:14 -03:00
wmayer
5ff103615f fix -Wmaybe-uninitialized 2018-06-09 12:05:19 +02:00
Abdullah Tahiri
2c89860a38 Sketcher: Wrong DoF reported - Fixes #3503 2018-06-09 11:11:46 +02:00
wmayer
8472bcba15 msvc2013 doesn't support default arguments in lambda expressions 2018-06-09 11:09:29 +02:00
Abdullah Tahiri
eacb14c3d4 Sketcher: Python interface to solveraid 2018-06-09 11:02:53 +02:00
Abdullah Tahiri
ce31cecc95 Sketcher: Ability for SketchObject to create a list of dependent geometric elements 2018-06-09 11:02:43 +02:00
Abdullah Tahiri
f8d90fc6db GCS: Improved point symmetry constraint
=======================================

The original implementation won't work when the point is already on the line. See:
https://forum.freecadweb.org/viewtopic.php?f=3&t=29115#p237397

The new implementation works on the projections of the vectors linking the two first points with the symmetry point on the vector linking the two first points.

This assures that there is no stability problem when the point is already on the symmetry axis.
2018-06-09 10:50:05 +02:00
Abdullah Tahiri
a6fa514665 GCS: Add convenience point constructor 2018-06-09 10:49:55 +02:00