Commit Graph

1838 Commits

Author SHA1 Message Date
wmayer
0e5cbf5298 Py2/Qt4: fix build failures and warnings 2020-11-30 19:05:37 +01:00
wmayer
218fe1ecd5 Part: [skip ci] add GeomAdaptor.hxx to PCH 2020-11-29 00:12:59 +01:00
wmayer
c9f03804ed Part: [skip ci] fixes #0004169: DatumPoint at the intersection of a DatumPlane and DatumPoint not working correctly 2020-11-27 19:10:22 +01:00
wmayer
46882fc6e5 Part/Sketcher: [skip ci] fix build failures with gcc 10 on Fedora
When using gcc 10 and PyCXX 7.1.4 on Fedora there is an error because the conversion from size_t to Py_ssize_t is ambiguous
See https://forum.freecadweb.org/viewtopic.php?f=4&t=52502

The class Py::Tuple is also incorrectly used here and causes a memory leak
2020-11-25 16:56:03 +01:00
wmayer
ef0368a5ec Gui: [skip ci] add method to Python binding of ViewProviderExtension to ignore overlay icon 2020-11-22 11:20:54 +01:00
wmayer
86f3f55aa5 Gui: [skip ci] add method to ignore to merge icon of an extension that is e.g. used for Part primitives 2020-11-21 16:49:08 +01:00
wmayer
55e3aad3c7 Part: allow to open attachment editor via context-menu 2020-11-15 19:16:22 +01:00
wmayer
178ee5b94e Part: move ViewProviderPrimitive to its own source files 2020-11-15 18:44:27 +01:00
wmayer
e6e7995b9c Part: [skip ci] include needed headers into PCH file 2020-11-15 13:30:32 +01:00
tomate44
ae6c2b7d30 fixes and typos 2020-11-15 13:20:41 +01:00
tomate44
3c93dba15a Part: add BezierCurve constrained interpolation 2020-11-15 13:20:41 +01:00
wmayer
d8a36bc1b2 Part: [skip ci] include generated ui files from within source file 2020-11-15 13:17:52 +01:00
donovaly
bfa2ac9d31 [Part] show location dialog when creating a Primitive
- there is no reason to hide it and even a bit tiring to open it manually since most no new primitives should be at the origin
- give the combobox to select the primitive type a reasonable name, this helps to understand the code better
2020-11-15 12:56:16 +01:00
wmayer
64152be6f3 Part: [skip ci] rearrange line page to save some vertical space 2020-11-13 15:35:07 +01:00
donovaly
6498795b50 [Part] remove unnecessary vertical whitespace in dialogs
on smaller screens it is very annoying that the Part dialogs have too much vertical whitespace.

This PR gets rid of some unnecessary whitespace.
2020-11-13 13:52:31 +01:00
donovaly
38d5e99a78 [Part] improve tube dialog
- remove vertical whitespace
2020-11-13 12:37:57 +01:00
wmayer
ce0c9d8f59 Part: [skip ci] show dialog directly when creating a tube feature 2020-11-13 12:33:59 +01:00
wmayer
62ed3dcaf9 Part: [skip ci] implement editor dialog for tube feature 2020-11-12 16:45:38 +01:00
wmayer
9b88bdcc9b Part: [skip ci] make sure to open a transaction when starting edit mode of primitives via context-menu 2020-11-12 16:35:58 +01:00
wmayer
a8aeb0ce78 Part: [skip ci] split classes of Shapes.py file into files for feature, view provider and command classes 2020-11-12 12:17:47 +01:00
wmayer
56c608932f Win: [skip ci] check if NOMINMAX is already defined before setting it 2020-11-11 13:34:42 +01:00
wmayer
ed5fbb876b Part: [skip ci] simplifications in primitives location dialog
- do not use a QSignalMapper if the slot doesn't take care of the emitting widget
- to set the placement only check for the base class GeoFeature, i.e. no need to step through all primitive types
- fix compiler warning of unused variable
2020-11-10 20:20:33 +01:00
donovaly
f7bb206d63 [Part] add preview for changes to primitives location
- unset keyboardTracking for the dialog edits
- don't hide the location dialog on creation
2020-11-10 20:03:08 +01:00
Yorik van Havre
ae2c707892 Merged crowdin translations 2020-11-10 14:58:06 +01:00
wmayer
4a5698375b Part: [skip ci] correctly show control points of a B-spline/Bezier curve/surface if a placement is set 2020-11-09 13:14:31 +01:00
wmayer
c0578d2b55 Part: [skip ci] fix type of Rotations property of Spiral primitive 2020-11-09 09:31:16 +01:00
wmayer
7d72ea1c1a Part: [skip ci] implement live preview for primitives 2020-11-08 15:40:59 +01:00
wmayer
ac0e4011cc Part: override extensionSetupContextMenu in ViewProviderSplineExtension 2020-11-08 13:37:17 +01:00
wmayer
b9e373b9b2 Part: make view provider for helix and spiral inherit from primitive and use spline extension 2020-11-08 12:19:57 +01:00
wmayer
e5c63bc3d0 Part: [skip ci] implement extension ViewProviderSplineExtension 2020-11-08 12:18:44 +01:00
wmayer
f49ae11976 Part: [skip ci] properly handle transactions when editing primitives 2020-11-08 10:43:04 +01:00
wmayer
dbd14fe2b9 Part: [skip ci] implement live preview for box and cylinder 2020-11-08 10:26:07 +01:00
donovaly
7460cd5ebc [part] remove a now misleading comment
I added this comment when I read the dialog state fro the index of the type combobox, now we read the primitive's TypeID so the comment is misleading
2020-11-08 06:43:16 +01:00
wmayer
f644846dcc Part: [skip ci] add missing export macro 2020-11-07 10:17:34 +01:00
wmayer
266ca1ad28 Part: allow to edit primitives via dialog 2020-11-06 23:12:40 +01:00
wmayer
677ce69873 [Part] allow to edit helices via a dialog
+ add class ViewProviderPrimitive to avoid to re-implement setEdit/unsetEdit methods for each sub-class separately
+ avoid using global variables
+ when editing a feature directly pass it to the dialogs
+ when editing a feature then do not use active document as this could point to the wrong object
+ fix undo/redo message
+ re-add '3D View' button to location dialog
2020-11-06 19:59:14 +01:00
wmayer
ca5d4d5f72 Part: [skip ci] fix build failure due to missing class declarations 2020-11-06 13:46:38 +01:00
donovaly
18c1364d1d [Part] allow to edit helices via a dialog
fixes https://tracker.freecadweb.org/view.php?id=3857

Currently primitives of the Part WB can only be created suing a dialog. Editing is not possible that way.

This PR makes the first step in achieving this:

- Helices can now be edited using the same dialog ans when created

- New location dialog. The Gui::LocationWidget used there is not aware of the rotation angle and it treats the rotation axis as direction. To fix this, I set changed the dialog so that one can define every parameter as in the PartDesign attacher dialog (Placement, rotation axis and rotation angle separately). Another reason for this change was that one could not use the location dialog, fill it with the placement properties of the object, and close the dialog without any change. Because of the missing angle info the objects was then always rotated despite nothing was changed.

If this PR goes in, I will extend it for the other primitives.

Todo for the future: allow a preview of the changes made in the dialog. (I could not find out how this is done.)
2020-11-06 13:27:03 +01:00
wmayer
f384202b93 Part: [skip ci] make arguments const references 2020-11-03 13:12:23 +01:00
Abdullah Tahiri
88e542b345 Part: Geometry extensions constness correction 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
5c492f727c Part: Geometry - refactor py functions into class for code reuse 2020-11-03 12:01:22 +01:00
wmayer
eefa7dd798 Part: [skip ci] After removing a knot check if the B-spline is still valid 2020-10-30 13:55:31 +01:00
wmayer
e425a6bfe5 Part: [skip ci] handle OCCT exception in GeomBSplineCurve::copy() 2020-10-30 10:54:25 +01:00
Yorik van Havre
43596a68af Merged crowdin translations 2020-10-28 12:04:37 +01:00
Yorik van Havre
57fbb63b8d Updated ts files 2020-10-28 10:46:51 +01:00
Abdullah Tahiri
00a1aa6225 Part: Geometry - encapsulate construction access 2020-10-25 03:52:51 +01:00
wmayer
4fbc693014 Part: [skip ci] add method to approximate a B-spline curve with a given max. degree 2020-10-23 00:06:31 +02:00
vocx-fc
ae33d9eb91 Part: update the Part_Thickness icon
This is the same as the `PartDesign_Thickness` but without
the red highlights in order to match the rest of the Part icons.
2020-10-22 15:12:59 +02: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
30455b5861 Part: [skip ci] use the correct icon for helix and sprial view providers 2020-10-22 12:43:39 +02:00