Commit Graph

64 Commits

Author SHA1 Message Date
wmayer
09a05a9cd0 Part: Circle variable name change to create consistency
Change variable names of the Circle from Angle0 to Angle1 to create consistency with all other named angle variables
2022-02-11 18:28:58 +01:00
Sebastian
2158eebc88 Ellipse variable name change to create consistency
Change variable names of the Ellipse from Angle0 to Angle1 to create consistency with all other named angle variables
2022-02-11 17:22:45 +01:00
carlopav
263f2e91da Part: Auto-add primitives to active Part
Modified DlgPrimitives.cpp to allow auto adding the newly created object to active Std_Part.
Works with: box, cylinder, sphere, cone, torus, tube, primitives.
2021-11-23 21:44:53 +01:00
wmayer
a76fb2c6d6 Part: properly handle small quantities in part primitive dialog 2021-04-20 17:11:38 +02:00
donovaly
c0e6debcfa [Part] add direction to cylinder primitive
We already have the possibility to create skewed prisms. I recently stumbled upon that I would need this feature for cylinders too.

This PR takes the existing prism extrude direction feature and use it for cylinders too
2021-04-05 13:59:03 +02:00
wmayer
7405dd0ef9 PD: [skip ci] fixes #0004573: missing bindings to expressions in primitives location dialog 2021-02-20 20:04:37 +01:00
donovaly
dd4874d2b6 [Part] add missing bindings
For FC 0.19 we added bindings to the PD primitives but we forgot the Part primitives
2021-02-20 20:02:09 +01:00
David Osterberg
dac937ae35 Part: Allow helix primitive with negative Angle 2021-02-14 11:53:34 +01:00
wmayer
d7ad20acdd Part: [skip ci] code-refactoring in DlgPrimitives class 2021-02-12 12:41:45 +01:00
wmayer
bb7e64786a Part: [skip ci] include generated ui files from within source file 2020-11-15 13:17:52 +01:00
donovaly
9f6c14998d [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
f9420c9877 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
f0af88ecae [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
wmayer
7251a90f6a Part: [skip ci] implement live preview for primitives 2020-11-08 15:40:59 +01:00
wmayer
035803e47d Part: [skip ci] properly handle transactions when editing primitives 2020-11-08 10:43:04 +01:00
wmayer
dabf65cc72 Part: [skip ci] implement live preview for box and cylinder 2020-11-08 10:26:07 +01:00
donovaly
0b9c425678 [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
f23187cd0e Part: allow to edit primitives via dialog 2020-11-06 23:12:40 +01:00
wmayer
80626d3a1f [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
5170a1564e Part: [skip ci] fix build failure due to missing class declarations 2020-11-06 13:46:38 +01:00
donovaly
6d83162783 [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
donovaly
5abb45f7cf [PD] fix wording for skew prisms
the UI and the property is not consistent. In the dialog we use the term angle upon user feedback while the property still has the name "skew" in it.
I simply forgot this change in my PR that implemented skew prisms.

This is now corrected by this PR.
2020-09-15 22:13:26 +02:00
donovaly
d4519d5aec [PD and Part] add possibility to create skew prisms 2020-09-12 13:28:00 +02:00
wmayer
e02695b91f Replace Base::Exception with appropriate subclass 2018-11-14 19:45:20 +01:00
wmayer
c582b069ba fix compiler warnings with py3 and msvc 2018-04-16 18:24:53 +02:00
Peter Lama
a75a98ef27 Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
wmayer
1ce73dda96 fix -Wextra in Part 2016-09-22 11:49:28 +02:00
wmayer
f44df3cdf0 do not use doCommand without using format string, add overloaded method of runCommand 2016-09-15 18:53:37 +02:00
wmayer
e8b36592c0 fix Coverity issues 2016-08-21 18:46:40 +02:00
wmayer
bca7a1866e + port to OCC 7.0 2016-05-14 16:53:27 +02:00
wmayer
5574419293 + set range for quantity boxes 2016-02-29 12:29:02 +01:00
wmayer
a59b915132 + code clean-up 2016-02-28 19:01:23 +01:00
wmayer
32a5340b0b + use application-wide number of decimals in primitive creation dialog 2016-02-28 12:30:42 +01:00
Mateusz Skowroński
cd2db00f22 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
d5c074f80d QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:06:48 +01:00
wmayer
3d03e208d9 + fixes #0001829: DlgPrimitives replaces non ASCII charaters in objects Labels by ? 2014-11-17 20:36:22 +01:00
wmayer
267ca0813a + fixes #0001798: Support general ellipsoid with three radii 2014-10-30 18:02:18 +01:00
wmayer
a96f390097 + fix build problems with Python & MacOSX 2014-10-13 22:02:57 +02:00
wmayer
406d32aebb + Replace InputField with QuantitySpinBox 2014-07-31 15:14:27 +02:00
wmayer
a871364066 + replace degree symbol with 'deg' to make sure it works on all systems, force to use right codec to display floating numbers 2014-05-19 20:56:23 +02:00
WandererFan
5d2c285785 Add UNITS to Part Primitive Gui 2014-05-19 20:34:10 +02:00
wmayer
3b5cdda879 + fix flaws found with code analyzer tool 2014-05-07 13:09:44 +02:00
wmayer
fb994e204c + fixes #0000854: Ability to change number of digits to the right of decimal place in spinboxes 2014-02-16 18:02:09 +01:00
wmayer
2f330674fe + Use icons and translated names for Part primitives 2013-12-09 11:11:51 +01:00
jmaustpc
41adfdaf87 fix property names for Part RegularPolygon and Prism
Prism properties: - Polygon, Circumradius and Height
RegularPolygon  : - Polygon and Circumradius

DraftTools updated to reflect the change in property names
2013-11-18 11:08:29 +11:00
jmaustpc
ec4f2be7b1 rebase auto merge error fixes
Signed-off-by: jmaustpc <jmaustpc@users.sourceforge.net>
2013-11-14 13:30:25 -02:00
jmaustpc
06567358db Add Part_RegularPolygon,
regular polygon edge in Part workbench "create primitives",

Add icons Part_Polygon and Part_Spline
2013-11-14 13:30:25 -02:00
wmayer
d5757b7089 + fixes #0001247 2013-11-07 14:17:41 +01:00
wmayer
712bc170c2 0001290: Add spiral tool in Part Module 2013-10-30 14:48:42 +01:00
jriegel
66ee73f54b Further doubel suggestions from Jan
Moved Gui/InputVector,Placement,Transform from float to double
Moved Sketcher from float to double
more suggestions for moving float -> double
2013-09-24 11:01:01 +02:00