Commit Graph

53 Commits

Author SHA1 Message Date
Kacper Donat
738a044f3c Gui: Add Show Plane utility to 2D Objects 2025-01-19 15:27:15 -05:00
Chris Hennes
64f63ae97e Merge pull request #15528 from ppphp/move_some_inventor
refactor: move some nodes to Inventor folder
2024-11-22 12:20:50 -05:00
wmayer
3e33f184b4 Core: Rename ViewProviderPythonFeature to ViewProviderFeaturePython
Fixes #15888
2024-08-26 18:14:22 +02:00
liukaiwen
4c6b7dadeb refactor: move some nodes to Inventor folder 2024-07-20 01:07:04 +08:00
bgbsww
8abd09398a Add support for OCCT 7.8.0 (#11909) 2024-01-09 19:47:25 -06:00
Florian Foinant-Willig
eb55f1fe52 Part: modernize type checking 2023-10-23 18:12:03 +02:00
wmayer
a0d86224f3 Part: modernize C++: use equals default 2023-08-22 15:14:03 +02:00
Andrew
b916c387fb Clean Mod/Part. remove old OCC <7.3 and #if 0 code. 2023-03-26 21:17:18 +02: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
adrianinsaval
3bacbf312d Improve grid maxNumberOfLines warning message 2022-07-25 21:01:12 +02:00
wmayer
fba4663baa Part: add instruction how to adjust the maximum number of grid lines 2022-07-19 11:50:56 +02:00
Zheng, Lei
3ef438eaf0 Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
0a65575c2c Part: PR6497 move return statement to new line 2022-03-29 12:37:00 -05:00
wmayer
068c0e5a98 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
8f894ebefe [Part] remove Python.h from headers
seems not to be necessary anymore
2022-03-20 14:16:55 +01:00
Uwe
74e473d162 [Part] ViewProvider2DObject: remove unused includes
- also sort them
2022-02-18 04:03:10 +01:00
0penBrain
76130c85ce [ViewProvider2DObject=>Sketcher] Fix grid visibility management
Error in grid visibility equation that makes grid to disappear when saving document in Edit mode
2021-11-05 03:18:08 +01:00
wmayer
4327cd5ccb Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02: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
da5bd6594b Part: [skip ci] move grid handling from ViewProvider2DObject to ViewProvider2DObjectGrid 2020-08-07 16:48:07 +02:00
wmayer
6592a76ac3 Part: [skip ci] use of ViewOrthoProjMatrix in ViewProvider2DObject::updateData to compute the grid 2020-08-07 13:32:29 +02:00
0penBrain
86658c339a [GUI/Sketcher] Add option to disable grid auto-sizing based on shape boundbox
Sketcher makes use of this option to self-manage the overall grid size
2020-08-07 13:30:42 +02:00
Abdullah Tahiri
1efe9c9208 Part: Gui ViewProvider2D Grid Management
========================================

1. The Grid has a default maximum of 10000 lines that is controlled via a new property. The grid is not created (is empty)
if a higher number of lines is necessary. This event is show as a Warning in the Report view.

2. The Grid now checks a new property ShowOnlyInEditMode before deciding whether to show the grid or not. This is a new
mode for ViewProvider2D and derived objects. If the property is set to true (and showGrid is true), the grid is only shown
if the object is in edit mode. If the property is set to false, the grid is shown regardless of whether it is in edit mode
or not (provided that showGrid is true).

3. Grid limits are now encapsulated (private). They can be set via a new function updateGridExtent.
2020-05-27 19:25:47 +02:00
0penBrain
da33ffc062 [Sketcher] Grid is displayed in 3D view only if sketch is visible 2020-05-27 19:25:47 +02:00
0penBrain
5b76419d58 [Sketcher] Fix grid size initialization ; fixes #4055 2020-05-27 19:25:47 +02:00
0penBrain
8bfc0221b3 Extend sketch grid boundaries by 1/2 step so it displays without border 2020-03-19 12:37:34 -03:00
vocx-fc
8589f7ec6e Part: new icon for Part::Part2DObject, in SVG, instead of using a generic XPM 2019-10-05 17:24:57 +02:00
luz.paz
039d6eac01 Fix typos in various src/Mod directories 2019-08-17 15:32:49 +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
Zheng, Lei
c8891be856 Gui: add coinRemoveAllChildren to work around Coin3D bug
See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff

Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.

All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
2019-08-17 14:52:11 +02:00
wmayer
51811e4bf4 PVS: V688 A local variable possesses the same name as one of the class members, which can result in a confusion 2019-03-13 11:58:43 +01:00
wmayer
c582b069ba fix compiler warnings with py3 and msvc 2018-04-16 18:24:53 +02:00
wmayer
7e1334b1f9 fix Debian bug #825861 2018-03-14 18:05:24 +01:00
luzpaz
e883cbfdf3 Part: typos 2017-12-25 11:03:11 +01:00
wmayer
93aa859944 fixes #0002745: The Disappearing Grid 2017-12-02 17:17:43 +01:00
wmayer
32176dba86 fix possible freeze when creating sketch grid 2017-05-11 23:34:01 +02:00
Kunda
99c99006b8 source typo fixes pt4 (only on py3 merged code) 2017-03-02 13:47:21 +01:00
AjinkyaDahale
2ecacef35e Sketcher: fix issue #0002788 2017-02-27 10:34:16 +01:00
wmayer
fde9bded28 fix bottleneck in creation of sketcher grid 2016-11-27 14:36:08 +01:00
wmayer
e54e9515fc rename 2d tool classes to be consistent with 3d classes 2016-11-21 14:29:51 +01:00
wmayer
d0e52d3578 + prepare ViewProvider2DObject to read in GridSize from old projects 2016-03-11 23:06:47 +01:00
wmayer
a1eef54451 + do not allow to set negative grid size in property editor 2016-03-01 18:24:39 +01:00
wmayer
2b2358e70b + fix warnings with Win32 build 2015-12-01 00:51:57 +01:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
ced08b0416 + fix memory leak 2014-08-02 18:26:23 +02:00
wmayer
c212e75fcc + allow to always run macros, fix disappearing grid in sketcher 2014-05-13 16:20:51 +02:00
wmayer
7bc6e74115 + ignore v/h axes and grid of sketcher on view fit 2014-03-15 16:08:24 +01:00
wmayer
06239e9a57 + fixes #0001049: Sketcher preferences in preferences editor 2014-03-14 19:39:11 +01:00