Commit Graph

32 Commits

Author SHA1 Message Date
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
wmayer
5ff6945577 fix compiler warnings with py3 and msvc 2018-04-16 18:24:53 +02:00
wmayer
86e328a248 check for valid vertexes when measuring angles between two edges 2017-05-29 20:49:35 +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
Kunda
9410e751e9 source typo fixes pt4 (only on py3 merged code) 2017-03-02 13:47:21 +01:00
wmayer
c2dd2e2b99 fix Coverity issues 2016-08-21 18:46:40 +02:00
Mateusz Skowroński
6942c23895 Qt4's qglobal.h defined TRUE and FALSE. Qt5 does not do it anymore. Replace it with true and false.
158f39ec78

This change is Qt4/Qt5 neutral.
2016-01-05 16:43:33 +01:00
wmayer
6b3340e7b5 + include missing header files 2015-07-01 13:02:29 +02:00
wmayer
922d3b5101 + fix some issues 2014-03-15 12:36:07 +01:00
blobfish
ad7aa67434 Part: Changes to dimension
move 2 icons to main gui
    enable and disable stepped buttons
    move reset dialog to control widget
    only dimension 1 linear solution
2013-12-22 17:31:10 +01:00
jriegel
a27c43d9c5 fixes for windows 2013-12-18 22:49:58 +01:00
blobfish
5d4b59dbd0 adding some headers 2013-12-17 22:54:40 -05:00
blobfish
00eccc380c Part Dimension: new implementation files 2013-12-17 10:05:54 -05:00