Commit Graph

144 Commits

Author SHA1 Message Date
wmayer
9c8763c720 Part: fix regression by commit 5dfd4fef7
* 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
8cbee76183 [Part] ViewProviderExt: remove unused includes
- also sort them
2022-02-17 05:00:17 +01:00
Uwe
c31cd6abb2 [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
c37c8658c4 App/Gui: add new ObjectStatus TouchOnColorChange
For triggering recompute on color changes
2021-12-21 21:41:02 -07:00
wmayer
e3e22f83c5 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
3cdfe38978 Merge pull request #4952 from realthunder/FixDocumentRestore
Fix external document loading
2021-10-31 10:36:12 -05:00
wmayer
e4851a11b4 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
c349e78f45 Minor code change according to suggestions 2021-10-30 12:30:45 +08:00
Zheng, Lei
39e2381f29 Part: fix unnecessary document 'modified' status 2021-10-30 11:02:39 +08:00
Chris Hennes
c3ba3fd30f Merge pull request #5098 from realthunder/FixStepColor
Fix STEP import/export color problem
2021-10-10 18:46:43 -05:00
Zheng, Lei
b200578e08 Part: minor change on transparency setting 2021-10-11 06:02:54 +08:00
Zheng, Lei
7fff27f036 Part: sync ViewProviderExt::DiffuseColor on Transparency change 2021-10-10 22:01:25 +08:00
wmayer
a7f9c2f1b9 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
9aa287ba7b Part: remove ViewProviderPartExt::getNormals 2021-10-08 19:34:48 +02:00
Zheng, Lei
7dfcb9dad0 Part: set transparency in ViewProviderExt::DiffuseColor
For single color shape
2021-10-07 17:44:09 +08:00
Benjamin Alterauge
6128a073f3 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
99fe37928c Part: fix ViewProviderExt::updateVisual() on incomplete mesh 2021-01-28 17:38:49 +01:00
vocx-fc
f945b4c6ae 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
165feeba53 Part: make changing face colors independent of edit-mode implementation of a view provider 2020-10-13 14:16:01 +02:00
carlopav
d1d42e1e46 Part: grouped ViewProviderExt subdivided view properties 2020-08-21 12:36:46 +02:00
wmayer
e9ce75d544 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
b05fb4dceb Part: optimize ViewProviderPartExt::getNormals 2020-07-22 20:33:17 +02:00
wmayer
0a6929a122 Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00
wmayer
43844e9a59 Part: [skip ci] set again Two-side rendering as default lighting style 2020-04-06 14:12:44 +02:00
wmayer
b97f37cf9a Part: [skip ci] add option to set two-side rendering of Part shapes 2020-02-22 12:09:26 +01:00
wmayer
3ea4428b47 Part: [skip ci] use the right value from the user settings to set point size 2020-02-08 11:07:06 +01:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
Zheng, Lei
50102918d3 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
bb3baefdb5 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
2df3052ecf 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
6a1bfc0ab2 fix -Wpedantic 2019-09-18 18:48:01 +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
wmayer
9a5a28e4a9 set name to Inventor node of display mode 2019-01-15 21:26:54 +01:00
wmayer
5737b3241f Allow user to define a custom minimum deviation for the tessellation 2018-11-09 13:42:38 +01:00
wmayer
5ff6945577 fix compiler warnings with py3 and msvc 2018-04-16 18:24:53 +02:00
wmayer
2b5765eb66 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
450e409c9b code cleanup 2018-01-13 21:57:14 +01:00
luzpaz
5973d8d67e Part: typos 2017-12-25 11:03:11 +01:00
wmayer
c83664b159 increase minimum deviation for tessellation to avoid to freeze the GUI 2017-10-18 10:40:02 +02:00
luzpaz
f3bf8fe919 Misc. typos
+ some are doxy others are just comment code.  
+ some minor whitespace and grammatical tweaks. 
+ app/SCL/* typos have also been submitted upstream (https://github.com/stepcode/stepcode/pull/366). So it's ok to merge them in to master.
2017-10-04 17:59:11 +02:00
wmayer
11b187309b fix crash when Part model changes with VBO activated 2017-05-16 19:30:13 +02:00
wmayer
712766c3e8 fixes #0003000: View property Angular Deflection can freeze FC 2017-04-27 19:20:22 +02:00
wmayer
6e33aad6bc fix vertex highlighting 2017-04-24 17:19:21 +02:00
wmayer
fdf29399f4 rename material binding class member for faces to make clear its purpose 2017-04-24 14:53:05 +02:00
wmayer
fb3fb9643d implement highlighting of surface in filling task panel 2017-04-24 14:43:30 +02:00
wmayer
4866d3595f fix material binding of indexed lineset when highlighting an edge 2017-04-17 19:02:11 +02:00
wmayer
fe15db6af3 write custom action class to notify shape node about vbo changes 2017-02-12 14:41:55 +01:00
wmayer
4a0720dd00 cleanup experimental code, improve whitespaces 2017-02-12 14:41:55 +01:00
Jean-Marie Verdun
44af3629db Accelerate 3D rendering with VBO support
*First step to move Part rendering using VBO instead of direct rendering
*Update comments inside the code
*Assume VBO is available if OpenGL > 3.0 is detected
*Add initial Color support to VBO rendering !
*Initial full feature VBO rendering implementation
*Modify some include issue for linux build
*Try to fix linux include header
*Reupdate header include for linux support
*Fix compilation on linux
*Fix linux and MacoOS build
*Fix glGetString definition
*Fix Windows build
*Add VBO support as an option into the Preference menu
*Fix crash while running FreeCAD test bench with new VBO rendering infrastructure (in both cases)
*Improve performances
*Compute material index only when a VBO update is required (improve frame rate by 10%)
*Clean the code
*Fix Travis compilation warning
*Try to fix Windows compilation issue
*Update include for Windows
2017-02-12 14:41:55 +01:00
wmayer
e85aa31d76 use indexed map to avoid iterating a face twice in case of a compsolid 2016-11-17 15:40:22 +01:00