Commit Graph

478 Commits

Author SHA1 Message Date
wmayer
51c47f1efb improve whitespaces 2018-01-01 19:36:57 +01:00
Abdullah Tahiri
952aaa458e Sketcher: Fix transfer of tangency and perpendicular end-to-endpoint constraints
================================================================================

When transfering constraints to coincident points on deletion of geometry, a tangency/perpendicular constraint
cannot be blindly transfered as the destination edge may not be tangent/perpendicular leading to unexpected behaviour.

However, the user does expect that something that was coincident with such end-to-endpoint constraint (which implicitly includes a coincident constraint)
remains coincident after deletion. Therefore, the change of type to coincident.

This implicitly solves the problem of representation of constraints leading to a crash in coin3d.

fixes #3291
2018-01-01 19:27:41 +01:00
wmayer
125329f0bd simplify debugging of changing datum constraints 2017-12-31 11:48:44 +01:00
luzpaz
4eb5a431fa Sketcher: comment typos 2017-12-25 10:59:48 +01:00
Abdullah Tahiri
d64575a111 Sketcher: Merge, copy expressions
===================================

Support for copying expressions instead of hard values.

fixes #2936
2017-12-12 23:08:44 +01:00
Abdullah Tahiri
f2cca2e05a Sketcher Solver: Means to reset the initilization of movement
=============================================================

Just amazed it was working "so well" without never reseting to zero this.

It might bring advantages and close bugs... who knows!
2017-12-12 22:20:27 +01:00
Abdullah Tahiri
a309e417fc Sketcher: New Setting for improved dragging mode 2017-12-12 22:20:27 +01:00
Abdullah Tahiri
a014c1cbc1 Sketcher: Clean code and adapt previous solution only to non-relative cases
===========================================================================

Cleaning up ViewProviderSketch, as relative mode is never used for points.

Adapting the recalculation of the initial solution only to non-relative cases.

For relative movement cases (movePoint with relative=true) no cases where such a solution will be advantageous have been identified
and applying a similar solution involves changing the current behaviour too much, as to run the risk of introducing further bugs.

Decision to be revised if such cases where an advantage can be found are discovered.
2017-12-12 22:20:27 +01:00
Abdullah Tahiri
7b086ba8b2 Sketcher: jumping while dragging - force recalculate initial solution
=====================================================================

fixes #1734

Upon dragging, the initial solution is first calculated and them DogLeg is left with the work of solving for a solution next to the initial solution.

When the change is too big and the gradients are no longer accurate to continue dragging, the dragging flips and jumps.

The solution offered here is, not to update always the solution, as this also creates artifacts, but update it if the dragging goes beyond 20 times the initial dragging distance.

https://forum.freecadweb.org/viewtopic.php?f=3&t=7589#p203580

https://forum.freecadweb.org/viewtopic.php?f=3&t=7589#p203712
2017-12-12 22:20:27 +01:00
wmayer
9612c31572 fixes #0003176: Sketcher: always over-constrained when referencing external B-Spline 2017-12-02 13:02:42 +01:00
Eivind Kvedalen
71f9f4824f Sketcher: Fixed regression in fix for issue #3245. 2017-11-28 19:14:57 +01:00
wmayer
1a6e5db7f6 move encodeAttribute from Property to Persitence to avoid code duplication 2017-11-26 18:38:45 +01:00
luzpaz
cc87c20afe Make uniform the use of B-spline visible to users
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=25411
This commit does not include fixes to source  comments unless they were 'doxygenated'.
No .xml files were altered either.
2017-11-17 19:30:37 -05:00
Eivind Kvedalen
5b22a8a133 Sketcher: Fix for issue #3245, including regression test. 2017-11-16 21:44:23 +01:00
luzpaz
35ec477426 More typos, grammar fixes, uniformity 2017-11-15 10:46:43 -05:00
Abdullah Tahiri
6210b602de Sketcher: Python command to delete all internal geometry and constraints of an sketch 2017-11-06 14:18:12 +01:00
Abdullah Tahiri
bfa6de056e Sketcher: Restore inter-body expression engine links in Carbon Copy 2017-11-02 19:52:26 +01:00
wmayer
bc3c9b0c5d override onExtendedDocumentRestored in AttachExtension 2017-10-25 22:52:39 +02:00
wmayer
8318cf54cb issue #0002613: Create symmetric geometry with conic 2017-10-16 15:56:32 +02:00
wmayer
314ad0ad6a issue #0002613: Create symmetric geometry with conic 2017-10-16 15:49:05 +02:00
wmayer
8b2156471f issue #0002613: Create symmetric geometry with conic 2017-10-16 15:31:04 +02:00
wmayer
9adddc08ac remove possibility of directly cross-referencing other body, use shape binder instead! 2017-10-13 17:28:21 +02:00
wmayer
1d17c043eb re-enable sketcher to reference elements of other body 2017-10-05 15:20:39 +02:00
luzpaz
f3bf8fe919 Misc. typos
+ some are doxy others are just comment code.  
+ some minor whitespace and grammatical tweaks. 
+ app/SCL/* typos have also been submitted upstream (https://github.com/stepcode/stepcode/pull/366). So it's ok to merge them in to master.
2017-10-04 17:59:11 +02:00
wmayer
fde42545ba fix various coverity issues 2017-09-15 11:48:38 +02:00
wmayer
58e9f7477d create shape of sketch on project load in case it has been saved without a recompute beforehand 2017-09-12 15:55:35 +02:00
wmayer
0d617f97d6 Port to occ7.2:
+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
2017-09-01 16:27:46 +02:00
Abdullah Tahiri
3be1611684 Refactoring Sketcher execute() to use solve() 2017-08-19 17:14:28 +02:00
Abdullah Tahiri
395f9e1576 Sketcher: Extension to report redundancy, Standardisation of return codes for solve, documentation, initialisation of solver information
========================================================================================================================================

Motivation:
- Improve notifications of redundancy in the solver (Bonus effect, now the sketcher refuses to add a redundant datum constraint)
- Initialize all solver information, so that it is accurate also in corner cases.
- Provide different return codes for the different solver status/conflicting/redundant/overconstraint (also looking forward for a future refactoring)

Impact:
- Python users that are currently using the return code of solve() for detecting overconstraint/conflicting/solver error, if any, might have to adapt their scripts.
Those who are just checking for zero/non-zero will have to do nothing.
2017-08-19 17:14:28 +02:00
Abdullah Tahiri
32f868f1ca Fixing unreported bug behaving like #2710 without AutoUpdate under conflicting constraints + improving documentation 2017-08-19 17:14:27 +02:00
Abdullah Tahiri
daffa8e08e SketchObject Modifyknotmultiplicity written to support translatable exception messages 2017-08-17 22:45:22 +02:00
Abdullah Tahiri
fa3a4f1f4c Exceptions: translation support 2017-08-17 22:44:11 +02:00
Stefan Tröger
4b3fb99bf0 GeoFeatureGroup: Make link collection non-DAG save 2017-06-19 15:37:09 +02:00
Stefan Tröger
fd62ef30f3 Unify and fix group handling in geofeaturegroups 2017-06-19 15:37:09 +02:00
wmayer
a5a04e359c fix bug in pr774, improve whitespaces 2017-06-19 13:32:27 +02:00
Alexander Lin
144e4759ce Adds extend feature to Mod/Sketcher
Fixes #1187
2017-06-19 13:07:37 +02:00
Abdullah Tahiri
318db40af8 Fixes #0002735 2017-05-31 23:59:17 +02:00
Abdullah Tahiri
51e90dd52b SketchObject:ModifyBSplineKnotMultiplicity re
written to use THROW macro and CADKernelError exception
2017-05-13 15:27:57 +02:00
Abdullah Tahiri
968f01e206 Sketcher: Force solver to return non-driving angles in [-pi,pi] 2017-04-23 06:00:40 +02:00
wmayer
3786a77d3c encode names of constraints when writing to XML 2017-04-22 19:09:13 +02:00
Peter Lama
fa4bebf2e0 Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
Abdullah Tahiri
be09213bfb Sketcher: Fixes #3009 error with geompoints in sketcher
=======================================================

Introduction of construction points as fixed solver entities introduced this bug, as there was no specific code to check for points as they were by default construction.
2017-04-17 20:47:30 +02:00
Abdullah Tahiri
bcc3cb1fbb Sketcher: Basic symmetry for angle constraint
Fixes #0002804
2017-04-17 19:14:42 +02:00
wmayer
5f86aae9a5 fix scan coverity issues 2017-04-11 19:01:32 +02:00
wmayer
ca343c43ab fix scan coverity issues: unchecked dynamic_cast 2017-04-11 12:45:02 +02:00
Abdullah Tahiri
ea698474d5 Sketcher: addGeometry list addition using copy to avoid copying tags 2017-04-10 18:55:23 +02:00
Abdullah Tahiri
8e4ac4dd70 Sketcher: Carbon Copy - Allow cross-body sketcher links
=======================================================

The instructions are shown on the status bar.

press CTRL to allow cross-body link

press ALT to by-pass directional requirements

press CTRL+ALT to allow a cross-body link and by-pass directional requirements
2017-04-10 18:55:23 +02:00
Abdullah Tahiri
17098d011c Sketcher: Carbon Copy - Correct inverted logic (worked but it is not clear) 2017-04-10 18:55:23 +02:00
Abdullah Tahiri
1b5082201e Sketcher: Carbon Copy enable checks when not in a body 2017-04-10 18:55:23 +02:00
Abdullah Tahiri
4fd2e0df3c Sketcher: using copy in addGeometry instead of clone to avoid that python users inadvertendly generate two geometries with the same Geometry tag 2017-04-10 08:57:25 +02:00