Commit Graph

106 Commits

Author SHA1 Message Date
wmayer
2a970b3045 clang: fix -Wunused-but-set-variable 2023-03-12 15:05:21 +01:00
Uwe
6e5be52325 [Part] improve PreCompiled.h handling 2022-12-07 23:20:46 +01:00
luz paz
6e542b6fad Part: remove trailing whitespace 2022-11-15 14:19:30 -06:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
2d4c5a4cfb Mod: use emplace_back 2022-08-05 10:36:16 +02:00
Uwe
eabffee3a5 [Part] ViewProvider: 2 to M: remove unused includes 2022-07-31 15:36:20 +02:00
Uwe
5f8e0c46ee [Part] remove more superfluous nullptr checks 2022-07-18 01:36:27 +02:00
andrea
93525ff7eb removed references to OCC<7 2022-06-25 14:29:24 +02:00
marioalexis
1ba78b7e72 Part: Use regex to match names in ViewProviderPartExt::getDetail 2022-04-26 11:58:45 +02:00
wmayer
068c0e5a98 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
62496d7277 Revert "App: fix property ordering problem when undo/redo (#3255)"
This reverts commit c3178343db.
2022-02-22 01:21:49 +01:00
Zheng Lei
c3178343db App: fix property ordering problem when undo/redo (#3255)
* Part: fix Placement/Shape onChanged() handling

* App: fix property ordering problem when undo/redo
See https://tracker.freecadweb.org/view.php?id=4265#c14271

* Gui: fix undo/redo signaling
Make sure to signal after all properties has been restored
2022-02-21 12:29:01 +01:00
wmayer
b6ebeef6f3 Part: fix regression by commit 289a9bcc8
* Standard_Version.hxx is required for the OCC version check macro
* group sorted header includes by library
2022-02-17 11:09:35 +01:00
Uwe
289a9bcc87 [Part] ViewProviderExt: remove unused includes
- also sort them
2022-02-17 05:00:17 +01:00
Uwe
aa02ab5c66 [Part] add context menu icon for color face
- the other context menu entries have icons and we use this icon already in the View menu

- also sort the includes
2022-02-17 03:20:31 +01:00
Zheng, Lei
75e639c94c App/Gui: add new ObjectStatus TouchOnColorChange
For triggering recompute on color changes
2021-12-21 21:41:02 -07:00
wmayer
f7ec9787d1 Part: a deflection of 0.0 is not allowed any more for meshing a shape 2021-12-10 13:31:40 +01:00
Chris Hennes
ce56d65162 Merge pull request #4952 from realthunder/FixDocumentRestore
Fix external document loading
2021-10-31 10:36:12 -05:00
wmayer
9e8516002b Part: fixes #0004774: Datum plane or line is not available in sketch in another body via binder 2021-10-30 22:28:57 +02:00
Zheng, Lei
a2fb4a5d6d Minor code change according to suggestions 2021-10-30 12:30:45 +08:00
Zheng, Lei
414ea71a28 Part: fix unnecessary document 'modified' status 2021-10-30 11:02:39 +08:00
Chris Hennes
834831b6c8 Merge pull request #5098 from realthunder/FixStepColor
Fix STEP import/export color problem
2021-10-10 18:46:43 -05:00
Zheng, Lei
45d0660727 Part: minor change on transparency setting 2021-10-11 06:02:54 +08:00
Zheng, Lei
498b40800e Part: sync ViewProviderExt::DiffuseColor on Transparency change 2021-10-10 22:01:25 +08:00
wmayer
74639da997 OCCT: port FreeCAD sources to version 7.6
SMESH is not yet ported
Although FreeCAD code compiles with OCCT 7.6 it doesn't work at the moment
2021-10-09 13:49:02 +02:00
wmayer
c2c5ae1bf0 Part: remove ViewProviderPartExt::getNormals 2021-10-08 19:34:48 +02:00
Zheng, Lei
c3e3ff3c8b Part: set transparency in ViewProviderExt::DiffuseColor
For single color shape
2021-10-07 17:44:09 +08:00
Benjamin Alterauge
ed1d71e671 Possible to use DefaultShapeVertexColor setting.
Add a separate material for vertex. So, it is possible use DefaultShapeVertexColor. [Ticket #4692](https://forum.freecadweb.org/viewtopic.php?f=3&t=59576)
2021-08-03 07:35:00 +02:00
Zheng, Lei
1dddcd0b18 Part: fix ViewProviderExt::updateVisual() on incomplete mesh 2021-01-28 17:38:49 +01:00
vocx-fc
15408b2132 Part: rename the basic Part 2D and 3D icons
The basic icons for the basic features are renamed,
`Tree_Part` to `Part_3D_object`, `Tree_Part2D` to `Part_2D_object`.
2020-10-22 15:11:45 +02:00
wmayer
f81c1cd31f Part: make changing face colors independent of edit-mode implementation of a view provider 2020-10-13 14:16:01 +02:00
carlopav
9b71dd77b6 Part: grouped ViewProviderExt subdivided view properties 2020-08-21 12:36:46 +02:00
wmayer
dc65b055e5 LGTM: [skip ci] fix: Empty branch of conditional
An empty block after a conditional can be a sign of an omission and can decrease maintainability of the code.
Such blocks should contain an explanatory comment to aid future maintainers.
2020-07-26 15:49:14 +02:00
wmayer
cb2099aa6b Part: optimize ViewProviderPartExt::getNormals 2020-07-22 20:33:17 +02:00
wmayer
421f6c52cb Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00
wmayer
d414fc6311 Part: [skip ci] set again Two-side rendering as default lighting style 2020-04-06 14:12:44 +02:00
wmayer
8832356802 Part: [skip ci] add option to set two-side rendering of Part shapes 2020-02-22 12:09:26 +01:00
wmayer
5abb3e57c2 Part: [skip ci] use the right value from the user settings to set point size 2020-02-08 11:07:06 +01:00
asapelkin
e951094af9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
Zheng, Lei
4c2647393d Part: add missing API ViewProviderPartExt::getElementColors()
This API is defined in Gui::ViewProvider to allow color override in
Link. In particular, the implementation in PartGui::ViewProviderPartExt
allows override for various part shapes.
2019-10-08 10:22:17 +02:00
Zheng, Lei
45fd865fc0 Gui: refactor bounding box selection style
Previously, box style selection is rendered using customized
SoBoxSelectionRenderAction, which does not support selection context,
i.e. it does not work with Link.

This patch implements context aware bound box rendering inside
SoFCSelectionRoot, SoFCSelection and SoFCPathAnnotation (for always on
top rendering). The box rendering in SoBoxSelectionRenderAction is
disabled on construction. Box style selection can be enabled for
individual object through property SelectionStyle (moved from
ViewProviderGeometryObject to ViewProviderDocumentObject), or globally
through Parameter BaseApp/Preferences/View/ShowSelectionBoundingBox.

In addition, the parameter BaseApp/Preferences/View/UseNewSelection is
used to override selection model reported from
ViewProvider::useNewSelectionModel(). The reason being that, the same
parameter is already used to toggle selection model inside
SoFCSelection. This avoids inconsistency of selection model choice
between view provider and the SoFCSelection node inside. Note that if
the parameter 'UseNewSelection' is set to false, those view providers
that choose old selection model will not work with Link.
2019-10-08 09:56:09 +02:00
Zheng, Lei
6663d625a9 Gui: add new API ViewProviderDocumentObject::allowOverride()
This API is used to delcare if a view provider can be used as an
override for a give object.

Conflicts:
	src/App/DocumentObject.h
2019-10-06 17:22:57 +02:00
wmayer
a243b95209 fix -Wpedantic 2019-09-18 18:48:01 +02:00
Zheng, Lei
6da72b9859 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
wmayer
9f394aa53a set name to Inventor node of display mode 2019-01-15 21:26:54 +01:00
wmayer
9fde41ff19 Allow user to define a custom minimum deviation for the tessellation 2018-11-09 13:42:38 +01:00
wmayer
c582b069ba fix compiler warnings with py3 and msvc 2018-04-16 18:24:53 +02:00
wmayer
a701c71ed8 add option to compute vertex normals from the triangulation instead of the u,v nodes
This is a workaround for issue #0003180: Wrong normal of part object
2018-01-14 15:55:01 +01:00
wmayer
8ba4e0c5d0 code cleanup 2018-01-13 21:57:14 +01:00
luzpaz
e883cbfdf3 Part: typos 2017-12-25 11:03:11 +01:00