Commit Graph

1584 Commits

Author SHA1 Message Date
wmayer
64dbe342e1 PartDesign: for Prism feature use PrismExtension 2021-04-05 13:25:36 +02:00
wmayer
05f1634276 PD: [skip ci] fixes #0004139: Macro - SubtractivePipe attached path object issues after macro executed 2021-03-29 10:43:08 +02:00
wmayer
b9da524451 PD: in setEdit() helper function make sure that recorded macro is handled as Gui command 2021-03-28 18:39:44 +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
Chris Hennes
07b9cbb441 [PD] Misc. small LGTM fixes 2021-03-28 11:39:04 +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
f55c46cc86 PD: adjust unit test for mirrored offset that doesn't fail any more 2021-03-13 14:48:16 +01: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
wmayer
55896f316e PD: [skip ci] in the helix dialog use step size of 5 degree for the angle 2021-03-04 11:09:54 +01:00
donovaly
965250246a [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
donovaly
249c2c7970 [PD] set App constraints for their Gui counterparts
based on Werner's work yesterday, this PR takes care of the missing PD features to use the constraints already defined in App
2021-03-04 11:03:24 +01:00
wmayer
ac23438eb6 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
f982112e24 [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
David Osterberg
318972ce70 PartDesign: Allow customization of Helix preview modes 2021-03-03 17:15:08 +01:00
M G Berberich
d1439107df [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
3704ad68d8 [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
42bf2c8285 [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
0f3e98588f PD: AddressSanitizer: heap-use-after-free
Fix crash inside TaskDlgSketchBasedParameters::reject()
2021-03-03 15:53:12 +01:00
wmayer
036c6b0d25 PD: improve task panel for revolution/groove:
* set range Angle property to spin box
* connect signals after initializing widgets to avoid superfluous recomputes
2021-03-03 15:42:48 +01:00
wmayer
bc1b9ea1bb PD: [skip ci] set value range to angle spin box 2021-03-03 15:22:53 +01:00
wmayer
3694da3102 PD: [skip ci] fix angle checks for groove and revolution 2021-03-03 14:56:16 +01:00
wmayer
3e7429d163 PD: [skip ci] set angle constraints for groove 2021-03-03 14:55:19 +01:00
donovaly
c0de42335b [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
eccc5bfe1a PD: [skip ci] fix angle check in PolarPattern::getTransformations() 2021-03-03 10:39:41 +01:00
wmayer
832174641c PD: improve task panel for polar patterns:
* set range of Occurrences property to spin box
* connect signals after initializing widgets to avoid superfluous recomputes and possible inconsistencies
2021-03-03 10:32:46 +01:00
wmayer
2d54d838cf PD: improve task panel for linear patterns:
* set range of Occurrences property to spin box
* connect signals after initializing widgets to avoid superfluous recomputes and possible inconsistencies
2021-03-03 10:32:02 +01:00
donovaly
7f1b47d118 [PD] disallow invalid polar and linear pattern settings
as discussed in 356db441a6 we should disallow invalid property settings
2021-03-03 07:45:08 +01:00
David Osterberg
52c0558f91 PartDesign: Allow use of circle edge as axis in PolarPattern 2021-03-01 14:48:24 +01:00
David Osterberg
f1d6c78cbe PartDesign: Allow use of circle edge as axis in ProfileBased 2021-03-01 14:48:24 +01:00
wmayer
356db441a6 PD: [skip ci] PolarPattern: Support 1 occurrence
This is analogous to support 1 occurrence of the linear pattern feature: 81a5ec5e55
2021-03-01 13:58:02 +01:00
donovaly
f481c47123 [PD] fix multi-transform View
- fixes bug 4581
  See the first issue reported here:
  https://forum.freecadweb.org/viewtopic.php?f=3&t=56093#p482553

- also fix issue that one could set 1 occurrence for polar patterns despite 2 are required at least

- also fix potential dereferencing null pointer (reported by MSVC)
2021-03-01 13:11:15 +01:00
David Osterberg
c7c420ca1d PartDesign: Hole. Address Donovaly bugs 7 and 8
bug 7: the update view checkbox should be enabled/disabled based on Model thread.
       the checked state should not change

bug 8: the Thread depth options should be disabled when Model thread is unchecked.
       because they don't do anything in the model it is confusing if they are enabled.
2021-02-28 20:13:14 +01:00
David Osterberg
1eeefeb8ae PartDesign: Hole: Always update view if modelthread is disabled
Also: Check the Update View checkbox and disable it, when turning off
model thread.
2021-02-28 20:13:14 +01:00
David Osterberg
d59e90a10f PartDesign: Hole: Turn off keyboard tracking on model thread spinboxex 2021-02-28 20:13:14 +01:00
David Osterberg
ebe2ce1034 PartDesign: Hole: Rename Automatic Tapped (DIN76) and change default to Hole depth. 2021-02-28 20:13:14 +01:00
David Osterberg
6ea6b48c0e PartDesign: [Hole] Add Entire Depth thread depth mode 2021-02-28 20:13:14 +01:00
David Osterberg
d3ddbe8549 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
Chris Hennes
b1789ae7d2 [PD] Fix minor static analysis issues in FCGear
LGTM has identified a number of minor issues with the FCGear Part Design
scripts. This commit addresses each of them, and also corrects two minor
spelling errors in the dialog. None of the errors or their fixes are
expected to result in changes to the functionality of the script.
2021-02-27 18:20:32 +01:00