Commit Graph

1114 Commits

Author SHA1 Message Date
Ladislav Michl
78349baec0 PartDesign: Microoptimize updateSpacings()
This also fixes "comparison of integer expressions of different
signedness: ‘int’ and ‘size_t’" warning.

Fixes: 5d2037c820 ("PartDesign: Transform rework")
2025-09-27 11:40:07 -05:00
marioalexis
1c1a989a63 PartDesign: Use AllowCompound user parameter along the workbench - fixes #23596 2025-09-26 19:50:21 -05:00
Markus Reitböck
88c6f176bb PartDesign: 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-23 22:39:36 +02:00
Markus Reitböck
c003f7915b fix duplicate include guards in precompiled headers 2025-09-23 00:51:00 +02:00
Alfredo Monclus
40f12db928 PD: hole prefer finding closest diameter if pitch is 0 2025-09-22 11:10:54 -05:00
Alfredo Monclus
25ce768dcd PD: fix hole thread depth being reset when changing to through all
the property is correctly updated by the updateThreadDepthParam below
2025-09-22 11:09:27 -05:00
theo-vt
15bd51259a PartDesign: Hole: Print error when no axis was found (#23659)
* PartDesign: Hole: Print error when no axis was found

* Remove unrelated string update
2025-09-22 10:47:20 -05:00
Markus Reitböck
496b31b087 do not use precompiled header for setting global compiler definitions and to disable compiler warnings
only 4 of these warnings are still relevant, CMake shall be used to disable them

Compiler definitions:

  NOMINMAX:
    * is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake

  WIN32_LEAN_AND_MEAN:
    * use CMake target_compile_options on relevant targets

Warnings that still occur:

  C4251, C4273, C4275: all related to dllimport / export
    * use CMake target_compile_options on relevant targets

  C4661: no suitable definition provied for explicit template instantiation request
    * triggered in Mesh because of Vector3D in Base - not all functions are defined in header
    * use CMake target_compile_options on relevant targets

Warnings that are Currently not triggered (fix code if they appear again):

  C4005: macro redefinition

  C4244: argument conversion, possible loss of data

  C4267: conversion from size_t to type, possible loss of data

  C4305: truncation from type1 to type2
    * only occurrence disabled in Reader.cpp

  C4522: multiple assignment operator specified

  C5208: unnamed class in typedef name

Obsolete Compiler warnings:

  C4181: not mentioned in Microsoft docs anymore

  C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
    * throw(optional_type_list)  deprecated in C++17

  C4482: nonstandard extension used: enum 'enumeration' used in qualified name
    * not generated for compilers that support C++11

  C4503: 'identifier': decorated name length exceeded, name was truncated
    * obsolete since Visual Studio 2017

  C4786: not mentioned in Microsoft docs anymore
2025-09-11 20:21:04 -05:00
Chris Hennes
ff349c81d6 Merge pull request #23746 from 3x380V/cmake
CMake: Use scoped include and library directories
2025-09-10 21:54:51 -05:00
PaddleStroke
23a3ed8433 PartDesign: Extrude: Fix twoLength/uptoshape broken (#23812)
* PartDesign: Extrude: Fix twoLength/uptoshape broken

* Update FeaturePocket.cpp

* Update FeatureExtrude.cpp

* fix test
2025-09-10 19:12:02 +02:00
wmayer
10bc43a842 CMake: Replace link_directories with target_link_directories 2025-09-08 19:04:38 +02:00
wmayer
ac51455a0a CMake: Replace include_directories with target_include_directories 2025-09-08 19:04:34 +02:00
PaddleStroke
d22b44cc70 PartDesign: FeatureLinearPattern fix Axis-Y not working (#23637)
* PartDesign: FeatureLinearPattern prevent error message

* To squash
2025-09-08 18:26:30 +02:00
FEA-eng
a3f49489b8 PartDesign: Correct typo in multiple solids error (#23642)
* PartDesign: Update FeatureFillet.cpp

* PartDesign: Update FeaturePipe.cpp

* PartDesign: Update FeatureLoft.cpp

* PartDesign: Update FeatureExtrude.cpp

* PartDesign: Update FeatureGroove.cpp

* PartDesign: Update FeatureBoolean.cpp

* PartDesign: Update FeatureChamfer.cpp

* PartDesign: Update FeatureHole.cpp

* PartDesign: Update FeatureDraft.cpp

* PartDesign: Update FeatureRevolution.cpp

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor
2025-09-04 14:36:15 +00:00
PaddleStroke
f7fe6cd697 PartDesign: Polar pattern: Spacings off by one. 2025-09-04 13:56:06 +02:00
drwho495
bc72b6e85d PartDesign: Fix revolution's Toponaming support (#23342)
* PartDesign: Fix revolution's Toponming support

* fix test
2025-09-01 10:56:43 -05:00
Kacper Donat
1c54b97d7f PartDesign: Implement preview for Booleans 2025-08-31 21:12:07 +02:00
luzpaz
7a1b55ddfb PartDesign: remove trailing whitespace
Removed from src/Mod/PartDesign/App/FeatureExtrude.cpp
2025-08-30 21:53:58 -05:00
captain0xff
66c458f9dc PartDesign: add interactive gizmos 2025-08-30 17:02:52 +02:00
wwmayer
a161932408 PD: Fix creation of pad from base feature
In versions prior to 1.0 there was never the requirement that the shape of a FeatureBase must contain a solid. This has changed with ea0a7b0679 for no obvious reason. This requirement should be dropped again.

In versions prior to 1.0 the method Feature::getBaseShape() was used within the Pad feature to check if the base feature has a solid. This method throws an exception if the shape doesn't have a solid.
Since version 1.0 the new method Feature::getBaseTopoShape() is used. As parameter a boolean is passed to either throw an exception or silently return a null shape. The implementation of this function is inconsistent:
If the parameter is false it throws an exception if the base feature's shape has no solid but if the parameter is true it doesn't check if the shape has a solid and returns it as is.

This leads to incorrect behaviour in the calling instance where the shape of the base feature is tried to be fused with the padded shape. This operation will fail if the shape of the base feature has no solid.

This fixes https://github.com/FreeCAD/FreeCAD/issues/23348
2025-08-29 16:28:38 +02:00
PaddleStroke
af802ff04f PartDesign: Fix symmetric regression & LengthAlongSketchNormal (#23418)
* PartDesign: Fix symmetric regression

* to squash

* Fix LengthAlongSketchNormal not working

* to squash

* Fix checkbox not initially visible
2025-08-29 10:03:16 +02:00
Max Wilfinger
3b215da227 Update UI strings from Crowdin reports for consistency 2025-08-28 11:45:38 -05:00
Kacper Donat
5719bb8bf8 Merge pull request #22389 from PaddleStroke/pd_transform
PartDesign: Transform tools
2025-08-27 15:22:26 +02:00
FEA-eng
513208f328 PartDesign: Update missed error message about multiple solids (#23392)
* PartDesign: Update FeatureLoft.cpp

* PartDesign: Update FeatureExtrude.cpp

* PartDesign: Update FeaturePipe.cpp

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor
2025-08-27 09:37:53 +00:00
paddle
0ddb804ab1 PartDesign: Patterns: Tooltips. 2025-08-26 09:13:17 +02:00
PaddleStroke
c1ccf75918 PartDesign: Transform rework 2025-08-26 08:46:51 +02:00
PaddleStroke
679a072a4a PartDesign: Extrude 2 sides (#21794)
* PartDesign: extrude 2 sides

* Part: OpCodes XOR

* PartDesign: Remove deprecated generatePrism functions

* PartDesign: Extrude : Update Sides combobox strings

* Change "Sides" to "Mode"

* Use OpCodes::Extrude instead of Prism.
2025-08-25 17:17:23 +00:00
paddle
274ae4ba2b PartDesign: Remove unnecessary warning. 2025-08-25 18:39:06 +02:00
paddle
a875eb4081 PartDesign: Rename Transformed::Mode enum 2025-08-25 18:38:34 +02:00
Max Wilfinger
3129bc9a1e Fix UI strings reported on Crowdin (#23297)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-08-25 06:10:53 +00:00
Max Wilfinger
ab5e9e0ded Fix source string mistakes reported on Crowdin (#23157)
* Fix source string mistakes reported on Crowdin

* Update src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/draftfunctions/upgrade.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/draftfunctions/upgrade.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/draftguitools/gui_downgrade.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/Resources/ui/TaskPanel_SetStyle.ui

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-08-24 20:51:32 -05:00
Kacper Donat
61c1645d76 PartDesign: Do not copy visuals from ShapeBinder 2025-08-23 16:38:53 -05:00
FEA-eng
1ffd333edd PartDesign: Fix small typo in multiple solids error (#23299)
* PartDesign: Update FeatureChamfer.cpp

* Update src/Mod/PartDesign/App/FeatureChamfer.cpp

---------

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2025-08-22 20:47:04 +00:00
FEA-eng
80c110764c PartDesign: Update error message about multiple solids (#23286) 2025-08-22 18:29:50 +00:00
marioalexis
94d20bbc95 PartDesign: Remove use of user parameters from Body constructor 2025-08-20 15:08:47 +02:00
Max Wilfinger
abb7007596 PartDesign: Enable compounds for PD bodies 2025-08-18 01:09:07 +02:00
Benjamin Nauck
8e774e4309 PartDesign: Use sketch as neutral plane for Draft (continuation of 20135) (#21901)
* Enabled Draft to accept sketch as neutral plane

* Resolving the last review

* Fix: tested the Feature with test file

* Fix: error with sketch pointer

* PartDesign: Simplify selection implementation

---------

Co-authored-by: Ziad <ziad.ashraf.cs@gmail.com>
2025-08-17 14:55:53 -05:00
theo-vt
270776c92f PartDesign: Hole: fallback to getProfileNormal when a non-cylindrical surface is used 2025-08-15 10:09:23 -05:00
Kacper Donat
b73bb45ae1 PartDesign: Implement preview for Draft 2025-08-12 11:34:26 -05:00
Kacper Donat
f539a38389 PartDesign: Add preview TaskBox to all feature task dialogs 2025-08-07 00:37:46 +02:00
Kacper Donat
ca2b1cdf84 PartDesign: Add support for preview for transforms 2025-08-07 00:37:23 +02:00
Kacper Donat
c4b741f488 PartDesign: Add transparent previews 2025-08-07 00:37:21 +02:00
Max Wilfinger
be0c0e7a74 PartDesign: Update UI strings for consistency and correct for new fuctions and typos
Closes: #22128
2025-08-04 20:15:04 +02:00
Florian Foinant-Willig
9091048627 Try to auto-fix any invalid generated helix 2025-08-04 17:52:06 +02:00
Ladislav Michl
a3e43d97f6 PD: Fix loft between curved faces
Fixes issue 19183 also reported in the forum:
https://forum.freecad.org/viewtopic.php?p=806495
https://forum.freecad.org/viewtopic.php?t=88234

The actual reason for the failure is that the new code uses
FaceMakerBullseye method which expects coplanar wires.
The code was using FaceMakerCheese previously which changed
in LinkStage with their commit 93ce3edfe7ff
("PD: use FaceMakerBullseye for feature Loft")
and was imported here with TNP mitigations.

As changing it back would cause different regressions, lets
try different facemakers until one succeeds.

Fixes: 301194a69682 ("Toponaming/Part: Fix all getBaseTopoShape calls...")
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
Co-authored-by: Werner Mayer <wmayer@freecad.org>
2025-08-03 19:14:09 +02:00
theo-vt
d699d38537 PartDesign: Hole: get direction from cylindrical surface rather than normal (#22393)
* PartDesign: Hole: Find direction of cylindrical face in Hole::execute instead of FeatureSketchBased::getProfileNormal

* PartDesign: Minor cleanups in guessNormalDirection

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-07-28 02:06:50 +00:00
Pieter Hijma
f5c315d05a PartDesign: Add migration tag 2025-07-22 09:03:27 +02:00
wmayer
06eeea8cb2 PD: Fix crash in Loft::getSectionShape
The passed DocumentObject pointer can be null which is nowhere checked.
This fixes issue 19545

Fixes: 256ad7a01a ("PartDesign: Loft Intelligence - Select the whole sketch if the selected shape is ...")
2025-07-18 09:57:29 -05:00
theo-vt
a933c22dad Allow open wires in Part::getProfileNormal 2025-07-14 17:38:51 +02:00
Andrea
6f18b152ed Remove unused deprecated functions
Remove unused deprecated functions
2025-06-30 10:40:10 -05:00