Commit Graph

623 Commits

Author SHA1 Message Date
luz paz
909030859d PD: Fix typo in function getContiniusEdges->getContinuousEdges
Related to PR #5029
2021-09-15 10:11:37 -04:00
wmayer
fff27ee78b 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
2af9c5038e PD: move handling of changed properties of Transformed to handleChangedPropertyType 2021-09-15 15:20:40 +02:00
wmayer
ba2ad05983 PD: move handling of changed properties of the Chamfer/Fillet to handleChangedPropertyType 2021-09-15 15:14:14 +02:00
wmayer
fa86b0216e Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
Yorik van Havre
26e1fd3710 Merge pull request #4914 from donovaly/PD-property-fixes
[PD] fix property issues
2021-08-30 13:30:30 +02:00
Yorik van Havre
ff4209a759 Removed redundant namespace
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2021-08-30 13:30:06 +02:00
luz paz
4d21ffa904 Fix various typos 2021-07-31 09:46:50 +02:00
donovaly
8e3ebc07ed [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 114bdf6b)

- 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
90e5841aad 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
f0655f7c3f [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
2fd0bb6859 PD: [skip ci] fixes -Wreturn-std-move 2021-04-13 18:55:18 +02:00
donovaly
0369bc0853 [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
021f42f828 PartDesign: for Prism feature use PrismExtension 2021-04-05 13:25:36 +02:00
wmayer
27049b3e54 PD: remove superfluous code block from Helix::execute 2021-03-28 13:38:53 +02:00
wmayer
2df88592ec PD: replace error-prone strings with enum to handle different helix modes 2021-03-28 13:37:13 +02:00
tomate44
1a8b840709 PartDesign Helix: update NbTurns in Pitch-Height-Angle mode 2021-03-28 13:13:10 +02:00
Yorik van Havre
511df2fa5d Merge pull request #4630 from luzpaz/typos
Fixed misc. typos [skip ci]
2021-03-26 11:29:34 +01: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
luz paz
9a3724c11b 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
5e71f945c4 PD: remove empty try/catch block 2021-03-13 14:48:16 +01:00
David Osterberg
482129c5a4 PartDesign: Transformed. Fix regression in preview 2021-03-13 14:48:16 +01:00
David Osterberg
b7ac48aef7 PartDesign: Transformed. Fix regression for Mirrored, and multiple features 2021-03-13 14:48:16 +01:00
David Osterberg
79facc579e PartDesign: Transformed: Allow explict selection of overlap mode 2021-03-13 14:48:16 +01:00
David Osterberg
34fbe57485 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
f824603614 PartDesign: New input mode, and allow spirals to be created 2021-03-10 15:36:40 +01:00
David Osterberg
b185dacdde 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
donovaly
feabd1af30 [PD] use same helix angle step as for other features
All other PD features use a step size of 1.0 for angles.

(Personally also for me a step of 5 is not convenient)
2021-03-04 11:08:41 +01:00
wmayer
cffe8d19fd PD: [skip ci] in the helix task dialog use the value range defined in the helix feature 2021-03-03 17:40:11 +01:00
donovaly
fc36ab6c64 [PD] set constraints for helix properties
at the moment it is possible by a click to set e.g. -1 turn which would cause an error
2021-03-03 17:25:40 +01:00
M G Berberich
ba5c438ec2 [PD] fixes problem with the path for user-defined hole-cut-types
https://forum.freecadweb.org/viewtopic.php?f=19&t=51403&start=20#p482574
2021-03-03 16:02:17 +01:00
donovaly
1376931758 [PD] make constraints static class member
the MSVC IDE warned me about different floatAngle definitions in PD
2021-03-03 15:58:22 +01:00
donovaly
ab29cf5740 [PD] attempt to use more reasonable angle limit for drafts
using e.g. 89.999 as angle works. It might not be useful in real life, but the 89.99 seem arbitrary.
2021-03-03 15:56:21 +01:00
wmayer
ea0f95739b PD: [skip ci] fix angle checks for groove and revolution 2021-03-03 14:56:16 +01:00
wmayer
86751fd944 PD: [skip ci] set angle constraints for groove 2021-03-03 14:55:19 +01:00
donovaly
2caa07c291 [PD] disallow angles <=0 for holes and revolution
neither the taper, drill or countersink angle can be zero or negative for a valid hole, thus set a constraint
2021-03-03 14:33:01 +01:00
wmayer
07a59e242d PD: [skip ci] fix angle check in PolarPattern::getTransformations() 2021-03-03 10:39:41 +01:00
donovaly
20024707a9 [PD] disallow invalid polar and linear pattern settings
as discussed in 423d41da19 we should disallow invalid property settings
2021-03-03 07:45:08 +01:00
David Osterberg
1110f1198b PartDesign: Allow use of circle edge as axis in PolarPattern 2021-03-01 14:48:24 +01:00
David Osterberg
c862ec458c PartDesign: Allow use of circle edge as axis in ProfileBased 2021-03-01 14:48:24 +01:00
wmayer
9120d4a7d9 PD: [skip ci] PolarPattern: Support 1 occurrence
This is analogous to support 1 occurrence of the linear pattern feature: 74ea8353edc9
2021-03-01 13:58:02 +01:00
David Osterberg
41724cd29b PartDesign: Hole: Rename Automatic Tapped (DIN76) and change default to Hole depth. 2021-02-28 20:13:14 +01:00
David Osterberg
d7ae53d597 PartDesign: [Hole] Add Entire Depth thread depth mode 2021-02-28 20:13:14 +01:00
David Osterberg
d94946781e PartDesign: Add true threads to Hole
- Thread runout according to DIN 76-1
- Through all length updated to be calculated based on bounding box
- New properties: ModelThread, ThreadDepthType, ThreadDepth,
                  UseCustomThreadClearance, CustomThreadClearance
- Rename Old but unused parameters related to thread modeling.
- Functionality exposed in UI
2021-02-28 20:13:14 +01:00
David Osterberg
9d24f90dd7 PartDesign: Transformded. Align the "property category" of Refine with other PD commands 2021-02-27 18:19:14 +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
45079ca2ac PD: [skip ci] AddressSanitizer: stack-use-after-scope
Axis() returns a tmp. object and thus we cannot use a const reference to get its Location() method
2021-02-23 13:57:51 +01:00