Commit Graph

1761 Commits

Author SHA1 Message Date
wmayer
8a2ea97276 PD: support of wires in ReferenceHighlighter 2021-12-15 16:25:06 +01:00
wmayer
b428fb2afa PD: handle Base::Exception in Loft::execute 2021-12-15 16:24:42 +01:00
wmayer
5bef110491 PD: do not throw an exception in TaskSketchBasedParameters::make2DLabel as otherwise editing a broken loft/pipe won't be possible 2021-12-15 15:36:36 +01:00
wmayer
94d8a2034a PD: hide the sections of a loft only if it can be recomputed successfully 2021-12-15 15:13:33 +01:00
wmayer
a87c8dca31 PD: hide the profile of a sketch based feature only if it can be recomputed successfully 2021-12-15 15:13:03 +01:00
wmayer
2d9c403cc0 PD: in ViewProviderLoft::highlightSection follow the same logic as in Loft::execute for selected profiles/sections 2021-12-14 00:30:59 +01:00
wmayer
df76209f58 PD: use class ReferenceHighlighter inside ViewProviderDressUp 2021-12-13 16:56:48 +01:00
wmayer
418ef59625 PD: use class ReferenceHighlighter inside ViewProviderPipe 2021-12-13 15:58:55 +01:00
wmayer
098927fb54 PD: properly reset line colors when un-highlighting loft profile/sections 2021-12-13 15:46:04 +01:00
wmayer
6289ff40d5 PD: highlight current profile and sections of a loft when selecting a new profile/section 2021-12-13 15:01:08 +01:00
wmayer
2b65ef8fcf PD: make Loft working again when two sketches are pre-selected 2021-12-13 10:32:40 +01:00
Jonas Bähr
7dcd59d9fb PD: Enhance the helix property docs
Most strings are based on descriptions from the wiki [1]. Some have been
extended where I saw need. Note that I'm not a native speaker, though.

[1]: https://wiki.freecadweb.org/PartDesign_AdditiveHelix
2021-12-11 23:33:28 +01:00
luz paz
b6f9f39ffc Fix various typos and grammatical refinements 2021-12-09 08:57:52 -06:00
wmayer
5ddefe56fb PD: 0004699: ShapeBinder still touched after recompute 2021-12-09 12:33:09 +01:00
wmayer
208237d2e6 PD: 0004582: Mulit-transformation dialog cannot be cancelled 2021-12-09 06:13:25 +01:00
wmayer
ca5c799ce2 Gui: rename methods of SelectionObserver to clarify intention in client code 2021-12-07 14:17:07 +01:00
wmayer
ce88fa2052 PD: enable selection only on request and disable it after selecting an object 2021-12-07 13:06:48 +01:00
wmayer
a27b3067ba PD: eliminate the boolean argument from TaskSketchBasedParameters::onSelectReference 2021-12-07 11:04:22 +01:00
wmayer
6167e9f77a PD: 0004759: Bad error message when creating pad with 0 length 2021-12-07 10:09:11 +01:00
Uwe
1e4c7a2de9 [PD] improve selection mode exit for Helix
exit the selection mode if selection was got - like we do it for all other PD features
2021-12-07 04:18:33 +01:00
Uwe
6efd5f1bf6 [PD] fix calculation of possible Helix intersections
the current routine fails for the growth mode.

This PR fixes this by handling this case separately from the other modes.
2021-12-07 03:19:35 +01:00
wmayer
8df497b08e Gui: move methods startDefaultEditMode() and addDefaultAction() to ViewProviderDocumentObject 2021-12-06 19:24:26 +01:00
wmayer
e71051f4f0 PD: 0004742: Editing features by context menu may not be undoable 2021-12-06 14:11:10 +01:00
Uwe
3cef5da1ad [PD] fix division by zero in Helix
- when a helix is defined in the growth mode it can have a pitch of zero

This commit fixes the resulting division by zero by directly setting the known turns
2021-12-06 02:40:34 +01:00
Uwe
3f76c7869a [PD] Helix: improve variable naming
use unique variable names
2021-12-05 21:59:06 +01:00
Uwe
d2dc6ca7dd [PD] rewrite a Helix function
rewrite the function to check if helix might intersect itself to make it better readable/understandable
2021-12-05 21:28:52 +01:00
Uwe
1af3755a17 [PD] add missing tooltips for Helix dialog 2021-12-05 19:21:27 +01:00
wmayer
6e52161dce PD: refactor ReferenceSelection 2021-12-03 21:38:28 +01:00
wmayer
543024e078 PD: comment out dead code 2021-12-03 20:18:46 +01:00
0penBrain
7aef0b3de7 [Gui] UserEditMode : fix operating on PartDesignObject 2021-12-03 16:53:30 +01:00
wmayer
fab96e2151 PD: avoid include generated .ui file in header file 2021-12-03 15:59:15 +01:00
wmayer
c64d86274c PD: minor cleanup in view provider headers 2021-12-03 15:58:23 +01:00
wmayer
3ee1d91b88 PD: cleanup the mess with boolean arguments and replace them with a bitmask 2021-12-03 14:46:19 +01:00
Yorik van Havre
59c759ebbd Merge pull request #5219 from luzpaz/gender-neutral-fixes
Make source code comments use gender neutral pronouns
2021-12-03 13:36:17 +01:00
wmayer
269681d83c PD: use button group to make mid-plane and reversed option mutual exclusive 2021-12-03 00:01:49 +01:00
luz paz
0042f58e4c 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
wmayer
501c3dc657 PD: fix ProfileBased::getAxis
Introduce an enum to verify the axis depending on the used context.
* For helix no restriction is needed
* For Pad/Pocket the axis must not be parallel with the sketch plane
* For Revolve/Groove the axis must not be perpendicular with the sketch plane
2021-12-02 17:24:18 +01:00
wmayer
2fd81006ea PD: fix build failure with C++20 2021-12-01 23:24:16 +01:00
wmayer
3cddf78b5e PD: refactoring of TaskHelixParameters 2021-11-30 11:47:06 +01:00
wmayer
46e516f5d3 PD: fix crash in TaskHelixParameters::updateStatus() 2021-11-30 10:36:36 +01:00
wmayer
ffe240a539 PD: refactoring of TaskHelixParameters, update status after each recompute 2021-11-29 22:14:14 +01:00
wmayer
41efee1b4c PD: handle language change in TaskHelixParameters 2021-11-29 20:14:29 +01:00
Uwe
955af2fa8d [PD] use existing definition for PI in Helix
- also a lot of style fixes kindly done by MSVC
2021-11-29 12:05:10 +01:00
Uwe
35683883cb [PD] allow negative helix growth
Helices that become smaller with every turn are geometrically perfectly valid. Therefore we cannot forbid this.

(For example when creating a helix from a face you often cannot move it so that you can apply a positive growth.)
2021-11-29 11:29:27 +01:00
Uwe
1358cd021f [PD] prevent invalid helix geometry
in the height-turns-growth model height and growth must not be equally zero
2021-11-29 01:34:03 +01:00
Uwe
625c84e34a [PD] allow to move sweep sections
Now that we have the feature that sweeps can have vertices as end or begin of a sweep, there is the need for the feature to move sections. For example vertices may only be the last section.
2021-11-29 00:13:23 +01:00
Uwe
90f2040386 [PD] fix increment of helix growth
- it is not sensible that all helix geometries use 1 as increment in the dialog but the growth uses 5. Looking at the PR that introduced this feature it seems that this was just a copy issue from the angle edit since this uses 5 as increment.

- the other changes are from Qt's Designer
2021-11-29 00:11:40 +01:00
Jonas Bähr
169c38622c [PD] Helix: Offer profile's normal as axis
Previously, only the vertical and horizontal axis of the profile was
selectable in the task panel of the additive/subtractive helix. Now the
profile's normal axis can be selected, too. This now allows to create
helical extrusions or "twisted pockets".

The order of the GUI entries was chosen to be in line with the order of
axis selection of the multi-transform parameters.
The actual feature's implementation needed adaption for this special case
as in some places a unit vector (`gp_Dir`) was derived from the cross-
product of axis and profile normal -- a null-vector when the axis *is*
the normal. This caused the gp_Dir's ctor to throw.
2021-11-28 23:57:41 +01:00
Ajinkya Dahale
bc90f4480b [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
6d0c6b4119 [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