Commit Graph

1210 Commits

Author SHA1 Message Date
wmayer
4fd7ccc98e fix German translation 2018-03-03 23:37:15 +01:00
Abdullah Tahiri
e5e6ff9509 Sketcher: complete type and representation 2018-02-22 19:19:22 +01:00
Yorik van Havre
143b89c8f3 Applied latest translations from crowdin 2018-02-21 14:25:31 -03:00
wmayer
b780ba650f fix scan coverity issues 2018-02-10 14:29:49 +01:00
Abdullah Tahiri
ec719e98fd Sketcher: Expose Type as readonly python attribute 2018-02-07 15:32:43 +01:00
luz.paz
9f6f027686 Crowdin: Corrected B-spline term in translation
ref: https://crowdin.com/translate/freecad/569/en-fr#6503804
[skip ci]
2018-02-07 09:43:55 +01:00
luz.paz
1d5799e5b3 Misc. typos
Inspired by @normandc per https://gitter.im/FreeCAD/FreeCAD?at=5a729c6ece68c3bc742df205
2018-02-07 09:40:03 +01:00
triplus
215f07e523 Sketcher virtual space toolbar issue
+ Fix issue when creating sketcher virtual space toolbar
+ Translation support
2018-02-02 16:34:22 +01:00
wmayer
76b12d242d fix syntax errors 2018-01-31 20:53:42 +01:00
luz.paz
69216f3604 sWhatsThis fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=10&t=26687
2018-01-31 19:07:07 +01:00
wmayer
1eaf70a80e add command to show/hide several constraints at once 2018-01-27 21:10:01 +01:00
wmayer
63a2bfcc8f expose more members of Constraint class to Python 2018-01-27 19:35:02 +01:00
wmayer
b147e4c810 fix crash when deleting constraint 2018-01-27 17:08:49 +01:00
wmayer
1f8f27b5e8 improve whitespaces 2018-01-27 16:47:55 +01:00
wmayer
4730e5b608 save values before invalidating iterator, whitespace improvements 2018-01-27 13:09:44 +01:00
Abdullah Tahiri
e9732b4b0a Sketcher: Setting in Preferences to switch on/off notification of constraint substitution
=========================================================================================

By default notification is on, so that Newbies do not complain why FC is deleting that other constraint they have added before.

Power users generally will set it off, as they do not want to be bothered by pop ups and know what they are doing.
2018-01-27 12:33:11 +01:00
Abdullah Tahiri
8d3c20f06e Sketcher: Avoid single tangency plus coincident when preexisting single tangency
================================================================================

fixes #3299 (remaining)

Draw a line. Draw an arc. Make edge to edge tangency. Select endpoints. Try to create a coincident constraint. You now get an Endpoint-to-Endpoint tangency.
2018-01-27 12:33:11 +01:00
Abdullah Tahiri
32737cd425 Sketcher: Avoid single tangency when preexisting coincident
==========================================================

partly fixes 3299

Draw a line. Draw an arc. Make one endpoint of each coincident. Select the line. Select the Arc. Hit tangency. You now get an Endpoint-to-Endpoint tangency.
2018-01-27 12:33:11 +01:00
wmayer
6fc5efa2e7 fix const correctness, restore sketcher icon 2018-01-26 17:21:02 +01:00
Abdullah Tahiri
7df64a6ab9 Sketcher: Switch virtual space toolbar button to operate on selection
======================================================================

The switch virtual space toolbar button operated just to switch from one virtual space to the other (without any element selected), so switching the "mode".

Now if there is a selection, all the constraints are moved to the alternative virtual space.

It works similar to the toggle buttons for geometry elements and constraints
2018-01-26 17:05:58 +01:00
Abdullah Tahiri
a33f094e46 Sketcher: constraints' widget checkbox as python command
========================================================

Enables do/undo after switching constraints from one space to the other
2018-01-26 17:05:25 +01:00
Abdullah Tahiri
b74983cf5b Sketcher: Switch Virtual Plane icon 2018-01-26 17:05:00 +01:00
Abdullah Tahiri
e14f284cba Sketcher: Bug fix not updating constraints on switch of virtual space 2018-01-26 17:04:28 +01:00
Abdullah Tahiri
71e16bfbb1 Sketcher: New toolbar for VirtualSpace and Command to switch VirtualSpace 2018-01-26 17:04:08 +01:00
Abdullah Tahiri
847becb32c Sketcher: Extend virtual space switching and update to constraints widget 2018-01-26 17:03:39 +01:00
Abdullah Tahiri
471c0a4a2c Sketcher: Enable switching of virtual space in ViewProvider 2018-01-26 17:03:16 +01:00
Abdullah Tahiri
5e11e37712 Sketcher: Python Interface for Constraint Virtual Space
=======================================================

set/get/toggle python interface to enable to set the virtual space status of a constraint via SketchObject.
2018-01-26 17:02:46 +01:00
Abdullah Tahiri
804bbbc9cd Sketcher: Enable Virtual space updates on the View Provider
===========================================================

Basic initial working implementation to hide constraints.
2018-01-26 17:02:22 +01:00
Abdullah Tahiri
600bcf9513 Sketcher: Extension of Constraints Widget to support checkboxes for Virtual Space
=================================================================================

The checkboxes enable a constraint to swap virtual space.

If checked the constraint is visible in the selected space and hidden in the other space (Real Space or Virtual Space).
If unchecked the constraint is visible in the other space and hidden in the selected space.
2018-01-26 17:01:35 +01:00
Abdullah Tahiri
2ec9645a6b Sketcher: Extension of constraints to store virtual space affiliation
=====================================================================

The constraint class has been extended so that every constraint knows and serializes whether it is in virtual space or in normal real space.
2018-01-26 17:01:11 +01:00
luz.paz
9ca8f2a3d2 Sketcher: comment typos
Found via `codespell`
[skip ci]
2018-01-25 18:47:34 -02:00
Abdullah Tahiri
66f29c52ad Sketcher: Fix normal rendering when full-constraint
fixes #3320
2018-01-23 16:57:33 +01:00
wmayer
c65585ccaf improve whitespace, fix const correctness 2018-01-23 00:40:41 +01:00
Abdullah Tahiri
46aa2c6356 Sketcher: Change nomenclature relating to Block constraint 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
fc0e6478f3 Sketcher: Constraint widget adapted to Block constraint 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
73d817281a Sketcher: UI Block constraint creation sanity checks
====================================================

Avoid creation of constraints if they would lead to undesirable conflicting situations.
2018-01-22 22:52:56 +01:00
Abdullah Tahiri
74043d5063 Sketcher: Block constraint - Prevent from adding constraint if the solver has redundant/conflicting constraints 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
41fe55bda3 Sketcher: Block Constraint - Advanced redundant/conflict redundant handling
===========================================================================

Block constraint is naturally redundant/conflicting with almost any other constraint applied to an edge (certainly with constraints operating only on that element).

As such, a block constraint will have very little applicability in absence of a way to handle this redundancy/conflicting. For example, in the case of a BSpline all its
internal geometry (construction circles on poles and its constraints) would have to be removed before locking. This would mean that it is not possible to define the BSpline shape
and then block it, as when removing the internal geometry the shape would be lost. In other cases, like temporally blocking to avoid that a part of the sketch moves while performing some
operation with the idea of afterwards unblocking it, it would mean removing all constraints, to add the block constraint, then perform the action, then remove the block constraint and manually
constraint it again.

Handling this situation in a user expected way means ignoring certain constraints (those causing the redundancy/conflicting), so that the solver is not aware of them and does not complain. However,
generally ignoring those constraints has a negative effect, in that constraints applied by the user on already blocked geometry, or constraints that otherwise lead to a conflicting or redundant
situation as a consequence of actions (further constraining) after the Block constrain is applied are ignored, thereby not properly informing the user of this situation, which is undesirable.

This new mechanism takes account on the position of the constraints relative to the involved blocked constraint(s). As such, redundant/conflicting constraints that were added before the Block
constraint are ignored, whereas those constraints that lead to a redundant/conflicting situation and added AFTER the block constraint was already in place, those are not ignored and are reported
accordingly.
2018-01-22 22:52:56 +01:00
Abdullah Tahiri
470913434a Sketcher: Blocked constraint viewprovider rendering 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
015609a0fa Sketcher Blocked Constraint icons 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
08d23cf951 Sketcher: Blocked Constraint toolbar commands 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
fa3e0462e0 Sketcher: Blocked Constraint Python 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
7d2aab853e Sketcher: Blocked Constraint solver level 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
4bfa12d86d Sketcher: Correction of B spline normals
========================================

When writting solver implementations it has to be taken into account that the normal is not to be provided in the sense of the curvature, but to
the left when walking a curve from start to end.

https://forum.freecadweb.org/viewtopic.php?f=10&t=26312#p209486

This commit has impact on all the previous files using bspline and endpoint to endpoint tangency.

A work-around is to delete the tangency and do it again.
2018-01-20 17:21:26 +01:00
wmayer
ee0b91961b improve whitespaces 2018-01-13 15:49:39 +01:00
Abdullah Tahiri
40459e73cd Sketcher: Remove errors in reporting view while deleting
=======================================================

fixes #2275

https://freecadweb.org/tracker/view.php?id=2275

Deletion of coincidents rely on selected vertex. The original code was trying to delete a coincident without checking whether one was there.

The implementation now relies on checking whether a coincident is present.
2018-01-13 15:47:02 +01:00
wmayer
adaf9323f3 improve whitespaces 2018-01-13 14:07:15 +01:00
Abdullah Tahiri
e1bf2045dd Sketcher: Overload delConstraintonPoint Python to allow deletion on GeoId and Pos 2018-01-13 13:55:56 +01:00
Abdullah Tahiri
74b097ee75 Sketcher: Improve validation ui to select whether to ignore construction geometry or not
========================================================================================

Users generally expect that validate Sketch checks the visible part, perhaps because it is not called from the sketcher's edit view, but from the 3D view, perhaps
because that part is relevant for further construction.

On the other hand the tool's name is Validate Sketch and construction geometry belongs to the sketch.

So a new checkbox is introduced, by default enabled to ignore construction, but still allowing the user to make it operate in one direction or the other.

See:
https://forum.freecadweb.org/viewtopic.php?f=3&t=26139&p=208582#p208693
2018-01-13 11:31:11 +01:00
Abdullah Tahiri
362ba9c473 Sketcher: Fix "highlight open vertex" visualization
===================================================

fixes #3306
2018-01-13 11:30:48 +01:00