Commit Graph

78 Commits

Author SHA1 Message Date
Markus Reitböck
68114945fa Part: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-24 20:08:56 +02:00
drwho495
a48cc162cb Part: Fix toponaming issues. (#23151)
* fix split apart and splice

* fix hasher gen issue in extrusion

* fix broken gen in fillet/chamfer

* error when elements go missing in fillet/chamfer

* fix hashing in some elements

* fix compiler errors

* fix sweep

* remove hasher from mirror

* remove old import

* add clarifying comment

* Linter cleanup

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-08-18 01:35:46 +00:00
FEA-eng
393edbcb3e Part: Enable solid creation by default for Loft and Sweep (#22098)
* Part: Update PartFeatures.cpp

* Part: Update DlgRevolution.ui

* Part: Update TaskLoft.ui

* Part: Update TaskSweep.ui

* Part: Update PartFeatures.cpp

* Update src/Mod/Part/Gui/DlgRevolution.ui

---------

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2025-07-07 17:46:19 +02:00
Chris Hennes
f0b53af32f Part: Remove remnants of code from TNP merge 2025-06-20 22:41:24 +02:00
theo-vt
1a0a68ae69 PartDesign: Fix hole centered on point edge case (#21257)
* Light refactor of getTopoShape function

* Fix hole edge case

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Refactor simplifyCompound()

* Use Base::Flags<GetShapeOption>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Shorten enum name and move it from class scope to namespace scope

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-05-29 22:37:54 +02:00
bgbsww
99cdc19b50 Match Ruled Surface behavior to prior versions 2024-09-20 08:09:11 -05:00
bgbsww
e4a509cc77 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
5c2bd8b57e Update to Toposhape versions and fix shapebinder references with test (#16036)
* Update to Toposhape versions and fix shapebinder references with test

* Update src/Mod/PartDesign/PartDesignTests/TestShapeBinder.py

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-08-26 10:50:18 -05:00
bgbsww
459644be31 TopoShape/Part: Bug fixes; pass Hasher parms, OCCT 7.8 compatibility, ElementMaps correct item count 2024-04-14 13:56:07 -04:00
bgbsww
43d55a6ed2 Toponaming/Part: Clean and test PartFeatures 2024-02-18 12:57:49 -05:00
Zheng, Lei
36d0291f9c Toponaming/Part: move in PartFeatures 2024-02-17 19:41:43 -05:00
bgbsww
98269a5a21 TopoNaming/Part: cleanups and tests 2024-02-15 19:07:19 -05:00
Zheng, Lei
edc3857bdb TopoNaming/Part: transfer in MakERuledSurface 2024-02-15 19:05:55 -05:00
bgbsww
a5039ad697 Default freenet to true for sweep to fix rendering bug 2023-12-01 14:02:49 +01:00
DeflateAwning
1e3179e9bc Find and replace http://freecad.org to https://freecad.org
Find and replace:
http:\/\/(.{0,10})freecad
https://$1freecad
Done in all remaining files (after doing it in SVGs in the last commit)
2023-10-29 22:39:22 -06:00
wmayer
7cb51a4980 Part: modernize C++: use range-based for loop 2023-08-16 21:56:32 -05:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Uwe
6edcbcd367 [Part/PD] few clang formatting fixes 2022-09-18 13:33:41 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Uwe
4dced53a00 [Part] Pa* to Pre*: remove unneeded includes
- also sort includes
2022-07-03 20:47:03 +02:00
Zheng, Lei
eb79bb0a51 Part: fix ruled surface transformation problem 2022-05-27 03:52:17 +02:00
mwganson
4f300abf32 Part: Link support -- replace TopoShape.getSubShape() with Part::Feature::getTopoShape(obj, elementname, true).getShape() in order to support use of App::Link sublinks. 2022-05-27 03:52:17 +02:00
mwganson
00f6f2db17 Part: ruled surface, address issue with link support where link was transformed 2022-04-16 02:57:07 +02:00
mwganson
7f7e33edc3 Part: reversed -- fix so it works with App::Links and App::Parts 2022-04-16 02:55:29 +02:00
mwganson
929c89f700 Part:Improve support for Links 2022-04-08 17:42:42 +02:00
Chris Hennes
2ecc125497 Part: PR6497 move return statement to new line 2022-03-29 12:37:00 -05:00
wmayer
6d2d45ceb7 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
jack9603301
9a36d01fcc [Part] Fix null pointer error in sweep operation
When the spine line of the sweep operation of the part workbench depends
on the Sketcher document, if the dependent spine line drawn by this document
is deleted afterwards, the path variable will get a null pointer.
Due to programming errors, the standard judgment of this pointer is ignored, resulting in a crash.
Call IsNull() of the OCC document to determine the legitimacy of the shape.
If it is empty, an error is reported.

Fixes #0004764
2021-10-14 03:54:44 +08:00
wmayer
a7f9c2f1b9 OCCT: port FreeCAD sources to version 7.6
SMESH is not yet ported
Although FreeCAD code compiles with OCCT 7.6 it doesn't work at the moment
2021-10-09 13:49:02 +02:00
wmayer
fa86b0216e Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
wmayer
4fc5655657 Part: [skip ci] fix regression in ruled surface feature by applying placement of source object twice
See: https://forum.freecadweb.org/viewtopic.php?p=411934
2020-06-27 23:17:32 +02:00
wmayer
b6ccc9d7ac fixes #0004316: PartWB, "Reverse shapes" command reset position [skip ci] 2020-05-15 19:25:43 +02:00
wmayer
e9662984e7 Part: make reverse function parametric 2020-01-29 16:43:35 +01:00
Zheng, Lei
f028ba42ff 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
wmayer
1b0d03e4ab Parametric refinement feature 2019-07-08 14:37:00 +02:00
wmayer
91f8ccf7c8 fixes 0003846: unexpected result in building RuledSurface 2019-02-19 15:53:39 +01:00
wmayer
498040e9ee Part sweep now accepts compounds of edges that build a wire 2018-08-26 17:02:01 +02:00
wmayer
908e680a3e Part loft now accepts compounds of edges that build a wire 2018-08-26 16:49:48 +02:00
wmayer
eb87a20f8b use constraint to limit minimum and maximum degree 2017-09-18 12:07:00 +02:00
tomate44
f335d1f10d add MaxDegree setting to Part.Loft 2017-09-18 12:07:00 +02:00
wmayer
9a682a9c53 make ruled surface working when both curves references the same part and a placement is set 2017-09-09 15:59:38 +02:00
wmayer
86c31dbcb3 extend ruled surface feature to combine edge with wire as input shapes 2017-09-09 14:20:07 +02:00
wmayer
0d617f97d6 Port to occ7.2:
+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
2017-09-01 16:27:46 +02:00
Eivind Kvedalen
60b90ec8a3 Part::Thickness: This fixes issue #2876 by changing property type for value to include a unit. 2017-07-23 22:14:05 +02:00
Peter Lama
fa4bebf2e0 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
DeepSOIC
53e7a15df1 Part: Offset feature: split off into separate file
withdrew code from PartFeatures.h/.cpp and created FeatureOffset.h/.cpp
2016-09-02 16:26:02 +02:00
wmayer
4c9b486954 fix crash when saving a document after aborting a pending transaction 2016-08-31 17:58:55 +02:00
Wolfgang E. Sanyer
d1d2f1f811 This commit adds getShape and setShape to TopoShape 2016-08-06 23:42:55 +02:00
wmayer
01c4212502 + revert regression in commit 92bf46cc affecting Part Thickness tool 2016-06-01 09:13:16 +02:00
wmayer
cb73d010bb + port to OCC 7.0 2016-05-14 16:53:27 +02:00