Commit Graph

319 Commits

Author SHA1 Message Date
Chris Hennes
65aa374083 PD: PR6497 move return statement to new line 2022-03-29 12:37:21 -05:00
wmayer
d1d4b996e7 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
wmayer
80a84fd849 PD: tmp. suppress errors in helix feature when creating it 2022-02-28 17:55:32 +01:00
Uwe
7a4caf06f8 [PD] Workbench and Command: remove unused includes 2022-02-20 21:55:15 +01:00
Mark Ganson TheMarkster
abe0c9222a [PartDesign Fillet/Chamfer] add UseAllEdges boolean property (#5340)
- [PartDesign Fillet/Chamfer] add UseAllEdges boolean property
- add UseAllEdges checkbox to fillet and chamfer dialogs
- put UseAllEdges property into Chamfer and Fillet groups, create Fillet group for fillets and put Radius into it, too.
2022-02-05 01:50:51 +01:00
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
mwganson
6be358fdfa [PartDesign] Chamfer and Fillet, select all edges for the user when no subobjects have been selected prior to executing command 2022-01-05 01:40:10 +01:00
wmayer
506c40ab60 PD: make Loft working again when two sketches are pre-selected 2021-12-13 10:32:40 +01:00
luz paz
d877ee4d47 Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
Ajinkya Dahale
5e3ad45ef4 [PD] Use compare to compare strings instead of substr
Used when finding subelements of a feature. Many of the comparisons used to also
check for string lengths, but as far as I can tell they are not strictly
necessary (see https://www.cplusplus.com/reference/string/string/substr/) and
just `substr` can be used without them. However, `compare` explicitly is for
comparing, and does not make a new object that `substr` does.
2021-11-28 22:05:46 +01:00
Ajinkya Dahale
2fcee8ea82 [PD] Support "punctual" sections for PD Pipe
Similar to PR #5170 for loft. This commit squashes the following commits.

[PD] Refactor `Pipe::execute` and support point sections

[PD] Allow point profile in selection-based pipe workflow

[PD] Only add sketch subs if it is vertex

[PD] Make both end faces of pipe regardless of point sections

Earlier we were checking if these faces correspond to point sections, but
apparently the end faces are independent of the order in which the sections are
added, so the "front" may be the face closest to the last added section, rather
than the "profile". Creating null faces and adding them for sewing together into
a solid does not appear to have side-effects so far.
2021-11-28 19:19:16 +01:00
Ajinkya Dahale
31bbabe817 [PD] Change some strings and comments in loft code
Suggestions by @donovaly.
2021-11-22 04:16:02 +01:00
Ajinkya Dahale
4d006a5098 [PD] Allow sketch point profile in selection-based loft workflow 2021-11-22 04:16:02 +01:00
wmayer
84e382a5a6 PD: simplify Pad/Pocket commands 2021-11-16 00:58:55 +01:00
Uwe
8b8b04cfde [PD] uniform pad and pocket handling
- since pockets now can have a certain direction, also handle the reference axis like for pad
- uniforms initial length to 10.0
2021-11-15 15:32:56 +01:00
Ajinkya Dahale
15225b3b09 [PD] Allow body faces when making loft by pre-selection 2021-11-12 01:33:46 +01:00
wmayer
c1910e644f PD: [skip ci] when creating a datum object allow user to create a body if needed 2021-10-22 20:23:16 +02:00
wmayer
12ef275264 PD: do not set ReferenceAxis when no profile is used to pad a face 2021-10-08 17:45:59 +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
Ajinkya Dahale
28d8d808a8 PartDesign: Add new need active body dialog with option to choose body (#4949)
* [PD] Add new need active body dialog

Intended for use wherever an active body is needed but none exists. The dialog
contains a list with the bodies present in the document, with an extra option to
make a new body. Custom text can be provided if needed.

This commit also replaces the warnings used by "new sketch" and "primitive"
command with this new dialog.

Addresses issue #4288.
2021-09-16 12:27:46 -05:00
luz paz
6e10bc0789 Crowdin: remove superfluous whitespace in Gui/Command.cpp
ref: https://crowdin.com/translate/freecad/564/en-de?filter=basic&value=2#6589648
2021-06-03 14:36:21 -04:00
wmayer
78a9a3c2a8 PD: [skip ci] remove invalid static_cast 2021-02-24 20:12:26 +01:00
donovaly
3fdce54be7 [PD] fix dressup feature display when broken
As discussed in https://forum.freecadweb.org/viewtopic.php?p=479647#p479377
the user can end up without either seeing nothing or an inexisting dressup feature.

This PR fixes this.
2021-02-19 14:51:52 +01:00
wmayer
6a3e76addb PD: [skip ci] fix typo in comment 2021-02-17 15:55:47 +01:00
wmayer
1955848194 PartDesign: [skip ci] make base object visible again if initial additive helix fails to recompute 2021-02-17 13:33:02 +01:00
donovaly
bcadbe3b1b [PD] rename icons to match Wiki files
For the What#s this feature we need to have a uniform naming of the features and its icons. For some PD icons this is not the case and since we are in feature freeze, this is the right time to address this.
(I see the same is already done for Mesh.)
2021-02-11 12:47:25 +01:00
David Osterberg
cb2da22e86 PartDesign: New features AdditiveHelix and SubtractiveHelix
These features, based on the code for the Pipe class, allow the user
to simply create a helical sweep within PartDesign workbench.

Sample application is threads, springs, coils, augers, etc.

Also, remove needless requirement for positive cone angle on helixes.

Thanks to @bitacovir for helping with the icons
Thanks to @chennes for review
Thanks to @vosk for review
Thanks to @wwmayer for review

Enforce that links stay within scope for ProfileBased features
This also ensures that the Body itself is not used for creating features within
the body, causing a "Graph not a DAG" error.
2021-02-04 13:01:12 +01:00
Pierre LeMoine
67aee7cd21 Transform patterns can be created from multiple base features
The infrastructure/piping seems to have been in place for a long while.
Not tested for all variations of pattern transforms.
The major enabler was removing the `break`.
Some extra piping added to let the code at call-site decide if to select multiple features or not.
2021-02-04 11:58:47 +01:00
luz paz
a65b3788c6 PartDesign: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the PartDesign Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
wmayer
fb03c31b28 PD: whitespace improvements 2020-09-15 14:20:24 +02:00
mwganson
7d392d1209 [Part Design] allow for preselecting loft sections and pipe spines prior to invoking command 2020-09-15 10:48:09 +02:00
donovaly
003c2d5b62 [PD] allow multiselection on creation of pattern
- Since realthunder's contributions some months ago, the 4 pattern features (mirror, linear, polar, mulitransform) can handle several features at once.
This PR allows to select multiple features when creating a pattern.
(This speeds up the workflow because at the moment one has to create the pattern with one feature and subsequently add more.)

- fix dialog issue that Add and Remove button could be active the same time

- use the keyboardTracking feature to avoid unnecessary recomputes (e.g. currently 3 recomputes when inserting "12.5" to the length field of linear pattern)

- fix wrong <extends> statement in .ui files (automatically spotted and fixed by Qt's Designer)
2020-07-30 10:56:24 +02:00
wmayer
45e0673645 LGTM: [skip ci] fix: Declaration hides parameter
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
luz paz
e82f7f74f4 Fix Crowdin typos + trim superfluous whitespace [skip-ci]
Some issues that this PR fixes (but not all listed):  
https://crowdin.com/translate/freecad/27911/en-en#6581578  
https://crowdin.com/translate/freecad/27911/en-en#6579080  
https://crowdin.com/translate/freecad/27911/en-en#6581580  
https://crowdin.com/translate/freecad/27911/en-en#6579086
2020-07-23 13:52:44 +02:00
wmayer
0eb7967c40 Coverity: [skip ci] Dereference before null check
Remove logically dead code because 'pcActiveBody' cannot be null at this stage
2020-07-21 14:33:54 +02:00
wmayer
2453a50aba Coverity: Structurally/Logically dead code 2020-07-20 17:34:28 +02:00
Zheng, Lei
397e0b8a4f PartDesign: change SubShapeBinder make command
Allows making binder to another binder.
2020-07-12 19:43:23 +02:00
Zheng, Lei
caaea49d59 PartDesign: fix SubShapeBinder make command 2020-03-21 22:12:27 +01:00
Zheng, Lei
fa8c7ee0a3 PartDesign: allow making new ProfileBased feature using multiple faces 2020-03-20 16:38:00 +01:00
Zheng, Lei
ce6eff0a22 PartDesign: improve SubShapeBinder make command 2020-03-20 15:02:20 +01:00
wmayer
f0f3597da8 PartDesign: [skip ci] New sketch function doesn't try any more to edit a selected sketch 2020-03-11 15:14:18 +01:00
luz.paz
fb32601746 Fix various (doxy) typos and whitespace issues
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,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`
2019-10-03 07:57:13 +02:00
wmayer
b1dd1e61a7 force strict ISO C++ (-Wpedantic)
for Fem, Import, PartDesign, Robot, Sketcher, TechDraw
2019-09-18 14:18:07 +02:00
DeepSOIC
f19e21a224 PartDesign: change view sizing on new sketch 2019-09-11 21:39:16 +02:00
Zheng, Lei
cd2b7e297c PartDesign changes
* Mostly for supporting in-place editing

* Add new SubShapeBinder that support cross coordinate system,
  external, and sub-object binding
2019-08-17 15:15:47 +02:00
wmayer
61b0755c89 automatically redirect to tip object in case body display mode is set to Tip and a face was selected to create a new sketch 2019-07-08 11:46:09 +02:00
luz.paz
2b02659010 Misc. typo and whitespace fixes
Found via `codespell`
2019-05-30 19:56:12 +02:00
Abdullah Tahiri
07dacdba36 PartDesign: PCH GUI 2019-05-02 07:12:51 +02:00