Commit Graph

20700 Commits

Author SHA1 Message Date
wmayer
c5ffdd4318 Part: add module with enums 2021-11-30 20:03:26 +01:00
wmayer
d41a9a1e5c Part: implement Part.Wire.makeEvolved and Part.Face.makeEvolved 2021-11-30 18:17:29 +01:00
wmayer
d56b05678f PD: refactoring of TaskHelixParameters 2021-11-30 11:47:06 +01:00
wmayer
1ecc59d6a4 PD: fix crash in TaskHelixParameters::updateStatus() 2021-11-30 10:36:36 +01:00
wmayer
0cd9ed7429 PD: refactoring of TaskHelixParameters, update status after each recompute 2021-11-29 22:14:14 +01:00
wmayer
3b4012719e PD: handle language change in TaskHelixParameters 2021-11-29 20:14:29 +01:00
0penBrain
1188f7d7a1 [Sketcher] Allow to autoconstraint slot horizontal/vertical 2021-11-29 14:38:53 +01:00
0penBrain
9b59233e53 [Sketcher] Introduce hack to be able to vertically/horizontally auto-constrain primitives
Adds a new type "VERTEX_FOR_PRIMITIVE" that will analyze the direction for vertical/horizontal but not for tangent

 If defined, makes use of GeoId item of AutoConstraint struct (instead of last geometry) to apply the horizontal/vertical
 constraint. This allow this constraint to be applied on an arbitrary geometry.
2021-11-29 14:38:53 +01:00
0penBrain
a00f2877f3 [Sketcher] Ability to snap slot horizontal/vertical
Triggered by pressing Ctrl key when creating the slot
 Extra constraint is added in case snapping is enabled
2021-11-29 14:38:53 +01:00
Uwe
6051148b66 [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
bd2dbeb906 [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
4a3d211378 [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
c302582823 [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
42c3843bed [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
021cdd7acc [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
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
0penBrain
0d52ef4c13 [Sketcher] Floating point computation immunity for carbon copy parallel/aligned checks 2021-11-27 08:58:25 +01:00
0penBrain
784109b160 [Sketcher] Improve a bit XZ plane mapping by using quaternions directly 2021-11-27 08:58:25 +01:00
sliptonic
3b9dfeb672 Merge pull request #5205 from sliptonic/bug/depthsteps
[PATH]  depthparams handles negative steps and finish step correctly. Unit tests
2021-11-26 20:24:25 -06:00
wmayer
dd92764eb5 PD: fix bug in TaskExtrudeParameters
When switching from Custom direction to Select reference mode do not jump back to Custom direction mode after selecting an edge
2021-11-27 02:22:37 +01:00
wmayer
c20cfd5db6 PD: code-refactoring of TaskExtrudeParameters 2021-11-27 01:45:08 +01:00
sliptonic
03f05b5ef9 make sure depthparams handles negative steps and finish step correctly
revised test
2021-11-26 13:27:44 -06:00
wmayer
87c3b522d0 PD: add enum class to TaskPadParameters to avoid to work with magic numbers 2021-11-26 16:58:59 +01:00
wmayer
26dd3ddeb3 PD: add enum class to TaskPocketParameters to avoid to work with magic numbers 2021-11-26 16:46:58 +01:00
wmayer
a58846c460 PD: create a common base class of TaskPocketParameters and TaskPocketParameters to reduce code duplications 2021-11-26 16:23:45 +01:00
Uwe
45cfae31cf [PD] revert a part of commit a6313dd6e
as discussed and polled in https://forum.freecadweb.org/viewtopic.php?f=8&t=64000
2021-11-25 03:19:31 +01:00
Alex Neufeld
d85d51a23c Revert "Addon Manager: Added VendorParts workbench icon"
This reverts commit 657aed6d5c37331a7773874ee9b1c06b63f34a01.
2021-11-24 14:25:42 -06:00
wmayer
e77c96ac18 Fix issue 0004791: DXF import fails for trivial circle 2021-11-24 18:27:21 +01:00
Chris Hennes
ded7adb798 Revert "Merge pull request #4626 from pavltom/GUI_TreeView_Item_Ordering"
This reverts commit b0452667c72f330323f6b3366f45bf039d05feef, reversing
changes made to b2d99f3fa7b4c7c305aed4a8d975a8624a6d590f.

See forums discussion: https://forum.freecadweb.org/viewtopic.php?p=549120
2021-11-24 09:03:35 -06:00
Yorik van Havre
86fd4f5152 Merge pull request #5180 from Roy-043/Draft-fix-draft-point-array-issue
Draft: fix array issue with Draft_Point and Part_Vertex.
2021-11-24 15:35:32 +01:00
Yorik van Havre
d4a2ddfbb6 Merge pull request #5179 from Roy-043/Draft-housekeeping-SS-shortcut-used-twice
Draft housekeeping: SS-shortcut used twice
2021-11-24 15:32:02 +01:00
Yorik van Havre
f1c8219ac5 Merge pull request #5183 from Roy-043/Draft-fix-toggle-grid
Draft: fix toggle grid issue.
2021-11-24 15:31:36 +01:00
0penBrain
ef98e36d67 [Sketcher] Change diameter symbol used in presentation string, fixes #4779
Standard symbol \u2300 currently used generates text misalignment/cutout on some environments
 Replaced with \uD8 (capital O with stroke) that solves the issue -- and looks better
2021-11-24 14:29:20 +01:00
carlopav
04176db50a Part: Auto-add primitives to active Part
Modified DlgPrimitives.cpp to allow auto adding the newly created object to active Std_Part.
Works with: box, cylinder, sphere, cone, torus, tube, primitives.
2021-11-23 21:44:53 +01:00
Uwe
a09e18b3bb [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
Uwe
165a09b3ed [PD] fix pad/pocket UI issues
- update the preview when the direction is changed in the dialog
- don't uncheck the direction viewbox without any reason
- only recompute once
- update the direction information on reversion
- only pocket: add missing code we have in pad (proper code merging will follow the next days)
2021-11-23 02:48:25 +01:00
0penBrain
f5b880563e [Sketcher][Bugfix] Fix crash when applying 'Constrain internal alignment' on contraints, fixes #4790 2021-11-22 20:08:07 +01:00
wmayer
8b7dadc1ab Gui: do not include generated ui file inside header file 2021-11-22 16:50:21 +01:00
wmayer
dd0afb0b0d 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
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
Ajinkya Dahale
d99bc1e9df [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
0penBrain
4116a59813 [Sheet][Bugfix] Reject alignment change for merged cell except top-left one 2021-11-21 20:57:33 -06:00
0penBrain
28d10fc6e6 [Sheet] Assert non-null pointer before using it 2021-11-21 20:57:33 -06:00
0penBrain
0e13882a65 [Sheet] Prevent duplicate call to 'nonNullCellAt' 2021-11-21 20:57:33 -06:00
Zheng, Lei
27f24c069d Test: fix test case
Adding dynamic property with an invalid name or existing name is now an
error, because there is no easy way for Python code to find out the name
of a property if it is auto renamed.
2021-11-21 19:03:53 -06:00
wmayer
049a34645b Mod: change error text of Python wrapper when trying to access deleted view 2021-11-21 19:57:21 +01:00
wmayer
7a58b7cfb0 TD: make MDIViewPagePy acting as sub-class of MDIViewPy 2021-11-21 17:33:19 +01:00
wmayer
e0bc8de4b4 Gui: in repr() of MDIViewPy write the typeid name 2021-11-21 15:44:06 +01:00