Commit Graph

644 Commits

Author SHA1 Message Date
Uwe
9283aa0f72 [PD] revert a part of commit 1da079b34
as discussed and polled in https://forum.freecadweb.org/viewtopic.php?f=8&t=64000
2021-11-25 03:19:31 +01:00
Uwe
1da079b34b [PD] better solution for reversed pad/pocket handling
- let FeatureExtrude set the right direction
- use the UI as once intended: custom vector values are always taken as they are, so reversing a custom direction will not lead to a negation of the custom vector in the UI. The logic is: "take the vector as it is, and when Reversed is on, negate it additionally"
2021-11-23 04:22:37 +01:00
wmayer
d34a5616a2 PD: If pad/pocket is directly used on several faces then determine the normal of the first face 2021-11-22 11:52:17 +01:00
Ajinkya Dahale
ab26d4d0d2 [PD] Change some strings and comments in loft code
Suggestions by @donovaly.
2021-11-22 04:16:02 +01:00
Ajinkya Dahale
4483c7afd1 [PD] Refactor Loft::execute() and support points for sections
This is a combination of 4 commits. Original commit messages follow.

[PD] Initial support for point sections in loft

This commit allows the last section in a loft to be a single vertex of a solid.
Currently single vertices of sketches or datum points are NOT supported.

[PD] Allow loft "profiles" to be points

Most reliably done in dialog-based workflow.

[PD] Allow loft last section to be sketch point

[PD] Refactor `Loft::execute`

Makes it easier to support adding a single-vertex sketch in profile or sections
field when selecting the sketch in tree (i.e. without selecting subelements).

[PD] Refactoring after PR #5176 is merged
2021-11-22 04:16:02 +01:00
Ajinkya Dahale
71e70c876b [PD] Use PropertyLinkSubList for loft and sweep sections
This change is necessary since we restrict part-design features to only use
other features from the same body.
2021-11-20 21:37:14 +01:00
wmayer
4fa4446f01 PD: [skip ci] code clean-up in pad and pocket feature 2021-11-20 12:01:55 +01:00
wmayer
ab480df745 PD: move duplicated code to common base class 2021-11-20 11:45:13 +01:00
wmayer
9ee60fd585 PD: Add common base class for Pad/Pocket 2021-11-20 10:34:01 +01:00
wmayer
a8cb5ed419 PD: [skip ci] for pockets use opposite direction of reference axis 2021-11-16 00:35:57 +01:00
Uwe
640ecca830 [PD] fix typos 2021-11-13 00:29:33 +01:00
wmayer
96512c1e01 PD: [skip ci] add PartDesignGlobal.h with export/import macros 2021-11-12 18:25:41 +01:00
Uwe
0995c81240 [PD] add feature to set direction for pockets
This PR adds the functionality of pads to pad along either a custom direction or along an edge to pockets.

So with this PR Pad and Pocket are on the same level of functionality.
2021-11-11 15:55:42 -06:00
Uwe
969556573b [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
Uwe
cc242aae7d [PD] handle changed property for loft and pipe
- this was missing in PR #5155
2021-11-11 01:24:53 +01:00
Ajinkya Dahale
03a8ff7841 [PD] Support adding solid faces for loft and pipe sections
With these changes, one face per solid can be added as either the first
"profile" or subsequent sections in loft and pipe.

This commit depends on `App::PropertyXLinkSubList` preserving the order in which
sections are added.

A minor change this also adds is that when a solid's face is selected that face
is mentioned in the fields instead of the solid (eg `Box:Face1` instead of
`Box`).
2021-11-09 23:05:29 +01:00
bartus
0c3ba910aa Fix linux build: undefined std:string_view
Pop 'mesh' library c++ stranderd to c++17
Add required <string_view> header
2021-10-03 14:36:16 +02:00
donovaly
6ce6a8a1e0 small fixes as suggested by @chennes
therefore also in the helix code
2021-09-20 00:59:17 +02:00
donovaly
069e765db0 [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
Chris Hennes
8b7da3b0eb PD: Silence LGTM warning about empty block 2021-09-19 13:39:49 -05:00
troyp76
1a3527c06a Improved chamfer behavior when faces are selected
Improved chamfer behavior when faces are selected and non equal chamfer types are used
2021-09-18 22:03:28 +10:00
luz paz
7fb4dd37e4 PD: Fix typo in function getContiniusEdges->getContinuousEdges
Related to PR #5029
2021-09-15 10:11:37 -04:00
wmayer
9fe1f56824 PD: fix ProfileBased::Restore to not affect sub-classes that need to handle changed property types/names 2021-09-15 15:45:24 +02:00
wmayer
e273954135 PD: move handling of changed properties of Transformed to handleChangedPropertyType 2021-09-15 15:20:40 +02:00
wmayer
6176e815e8 PD: move handling of changed properties of the Chamfer/Fillet to handleChangedPropertyType 2021-09-15 15:14:14 +02:00
wmayer
4327cd5ccb Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
Yorik van Havre
41e0eda96c Merge pull request #4914 from donovaly/PD-property-fixes
[PD] fix property issues
2021-08-30 13:30:30 +02:00
Yorik van Havre
2f70ddc3dd Removed redundant namespace
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2021-08-30 13:30:06 +02:00
luz paz
eab17ddff5 Fix various typos 2021-07-31 09:46:50 +02:00
donovaly
8b9afbd921 [PD] fix property issues
- Helix: the property Turns has the App::PropertyFloatConstraint thus also the pointer to it must have the same property

- LinearPattern and Helix: make constraints static class member (forgot this in commit 3704ad68)

- Draft: make the constraint const

- PolarPattern and LinearPattern assure that the header file is loaded at last to avoid potential troubles
2021-07-11 01:43:38 +02:00
luz paz
56ce278abf Fix typos
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ontop,orgin,orginx,orginy,ot,pard,parms,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu`
2021-06-17 08:02:57 +02:00
donovaly
b9b42a52f4 [PD] fix primitives issues
- to avoid invalid results:
 - don't allow to set equal radii for cones
 - don't allow to set equal wedge parameters
 - don't allow zero quantities like e.g. the box width

- use full internal precision because it must be possible to create an e.g. 23.5 um wide box and using the default 2 displayed digits

- take spinbox limits from App

- add missing tooltips

- remove disturbing commented out line from Workbench.cpp

- some coding style issues fixed automatically by the MSVC IDE
2021-04-20 19:03:40 +02:00
wmayer
d504c12517 PD: [skip ci] fixes -Wreturn-std-move 2021-04-13 18:55:18 +02:00
donovaly
7185ee93f2 [PartDesign] add direction to cylinder primitive
We already have the possibility to create skewed prisms. I recently stumbled upon that I would need this feature for cylinders too.

This PR takes the existing prism extrude direction feature and use it for cylinders too
2021-04-05 14:35:50 +02:00
wmayer
64dbe342e1 PartDesign: for Prism feature use PrismExtension 2021-04-05 13:25:36 +02:00
wmayer
9f93bf3b3c PD: remove superfluous code block from Helix::execute 2021-03-28 13:38:53 +02:00
wmayer
ac3ce00b63 PD: replace error-prone strings with enum to handle different helix modes 2021-03-28 13:37:13 +02:00
tomate44
415034d1eb PartDesign Helix: update NbTurns in Pitch-Height-Angle mode 2021-03-28 13:13:10 +02:00
Yorik van Havre
d25eeae87d Merge pull request #4630 from luzpaz/typos
Fixed misc. typos [skip ci]
2021-03-26 11:29:34 +01:00
donovaly
0a2eb2756f [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
b4b1cbedb1 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
cf11f38875 [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
luz paz
a25a2200cb Fixed misc. typos [skip ci]
Found via
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu
```
2021-03-21 07:38:41 -04:00
wmayer
ee60ccd044 PD: remove empty try/catch block 2021-03-13 14:48:16 +01:00
David Osterberg
3131b97aa8 PartDesign: Transformed. Fix regression in preview 2021-03-13 14:48:16 +01:00
David Osterberg
8453d41515 PartDesign: Transformed. Fix regression for Mirrored, and multiple features 2021-03-13 14:48:16 +01:00
David Osterberg
fecf9c2e84 PartDesign: Transformed: Allow explict selection of overlap mode 2021-03-13 14:48:16 +01:00
David Osterberg
03da9d3501 PartDesign: Performance improvements in Transformed (pattern)
- Use fuzzy fuse/cut method with tolerance Precision::Confusion()
- Use parallel computation feature
- Allow that individual patterned item fail to intersect the baseobject.
	Issue warning instead of error. This was done for performance reasons
	but it can also be considered a feature.
- Simplify the code a bit
- Distinguish between overlapping mode and non-overlapping mode. In non-overlapping mode
  the tool shapes are compounded instead of fused. For huge benefit in performance.
2021-03-13 14:48:16 +01:00
David Osterberg
98b52b09d6 PartDesign: New input mode, and allow spirals to be created 2021-03-10 15:36:40 +01:00
David Osterberg
80af82a4fe PartDesign: Hole performance: Compound holes and cut once
- Remove unused code
- BooleanOperation trick

For some reason doing the cut in a boolean operation is
20% faster than doing it directly. Unclear why.
2021-03-08 15:30:24 +01:00