Commit Graph

71 Commits

Author SHA1 Message Date
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
wmayer
2486e959b9 increase minimum deviation for tessellation to avoid to freeze the GUI 2017-10-18 10:40:02 +02:00
luzpaz
ab8f8919b6 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
4d7554197e fix crash when Part model changes with VBO activated 2017-05-16 19:30:13 +02:00
wmayer
9aac25b763 fixes #0003000: View property Angular Deflection can freeze FC 2017-04-27 19:20:22 +02:00
wmayer
35544db84a fix vertex highlighting 2017-04-24 17:19:21 +02:00
wmayer
7e977a8ecc rename material binding class member for faces to make clear its purpose 2017-04-24 14:53:05 +02:00
wmayer
6a4171c243 implement highlighting of surface in filling task panel 2017-04-24 14:43:30 +02:00
wmayer
b2c2e3ffda fix material binding of indexed lineset when highlighting an edge 2017-04-17 19:02:11 +02:00
wmayer
8612c4f99f write custom action class to notify shape node about vbo changes 2017-02-12 14:41:55 +01:00
wmayer
56ff88ea46 cleanup experimental code, improve whitespaces 2017-02-12 14:41:55 +01:00
Jean-Marie Verdun
8383f7222f 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
8724eaed36 use indexed map to avoid iterating a face twice in case of a compsolid 2016-11-17 15:40:22 +01:00
wmayer
1ce73dda96 fix -Wextra in Part 2016-09-22 11:49:28 +02:00
Yorik van Havre
3dd3461aec Do not get transparency from DiffuseColor if not set per face - fixes #2675 2016-08-16 23:45:17 -03:00
Yorik van Havre
43e0834fb4 Part: Enabled per-face transparency 2016-07-07 12:46:25 -03:00
wmayer
bca7a1866e + port to OCC 7.0 2016-05-14 16:53:27 +02:00
wmayer
59980c33d1 + methods to highlight points, edges or faces of a shape 2016-05-09 23:48:30 +02:00
wmayer
7e01d0128b + issue #0002525: Line color of shapes are always black 2016-05-06 13:57:13 +02:00
wmayer
5de9696365 + fix warnings:
-Wsign-compare, -Wunused-variable, -Wunused-function, -Wswitch
+ fix Qt issues
2016-04-13 14:26:38 +02:00
Stefan Tröger
788035b80e Part: Recalculate tessellation when requested 2016-04-12 18:12:23 +02:00
Stefan Tröger
fec86abc09 visualize the primitive add/sub shape in edit 2016-04-12 18:12:07 +02:00
jriegel
842604a2f8 small warning fix 2016-04-12 18:12:03 +02:00
Jan Rheinländer
af25c0c793 Reference highlighting for fillets and chamfers 2016-04-12 18:12:00 +02:00
wmayer
72a260cc6e + clear highlighting when re-creating shape 2015-10-06 00:19:43 +02:00
wmayer
d3281a66eb + fix whitespace, fix notification of changed property in view provider 2015-09-13 18:46:06 +02:00
wmayer
617bd8c859 + re-insert removed line 2015-08-03 10:53:36 +02:00
wwmayer
e7441149f0 + fix many minor warnings, activate -Wall for gcc 2015-08-02 22:32:18 +02:00
Sebastian Hoogen
db13fbb7b3 add angularDeflection property to ViewProvider
issue #1868
2015-03-21 19:27:43 +01:00
Stefan Tröger
d5ee7a6efe implement correct vertex normals
- use mesh vertices uv value to get correct normals from face
- remove unused normal and shading options for parts
2015-02-28 15:09:38 +01:00
wmayer
6872b2c393 + fixes #0001736: Parts with multiple colors are displayed in a single bad color after hiding 2014-12-04 14:36:43 +01:00
wmayer
84bd9a4a88 + fixes #0001779: memory leak 2014-10-16 18:57:53 +02:00
wmayer
cc775f9254 + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
Sebastian Hoogen
a0454af685 remove all references to BRepMesh 2014-07-18 10:43:16 +02:00
wmayer
a9d1979270 + include missing header file 2014-07-15 10:27:02 +02:00
wmayer
37cc136310 + do meshing of shapes in parallel 2014-04-01 16:38:44 +02:00