Commit Graph

63 Commits

Author SHA1 Message Date
tritao
65466d580b Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Benjamin Nauck
7b22027b90 Add template based Document::countObjectsOfType
Also convert code to use this new method
2025-01-14 14:23:46 +01:00
Benjamin Nauck
08c9a191e2 Add template based SelectionSingleton::countObjectsOfType
Also convert code to use this new method
2025-01-13 18:55:15 +01:00
David Carter
495a96a0f5 Material: Material appearance
Uses new material system for appearance

Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.

The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.

A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.
2024-04-04 07:39:58 -05:00
Florian Foinant-Willig
6fb3984322 Surface: modernize type checking 2023-10-23 18:08:22 +02:00
wmayer
4919fa18ff Surface: apply clang format 2023-09-04 07:21:32 -05:00
wmayer
d244dcf2da modernize C++: use nullptr 2023-08-05 11:23:12 -06:00
tomate44
6d1e88db07 Surface: Fix Blend Curve icon name
and remove unused BlendSurface code
2023-05-29 10:53:01 +02:00
Uwe
58d8b36dfd [Surface] Gui:: remove unused includes
- also some sorting
2022-12-08 01:32:38 +01:00
wmayer
65b22c2f51 Surface: [skip ci] fix minor issues found by code checkers 2022-08-24 18:47:48 +02:00
wmayer
eb1f30d327 Surface: several improvements
* fix crash because of incomplete inheritance of BlendPoint and BlendCurve -> do not inherit from BaseClass
  as consequebce make destructor non-virtual and remove getPyObject
* pass std::vector by const reference
* remove unneeded includes
* use more suitable Python exception types
* when returning with null from Python handler then set an exception
* harmonize file guards
* several optimizations or simplifications
* use modern C++
* harmonize command name
* fix copyright note
2022-08-23 16:51:55 +02:00
Matteo-Grellier
c85c8cfb33 [Surface]: Implementation of BlenCurve. 2022-08-23 16:51:16 +02:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Uwe
6b04215be6 [Surface] remove Python.h and Xerces 2022-03-20 22:46:47 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
bitacovir
69547e2800 [UI] Replace SVG icons for Surface WB commands 2021-01-25 16:23:54 -03:00
luz paz
bd8b86b35a Surface: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the Surface Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
d84071275a Surface: Fix header uniformity, whitespace, and doxygen header 2020-11-19 13:41:43 +01:00
vocx-fc
b51c952e4b Surface, MeshPart: update CurveOnMesh command tooltip and task panel
* Add new icon `MeshPart_CurveOnMesh`, which is the same as
the `Surface_CurveOnMesh` icon but in green color.
The surface icon is used in the Surface Workbench, while the MeshPart
version is currently not used.
* Make the tooltip of the command shorter; the longer instructions
are added in the `TaskCurveOnMesh` task panel.
2020-10-19 13:18:12 +02:00
vocx-fc
3304e1b44b Surface: update tooltip of Filling 2020-10-19 13:18:12 +02:00
vocx-fc
8eb466d3e7 Surface, MeshPart: add more information to the CurveOnMesh command
In the Surface Workbench, the command is called `Surface_CurveOnMesh`
and the only thing it does is call the corresponding command
in the MeshPart Workbench, where it is defined
under the name `MeshPart_CurveOnMesh`.

Currently the MeshPart Workbench is not exposed on the graphical user
interface but it is loaded at startup, and its commands
are in fact used from the Mesh Workbench and, in this case,
the Surface Workbench.

Also improve the tooltip of the other commands in the Surface Workbench:
`Cut`, `Filling`, `GeomFillSurface`, `ExtendFace`, and `Sections`.
The `Cut` command does not do anything at this moment
so it is not visible in the interface.
2020-10-13 15:14:12 +02:00
vocx-fc
13a5f74d32 Surface: new icon for existing Surface_CurveOnMesh command
Add this command to the Surface toolbar.
2020-10-13 15:09:12 +02:00
vocx-fc
64e0ac16ae Surface: new Extend icon for existing Surface_ExtendFace command
The icon is added to the `.qrc` resource file.

The command is added to the Surface toolbar.
2020-10-13 14:42:20 +02:00
vocx-fc
7bf6f72259 Surface: new SVG icon for the workbench, rename others
Replace the hard-coded XPM icon in `InitGui.py` for the workbench
with an SVG file, which at this time is identical to the `Surface` icon.
Change `CMakeLists.txt` to properly install this new icon.

Rename all icons, so that all have the `Surface_` prefix.

Use the new icon names in the viewproviders and task panels.
2020-09-30 12:32:36 +02:00
wmayer
a4176fa15f Surface: [skip ci] add icon for sections command 2020-09-28 07:57:00 +02:00
wmayer
3a8a6aae1b Surface: add command to create surface from sections 2020-09-26 16:32:42 +02:00
wmayer
a247b7e6a5 force strict ISO C++ (-Wpedantic)
for Drawing, Image, Inspection, Mesh, MeshPart, Part, Path, Points, Raytracing, ReverseEngineering, Spreadsheet, Start, Surface, Web

TODO: fix several -Woverflow in area
2019-09-18 11:32:42 +02:00
triplus
43b081947f Improved icon themes support 2019-02-13 10:42:46 -02:00
wmayer
c582b069ba fix compiler warnings with py3 and msvc 2018-04-16 18:24:53 +02:00
luz.paz
a86c0fe137 sWhatsThis fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=10&t=26687
2018-01-31 19:07:07 +01:00
wmayer
575dc0b76d fix compiler warning due to unused variable 2018-01-14 16:32:44 +01:00
wmayer
011eed3a64 add feature to extend given surface 2017-12-19 13:23:39 +01:00
wmayer
a76ebbcec9 Initial task panel for filling function 2017-04-22 11:12:13 +02:00
wmayer
0f1c66724b rename task panel class to be conform with the feature class 2017-04-21 19:30:03 +02:00
wmayer
48a6bca7d8 project polyline on mesh and create edge 2017-04-19 23:30:15 +02:00
wmayer
f44c2000e8 fix unused variable warnings 2017-04-17 16:20:44 +02:00
wmayer
884b8202ea rename SurfaceFeature to GeomFillSurface 2017-04-17 16:20:44 +02:00
wmayer
ff34c3eece move handling of Bezier and BSpline surface creation into a common class to increase flexibility 2017-04-17 16:20:44 +02:00
wmayer
f96d374250 improve usability of surface function 2017-04-17 16:20:44 +02:00
wmayer
39f433a410 choose more comprehensive class and file names 2017-04-17 16:20:44 +02:00
wmayer
e29636a88d + fix bugs in edge checking 2017-04-17 16:20:44 +02:00
wmayer
a303b76334 + fix design flaw to reduce side effects 2017-04-17 16:20:44 +02:00
wmayer
d3ac517146 + make surface module compile with v0.17 and occ 7 2017-04-17 16:20:44 +02:00
balazs-bamer
a8adbaa125 Fix: edges of a solid can be used as surface input
Edges of a solid can be used as surface input. The real subName is
passed instead of the constant 'Edge1'
2017-04-17 16:20:44 +02:00
balazs-bamer
307105f1ab Curve validation is done in a common ancestor of App and GUI
Curve validation is done in a common ancestor class of Surface::BSurf
and SurfaceGui::CmdSurfaceBSurf
2017-04-17 16:20:44 +02:00
balazs-bamer
d980889b3a Check for null shape before calling ShapeType
Check for null shape before calling ShapeType
2017-04-17 16:20:44 +02:00
balazs-bamer
0af6fc0894 allow wires as surface input
Now an arbitrary mixture of edges and wires can be used as input.
However, the total count of edges together with the wire members
can only be 2, 3 or 4.

For some reason, wires do not work in Python script:
test1.BoundaryList = [(Draft.upgrade([bs1a, bs2a]), 'Wire1')]
yields an empty BoundaryList
2017-04-17 16:20:44 +02:00
balazs-bamer
724fa4fe4e try to convert non-b-splines into b-splines; further parameter check
Non b-spline curves are converted into b-splines if possible.
This means circles, lines etc are allowed.

Further parameter checks prohibiting surfaces being accepted as input.
2017-04-17 16:20:44 +02:00
balazs-bamer
d3fb21f93b PropertyEnumerator for fill type
Fill type is now of type PropertyEnumerator, allowing enumerated names
in the Data tab. However, it has 2 problems:
1. Invalid shows up
2. The user has the illusion to see the result after changing the value.
However, the result gets updated only
2017-04-17 16:20:44 +02:00
balazs-bamer
7c95f25abf Warning for surfaces with 2 edges only
If the user creates a surface from 2 edges, a warning dialog appears.
Some refactoring in Command.cpp to make it simpler.
2017-04-17 16:20:44 +02:00