Commit Graph

74 Commits

Author SHA1 Message Date
Uwe
849751a771 Revert "[PD] uniform default Pad/Pocket lengths"
This reverts commit ab879eff243c3c5ed7f8c250db32522e5aff329c.

Sorry, this should have gone to a PR
2022-01-23 05:06:38 +01:00
Uwe
de3bc18247 [PD] uniform default Pad/Pocket lengths
- the goal of the recent Pad/Pocket code refactoring was to handle Pad and Pocket the same
  default Pad were 10 long, Pocket only 5 -> uniform this to 10
- the initialization of the length were different than the default set in Command.cpp
- it was annoying that the default 2nd length was 10 and 20 times the default for the 1st length -> uniform and take the same than the 1st length
2022-01-23 04:58:58 +01:00
Uwe
21f6602d5b [PD] Pad/Pocket: sort out common code
- sort out a constraint used by Pad and Pocket
- also unify Length2 parameter naming
2022-01-08 00:45:19 +01:00
Uwe
6c2178d082 [PD] get rid of a CI compiler warning (#5335)
* [PD] get rid of a CI compiler warning

The CI compiler outputs this warning:
FeaturePad.cpp:101:20: warning: variable 'obj' set but not used [-Wunused-but-set-variable]

Co-authored-by: 0penBrain <48731257+0penBrain@users.noreply.github.com>
2022-01-05 12:26:48 +01:00
wmayer
84b7185a28 PD: [skip ci] code clean-up in pad and pocket feature 2021-11-20 12:01:55 +01:00
wmayer
998abc8d4d PD: move duplicated code to common base class 2021-11-20 11:45:13 +01:00
Uwe
7353ec0096 [PD] code improvement for FeaturePad
as noted by @chennes in PR #5164, we should follow the C++ style guidelines:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-if
2021-11-11 02:26:42 +01:00
donovaly
b868dbbe7f small fixes as suggested by @chennes
therefore also in the helix code
2021-09-20 00:59:17 +02:00
donovaly
7bfede97b7 [PD] add feature to select pad direction via an edge
This was requested by users in the forum and is indeed very valuable for the usability.
2021-09-20 00:59:16 +02:00
donovaly
00a7221a95 [PD] some fixes for the new pad length feature
- disable 2 properties when no custom direction is used
- rename a property because its name is the opposite of what it is doing
2021-03-25 17:44:30 +01:00
wmayer
09f93b2e8d PD: fix several issues in pad:
* pass boolean instead of int to setValue of PropertyBool
* support of symmetric option for two-length mode
* fix bug in TaskPadParameters::updateUI()
* remove strange acronyms from method names
2021-03-22 16:40:15 +01:00
donovaly
2d447d2560 [PD] add along length option for pad
- as discussed here: https://forum.freecadweb.org/viewtopic.php?f=17&t=50466&start=10#p433327
this PR is the first step for new Pad features.
It implements 3 features requested by users:
1. an option to measure the pad length along its direction if there is a custom direction
2. when there are two lengths, the reverse feature should be active
3. the pad dialog shows now always the used pad direction, no matter if it is a custom one or the sketch's normal

- Furthermore there are some code improvements (avoid rounding and blocking signals)

- Also adapt TestPad.py because its test used the case two lengths + reversed but this was not possible before this PR - the reverse option was not take into account for two lengths in FeatureSketchBased.cpp)
Now it is and therefore the test must be updated:
In the test the second sketch has the normal vector 0, -1, 0. As the reverse option is set the pad direction is 0, 1, 0. So in y direction is the length (1mm) and in -y direction is length2 (2mm). This gives together with the other pad of volume 1, a total volume of 4.

- fix UI issue: either reversed or midplane
As noticed by @chennes, when the pad uses symmetric, reversed is not sensible and vice versa.
This commit fixes the missing Gui side for the case midplane is checked and the App side.

- the PR also fix two typos
2021-03-22 16:36:04 +01:00
wmayer
145eb8ea8c PD: fixes #0004567: Pattern from a feature type UpToFace and Offset > copy whole body 2021-02-24 17:08:20 +01:00
wmayer
4c18734d2e PD: [skip ci] code refactoring
Move adding offset to face from getUpToFace() to addOffsetToFace()
2021-02-24 16:08:03 +01:00
wmayer
385e4df10c PartDesign: [skip ci] fixes #0004494: Error "Result is empty" for Pads and Pockets with non zero Offset 2020-11-16 14:45:55 +01:00
wmayer
2e83e95f3a PartDesign: [skip ci] support negative values as second length of a pad 2020-11-16 11:26:51 +01:00
wmayer
308baeaeab PartDesign: [skip ci] fix L2 parameter in pad feature when using custom direction 2020-09-12 17:26:41 +02:00
donovaly
91ef59fdbe [PD] allow to pad in any direction
It saves a lot of work if one can directly pad in any direction and OCC allows this.

This PR adds the possibility to define a custom vector for the padding direction.
2020-09-12 16:33:44 +02:00
wmayer
8076c3394d PartDesign: [skip ci] fix broken tooltip of Pad property 2020-08-08 13:08:27 +02:00
wmayer
4e5d6be326 fixes #0003979: Pocket with mode 'up to face' doesn't work correctly 2019-06-15 23:54:10 +02:00
Abdullah Tahiri
754dd89d42 PartDesign: Up to face inclined plane limitation
================================================

fixes #3177

I fixed it by tricking the function, see:
https://forum.freecadweb.org/viewtopic.php?f=8&t=24238&start=30#p274454
2018-12-24 11:01:59 -02:00
wmayer
501c5e0171 issue #0003177: Part Design Pad should allow besides 'Up to face' something like 'Up to plane' as well 2018-08-26 13:22:35 +02:00
wandererfan
a712d49685 Revise multiple solids message 2018-07-13 10:23:42 -03:00
wandererfan
0d3008e4eb Fix #3401 warning on multiple solid
- PartDesign only uses the first result shape
  of an operation and discards the rest without
  warning.

- this also fixes #1707
2018-07-13 10:23:42 -03: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
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
Stefan Tröger
609da4749a fixes #0002512 Allow multi-face part design tools 2016-05-18 23:54:18 +02:00
wmayer
cb73d010bb + port to OCC 7.0 2016-05-14 16:53:27 +02:00
Stefan Tröger
ae9dac71d7 PartDesign: Modeling features work with faces
-Rename Sketchbased to ProfileBased to show new behavior
-Adopt ProfileBased to make the relevant helper functions work with faces too
-Adopt features for unified use of helper functions
-Adopt commands to allow face selection
2016-04-12 18:12:22 +02:00
Alexander Golubev
7d8fc476bd PartDesign/App: a small fix to offset constraint syntax for Pad and Pocket 2016-04-12 18:12:21 +02:00
Alexander Golubev
27667cf5e6 Fix warnings introduced in new PartDesign
Mostly unused wariables and compare of signed & unsigned
2016-04-12 18:12:21 +02:00
Alexander Golubev
09b32218ef PartDesign: fix negative Offset property in pad and pocket 2016-04-12 18:12:16 +02:00
Alexander Golubev
984b0dd715 PartDesign/Task{Pad,Pocket}Parameters: massive refactoring
Give a massive refactoring to Task dialogs for pocket and pad.
This commit features:
 * Make Task dialogs for pocket and pad look nice in side-by side diff and
   cross import features missing in each other.
 * As a result it fixes several minor bugs.
 * Gives a rework to the UpdateUI function.
 * This one also fixes offset option support and migrates it to use unit
   framework.
2016-04-12 18:12:15 +02:00
DeepSOIC
cd4dce2f1b PartDesign workflow without part/body
PartDesign: make datum features work outside of body/part
PartDesign old workflow: remove a few messageboxes about no part
PartDesign: old workflow: multitransform without body

Still has visibility issues, but generally works.
2016-04-12 18:12:14 +02:00
DeepSOIC
f20ff5a8d4 PartDesign: refactor positionBySketch
Rename it to positionByPrevious. Rewrite.
Rewrite SketchBased::transformPlacement.
2016-04-12 18:12:11 +02:00
DeepSOIC
220c88edb6 PartDesign: tidy up sketch support and base feature confusion
Not complete, transformPlacement and positionBySketch are pending...
2016-04-12 18:12:11 +02:00
Stefan Tröger
b0817ff086 allow non-sketch based additive and subtractive features 2016-04-12 18:12:06 +02:00
jrheinlaender
12bf1d58f6 Allow extruding from a datum plane to another face or plane, optionally with an offset 2016-04-12 18:11:53 +02:00
jrheinlaender
2d0fdac40b Give user feedback about not being able to extrude UpToFace if sketch is on a datum plane 2016-04-12 18:11:52 +02:00
jrheinlaender
9a932e09a0 Allow Pad and Pocket up to a face with sketch located on datum plane 2016-04-12 18:11:51 +02:00
jrheinlaender
2732f44b42 Miscellaneous fixes 2016-04-12 18:11:51 +02:00
jrheinlaender
de17a3ede4 Pad/Pocket: Allow extrude up to a datum plane 2016-04-12 18:11:50 +02:00
jrheinlaender
61b0f03778 Made Pocket, Revolution and Groove aware of the SketchBased::BaseFeature property 2016-04-12 18:11:48 +02:00
jrheinlaender
e9d8c03665 Create Base property for SketchBased features and changed Pad to use it 2016-04-12 18:11:47 +02:00
jrheinlaender
13f3ff24c3 When switching to the PartDesign workbench, activate the Body feature that was active when the document was last saved,
and move the selection to its Tip feature so that the user can start creating new features right away
2016-04-12 18:11:47 +02:00
jrheinlaender
d9ad63ba06 Integrated PartDesign::Pad into Body feature workflow 2016-04-12 18:11:47 +02:00
wmayer
ff624aefca + Pad type UpToFirst and UpToFace doesn't produce expected results. 2015-05-16 14:19:20 +02:00
wmayer
11048388e8 + set correct group information to pad and pocket properties 2014-03-21 15:18:26 +01:00
wmayer
e0edec90f5 + PropertyLength inherits PropertyQuantity 2014-02-13 17:03:48 +01:00
wmayer
e8eb0bd828 + support loading projects with old pad features, fix critical bug where the unit gets replaced 2014-02-12 15:14:02 +01:00