Commit Graph

1218 Commits

Author SHA1 Message Date
Abdullah Tahiri
0ac32464e4 Sketcher: Bug fix - prevent inter part/body links
=================================================

With the support for external geometry during carbon copy, it was introduced a way for creating inter-part/inter-body links. See:
https://forum.freecadweb.org/viewtopic.php?f=10&t=27700&p=223736#p223736

This commit closes this door, while still allows carbon copy with external geometry support within the same body.
2018-03-30 21:00:24 +02:00
Yorik van Havre
d4f835ab39 Merged translations from crowdin 2018-03-26 18:52:02 -03:00
luz.paz
e9c2145ec7 [For v0.18] Sketcher: Doc typo fix 2018-03-25 11:58:40 +02:00
wmayer
ff955c1aa1 check for selected sub-elements in sketcher copy function 2018-03-17 13:50:07 +01:00
Abdullah Tahiri
49308811f4 fix string to char * conversion 2018-03-17 13:30:34 +01:00
Abdullah Tahiri
b70bec971e Sketcher: Carbon Copy Support for external geometry 2018-03-17 13:30:34 +01:00
wmayer
5fbdd7a704 close document in unit tests for sketcher 2018-03-14 17:15:36 +01:00
Abdullah Tahiri
a3a926723f Sketcher: Move point from python fix
====================================

https://forum.freecadweb.org/viewtopic.php?f=22&t=27282#p218637
2018-03-08 11:30:16 +01:00
wmayer
8c6b4ad1a6 fix German translation 2018-03-03 23:37:15 +01:00
Abdullah Tahiri
69efeb7d81 Sketcher: complete type and representation 2018-02-22 19:19:22 +01:00
Yorik van Havre
12f3258ded Applied latest translations from crowdin 2018-02-21 14:25:31 -03:00
wmayer
73522c3d10 fix scan coverity issues 2018-02-10 14:29:49 +01:00
Abdullah Tahiri
9ae9150bea Sketcher: Expose Type as readonly python attribute 2018-02-07 15:32:43 +01:00
luz.paz
55a2a7ab55 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
b6b9f61548 Misc. typos
Inspired by @normandc per https://gitter.im/FreeCAD/FreeCAD?at=5a729c6ece68c3bc742df205
2018-02-07 09:40:03 +01:00
triplus
23bdf54e98 Sketcher virtual space toolbar issue
+ Fix issue when creating sketcher virtual space toolbar
+ Translation support
2018-02-02 16:34:22 +01:00
wmayer
7d5d250a0d fix syntax errors 2018-01-31 20:53:42 +01:00
luz.paz
a86c0fe137 sWhatsThis fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=10&t=26687
2018-01-31 19:07:07 +01:00
wmayer
d1949f6e28 add command to show/hide several constraints at once 2018-01-27 21:10:01 +01:00
wmayer
ada88a3dd1 expose more members of Constraint class to Python 2018-01-27 19:35:02 +01:00
wmayer
7f3b40a9ca fix crash when deleting constraint 2018-01-27 17:08:49 +01:00
wmayer
e9e0071ccc improve whitespaces 2018-01-27 16:47:55 +01:00
wmayer
acded1c954 save values before invalidating iterator, whitespace improvements 2018-01-27 13:09:44 +01:00
Abdullah Tahiri
94ca105315 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
620188073e 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
180d722a53 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
f8eaa6eff4 fix const correctness, restore sketcher icon 2018-01-26 17:21:02 +01:00
Abdullah Tahiri
696eb7433f 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
740afeb642 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
879ff70886 Sketcher: Switch Virtual Plane icon 2018-01-26 17:05:00 +01:00
Abdullah Tahiri
8a2ec12b5a Sketcher: Bug fix not updating constraints on switch of virtual space 2018-01-26 17:04:28 +01:00
Abdullah Tahiri
4b7ef1c5b0 Sketcher: New toolbar for VirtualSpace and Command to switch VirtualSpace 2018-01-26 17:04:08 +01:00
Abdullah Tahiri
0c888309d6 Sketcher: Extend virtual space switching and update to constraints widget 2018-01-26 17:03:39 +01:00
Abdullah Tahiri
d987930338 Sketcher: Enable switching of virtual space in ViewProvider 2018-01-26 17:03:16 +01:00
Abdullah Tahiri
31189b6c20 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
d559c1477b 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
cccaa6d4dc 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
1899680ddc 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
23bf7f39a3 Sketcher: comment typos
Found via `codespell`
[skip ci]
2018-01-25 18:47:34 -02:00
Abdullah Tahiri
c509ec5ded Sketcher: Fix normal rendering when full-constraint
fixes #3320
2018-01-23 16:57:33 +01:00
wmayer
38da0c7312 improve whitespace, fix const correctness 2018-01-23 00:40:41 +01:00
Abdullah Tahiri
c7b137fe85 Sketcher: Change nomenclature relating to Block constraint 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
a4c29ba521 Sketcher: Constraint widget adapted to Block constraint 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
c27d5a26b2 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
9634da6811 Sketcher: Block constraint - Prevent from adding constraint if the solver has redundant/conflicting constraints 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
34f533b0e1 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
9b7d1d6042 Sketcher: Blocked constraint viewprovider rendering 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
d2e89b98d4 Sketcher Blocked Constraint icons 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
1932a2f152 Sketcher: Blocked Constraint toolbar commands 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
7495fe1c31 Sketcher: Blocked Constraint Python 2018-01-22 22:52:56 +01:00