Commit Graph

34 Commits

Author SHA1 Message Date
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Chris Hennes
7f1c43a335 Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Kacper Donat
2f35f1c561 Base: Add fromPercent and toPercent helpers 2025-02-23 22:51:13 +01:00
Kacper Donat
a72a63232a Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
wmayer
ffa3fa5b5a Core: Extend Color API
* Fix issues with alpha value <> transparency
* Use type traits to convert between different color classes (fixes #14515)
2024-11-15 12:25:25 -05:00
wmayer
80a09b3853 Part: Make ViewProviderPart::applyMaterial more robust
* Fixes hard crashes and throw an exception if value is out of range
* Fixes several linter warnings
2024-08-21 18:40:27 +02:00
wmayer
b4c5a6d5ba Fix several regressions:
+ improve PropertyMaterialList::readString
+ fix transparency handling in ViewProviderPartExt
+ do not register the private member '_diffuseColor' as property because it would be exposed to the
  public where it can be modified
+ fix ViewProviderPartExt::finishRestoring() to correctly restore old project files
+ fix ViewProviderPartExt::setHighlightedFaces() to correctly show face colours if VBO is enabled
+ fix ViewProviderBoolean::updateData()
  fix ViewProviderMultiFuse::updateData()
  fix ViewProviderMultiCommon::updateData()
  fix ViewProviderCompound::updateData()
  fix ViewProviderFillet::updateData()
  fix ViewProviderChamfer::updateData()
  that all set invalid transparency values
+ Filter ShapeAppearance in ViewProviderBody::unifyVisualProperty
  because body features usually have different number of faces than the body itself
+ manually fix some bad looking auto-formatted code
+ clean up code and remove duplicated code
2024-06-11 11:58:32 +02:00
David Carter
8b5a3b1124 Material: Appearance Updates 2
Improves the use of the ShapeAppearance property for the Part workbench.

    removes DiffuseColor property
        adds Python compatibility using custom attributes
        transitions DiffuseColor to ShapeAppearance on open
    Improved UI elements for setting object appearance, and appearance per face
    Lays the foundation for future texture support
2024-06-01 19:57:16 -05:00
wmayer
a0d86224f3 Part: modernize C++: use equals default 2023-08-22 15:14:03 +02:00
Uwe
46927fa897 [Part] ViewProvider.cpp: add include needed for Qt 6
- as reported in #8053, QObject has to be included to be able to compile with Qt 6
2022-12-23 01:54:36 +01:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Uwe
f16a0da841 [Part] FaceMaker, Command and Extrusion: remove unused includes 2022-02-21 03:33:01 +01:00
wmayer
8af45a1fe1 Part: move ViewProviderPrimitive to its own source files 2020-11-15 18:44:27 +01:00
wmayer
ba3106af06 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
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
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
Yorik van Havre
d7ed8c4383 Part: Set per-face transparency in boolean ops - fixes #1029,#2806 2017-02-10 21:53:57 -02:00
wmayer
1ce73dda96 fix -Wextra in Part 2016-09-22 11:49:28 +02:00
Alexander Golubev
0ff24fd618 Part/Gui: remove ViewProviderPart::onDelete which handled unnecessary body housekeaping
Also do some headers cleanup
2016-04-12 18:12:19 +02:00
Alexander Golubev
8c5d514b18 PartDesign: Body rework - add BaseFeature property and make Tip always point to solid 2016-04-12 18:12:16 +02:00
jrheinlaender
02dfb8551d Moved some methods from PartDesign::Body to Part::BodyBase so the SketchObjects will be removed cleanly from the Body when deleted 2016-04-12 18:11:49 +02:00
wmayer
27863408c9 + remove references to SoFCSelection where not needed 2015-05-20 19:24:12 +02:00
wmayer
f6c25f94de + code cleanup: remove deprecated class ViewProviderPartBase 2015-05-02 00:37:05 +02:00
Sebastian Hoogen
db13fbb7b3 add angularDeflection property to ViewProvider
issue #1868
2015-03-21 19:27:43 +01:00
wmayer
ca5062cbfe + fixes #0001885: Unhandled exception when trying to enter edit-mode for objects while drawing view is active 2014-12-31 14:08:03 +01:00
wmayer
dd392efeb1 + fixes #0001735: Ellipsoids visibility problems 2014-10-16 19:36:54 +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
jriegel
664c1d4862 Integrate Werners & Jans double branch
Move from float to double
Further suggestions for float -> double move
Moved Tools2D from float to double
More suggestions for float->double move from Gui subdirectory
Changes to FEM constraint visuals for float->double move
Suggested changes for float -> double move
Suggestions for Part module moving float -> double
2013-09-24 11:00:57 +02:00
wmayer
2b0757c3a6 0000735: Feature request for better Fillet/Chamfer 2013-07-07 16:13:38 +02:00
wmayer
746ab2ec78 Add framebuffer support to Inventor viewer 2013-05-02 17:37:56 +02:00
jmaustpc
13601fbcd8 display Parametric Ellipsoid Tree icon
Add the line
sPixmap = "Tree_Part_Ellipsoid_Parametric.svg";
to the Ellipsoid viewprovider
2013-03-15 22:05:06 -03:00
wmayer
dd67c22837 Open transaction when start editing with context-menu 2012-11-28 13:24:46 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00