Commit Graph

62 Commits

Author SHA1 Message Date
Chris Hennes
830c59b2e6 Part: Remove trailing spaces from translations 2024-03-12 22:42:19 -05:00
wmayer
d305f306df Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
AgCaliva
b360b43ebe Fixing DOMDocument redefinition 2023-09-16 00:38:41 -03:00
wmayer
b9e9fe435a Part: modernize C++: use equals default 2023-08-22 15:14:03 +02:00
wmayer
c8abd4a6d4 Part: modernize C++: return braced init list 2023-08-19 11:35:41 +02:00
bdieterm
d5c4e501ad ignore whole selected objects for Part linear/angular measurement tool
Whole objects selected in the model tree will be ignored for the measurement element selection.
This allows for selecting and toggling the visibility of an object in the model tree.
2023-08-16 15:01:45 +02:00
wmayer
948cbfccd9 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
wmayer
52e1c7c33b modernize C++: move from boost::bind to std::bind 2023-08-08 17:36:13 +02:00
Ronny Standtke
e89cba0769 move "Close" button of angular variant also to north 2023-03-13 11:56:27 -05:00
wmayer
083da6cf03 Part: replace slots with member function pointers 2023-02-03 00:21:38 +01:00
wmayer
0680121bd1 Part: move to new style connect() 2023-01-13 17:14:07 +01:00
luz paz
2f1ff7928b Part: remove trailing whitespace 2022-11-15 14:19:30 -06:00
Adrián Insaurralde Avalos
3257766c44 Move "Close" button to north in measure dialog
for consistency with other task dialogs
2022-11-03 20:29:15 -04:00
Uwe
379362bcd2 [Part] Task*: remove unused includes - part 1
- also some sorting
2022-09-26 03:05:23 +02:00
Uwe
d0c4a33992 [Part] fix bold italic measurement text
- bold and italic font did not work for measurement text, see https://github.com/FreeCAD/FreeCAD/pull/7148#issuecomment-1247989284
2022-09-16 03:09:24 +02:00
berniev
53ba98d636 Mod: use empty 2022-08-06 19:30:13 +02:00
Uwe
763a575b23 Mod: remove some unnecessary nullptr checks 2022-07-18 12:58:12 +02:00
Uwe
d2ccbc75c4 [Part] cleanup new preferences Feature
- correct preferences location
- handle preferences packs
- remove unused code
2022-07-18 12:42:26 +02:00
VM4Dim
7181024879 [PartGui] Add Font and Color Preferences to Measure dimensions (#7148)
* [Part] Add Font and Color Preferences to Measure dimensions v4

authored-by: VM4Dim <vm4dim@users.noreply.github.com>
Co-authored-by: Uwe <donovaly@users.noreply.github.com>
2022-07-18 11:52:00 +02:00
Uwe
24468b59ad re-add some nullptr
to be safe since their removal within assert() or bools might have some impact I don't know
2022-07-18 02:32:36 +02:00
Uwe
0ff8a02105 [Part] remove more superfluous nullptr checks 2022-07-18 01:36:27 +02:00
mosfet80
c48a569696 Boost version <=1.60 is never used in freecad 0.20 (#7038)
* Boost version 1.60 is never used in freecad 0.20
2022-06-24 02:20:26 +02:00
wmayer
b38df5ee78 Part: make DimensionLinear node kit unpickable
See forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=69056
2022-05-30 15:43:27 +02:00
Kuzemko Alexsandr
d7bd80d44d [Part] Part Measure Linear (tool) fix translation for "Selection xx" button.
* [PartDesign] Part Design Measure Linear (tool) fix translation for
"Selection xx" button.

* [Part] No need translate "Selection xx" string twice.
2022-05-05 22:51:18 +02:00
wmayer
0b2c73cf32 Gui: clean-up Selection API
Replace the int of the 'resolve' argument of several functions with a proper enum class.
* This avoids the inconsistencies in client code where often true/false is passed when an int is expected
* This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
2022-04-09 17:03:43 +02:00
wmayer
6d2d45ceb7 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
3e1dbde0cf [Part] remove Python.h from headers
seems not to be necessary anymore
2022-03-20 14:16:55 +01:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
a8c912d6f8 [App] Expression and Extension: remove unused includes 2022-02-25 18:06:57 +01:00
wmayer
a6838cf58f Gui: rename methods of SelectionObserver to clarify intention in client code 2021-12-07 14:17:07 +01:00
wmayer
253bbb54ba Part: [skip ci] Fix coverity warning
Coverity warnings fixed:

CID 316522 (#2 of 2): Uninitialized scalar variable (UNINIT)
5. uninit_use_in_call: Using uninitialized value newSelection. Field newSelection.shapeType is uninitialized when calling push_back
2021-02-21 16:06:59 +01:00
Chris Hennes
3bb03af723 [Part] Coverity: dtors can't throw 2021-02-09 23:58:09 +01:00
donovaly
1eadd78918 [Part] fix angular measurement
the arrow heads are much too large so that the feature use quite useless

The PR fixes this to make the arrow heads as large as for linear dimensions
It also slightly increase the arrow head size since.
2021-01-06 04:37:53 +01:00
vocx-fc
716c2d67eb Part: improve tooltip of measure commands
Also update the text of the buttons in the `TaskDimension` task panel.

Remove tabs in the source code, as there was a mix of tabs
and spaces. Further cleaning is necessary as the indentation
is inconsistent and mostly 2 spaces instead of 4 spaces.
2020-10-13 12:50:50 +02:00
vocx-fc
c0f6ecfc86 Part: move icons to measure subdirectory
The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
2020-10-12 19:54:11 +02:00
wmayer
9424395afc PVS: V1004 A pointer was used unsafely after it was verified against nullptr 2020-07-18 10:59:27 +02:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
730154a684 boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
7e71c8ecc5 [skip ci] include missing boost header 2020-06-07 20:58:45 +02:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
wmayer
e48c52c480 force strict ISO C++ (-Wpedantic)
for Drawing, Image, Inspection, Mesh, MeshPart, Part, Path, Points, Raytracing, ReverseEngineering, Spreadsheet, Start, Surface, Web

TODO: fix several -Woverflow in area
2019-09-18 11:32:42 +02:00
Zheng, Lei
f028ba42ff Part: changes to Part Module
* Added Part::Feature::getTopoShape/getShape() function that can obtain
  shape from any object with proper implementation of getSubObject(). It
  can even construct compound from group object with proper implementation
  of getSubObjects().

* Modified ViewProviderExt to work on any object, because it now obtain
  the shape using Part::Feature::getShape()

* Modified various Part features to obtain base/tool shapes using
  Part::getShape(), which allows them to be any type of object,
  including Link and groups.

* Modified various Part command to relax type requirement on selected
  objects.

* Add support of link and group to dimension, and add dimension refresh
  command

* Support link and group in simple command command, and add a few more
  copy command variations.

* Add special handling of 'Shape' attribute in PropertyContainerPy and
  use Part::Feature::getShape() to return shape for any object without
  Shape property. This allows many python feature work with any object
  without modification.

* GeometrySurface/CurvePy, add convenience attribute 'Rotation'

* TopoShapePy:

    * Extended support of sub shape attribute, e.g. Compound1, Solid2,
      SubShape3 ('SubShape' is used to access child shape of a compound)

    * makeWires(), new API to sort and return wires given a list of edges.

    * transformed/translated/rotated/scaled(), return a new shape with
      some transformation.

    * findPlane(), find the plane of a planar shape

    * isCoplanar(), check if two shape are coplanar
2019-08-17 15:08:35 +02:00
Abdullah Tahiri
7ea21c84c3 PCH: Part GUI 2019-05-03 23:15:25 +02:00
wmayer
23eb2bd51f make colors of measurements customizable 2019-04-05 13:33:29 +02:00
Craig Marshall
3a19456672 Fix #2034 with more precision attempt 2 2019-03-14 23:16:14 +01:00
Craig Marshall
b8db3c5fd9 Fixes Bug 2034. Made Part dimensional arrows proportional to line length and radius 2019-03-12 10:38:07 -03:00
wmayer
251d1a18b2 fixes FreeCAD segfaults when pressing 'Clear All' in Measure tasks dialogue with no opened document 2019-03-10 12:27:20 +01:00
wmayer
e23db2e313 PVS: V773 A memory leak is possible 2019-02-17 18:40:06 +01:00
luz.paz
3fb71fbe2a [For v0.18] Crowdin fixes
https://crowdin.com/translate/freecad/568/en-en#1172237
https://crowdin.com/translate/freecad/568/en-en#1172239
https://crowdin.com/translate/freecad/568/en-en#195053
https://crowdin.com/translate/freecad/568/en-en#1172247
https://crowdin.com/translate/freecad/568/en-en#1172249
https://crowdin.com/translate/freecad/568/en-en#1172251
https://crowdin.com/translate/freecad/6766/en-en#6511058
https://crowdin.com/translate/freecad/6766/en-en#6511060
https://crowdin.com/translate/freecad/6766/en-en#6502381
+ random typo fixes
2019-01-13 02:24:50 +01:00
wmayer
1c646c9488 fixes 0003427: Measurement tool measures wrongly 2018-09-26 16:37:00 +02:00