Commit Graph

101 Commits

Author SHA1 Message Date
David Osterberg
59dd9d72c5 PartDesign: Fix throughall distance when throughall is used together with midplane 2021-02-20 20:12:47 +01:00
David Osterberg
bff55def04 PartDesign: Fix hardcoded through all distance in ProfileBased
Before the throughall distance was 10 m, which is not enough for
many applications. The fix is to use the bounding box of the base shape
together with the sketch profile to calculate dynamically a large enough
length.
2021-02-12 18:37:56 +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
wmayer
ad48dd2538 PartDesign: [skip ci] Improve revolution function
+ Fix hard crash when selecting an edge or face of the created feature before selecting option to choose a reference.
+ In ProfileBased::getAxis() convert OCCT into FreeCAD exception to simplify handling of calling instances.
+ Change return value of getReferencedSelection() from void to bool to mkae it easier for calling instance to detect if the selection failed.
  This is needed to avoid to add invalid items to the combo box of the revolution task panel
2020-10-14 15:20:52 +02:00
donovaly
91ef59fdbe [PD] allow to pad in any direction
It saves a lot of work if one can directly pad in any direction and OCC allows this.

This PR adds the possibility to define a custom vector for the padding direction.
2020-09-12 16:33:44 +02:00
wmayer
e9ce75d544 LGTM: [skip ci] fix: Empty branch of conditional
An empty block after a conditional can be a sign of an omission and can decrease maintainability of the code.
Such blocks should contain an explanatory comment to aid future maintainers.
2020-07-26 15:49:14 +02:00
wmayer
5ece278c94 remove deprecated std::binary_function 2020-05-11 13:46:37 +02:00
Zheng, Lei
46618410ce PartDesign: allow multiple faces in feature ProfileBased 2020-03-20 16:38:00 +01:00
wmayer
bd1670fd76 make UpToLast option for pad working again 2019-06-17 16:14:13 +02:00
wmayer
4e5d6be326 fixes #0003979: Pocket with mode 'up to face' doesn't work correctly 2019-06-15 23:54:10 +02:00
Abdullah Tahiri
7b0a501c0a PartDesign: 3rdParty to PCH 2019-05-02 07:12:27 +02:00
wmayer
047a18ccb5 PVS: V601 The bool type is implicitly cast to the double type
PVS: V668 There is no sense in testing pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error
2019-03-13 14:09:10 +01:00
wmayer
00de5bb7ad Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
DeepSOIC
ae59630fa4 PartDesign: Refine property for primitives #3488 2018-09-11 07:16:49 +02:00
Markus Lampert
e13c09235f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
luz.paz
9167064fc1 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
DeepSOIC
1cb2d52dc2 PartDesign: #2683 add Refine property
resolves #2683

Adds Refine property to sketch-based and transformation features. The
property is initialized according to preferences, and can be altered in
property editor on per-feature basis.
2018-01-20 13:58:39 +01:00
wmayer
065be5bb77 fixes #0003141: Unexpected behaviour using pad to face on padded shape binder 2018-01-05 19:35:21 +01:00
Kurt Kremitzki
0607501360 PDN: Check both parallel and antiparallel cases before trying Revolve 2017-08-12 14:09:39 +02:00
wmayer
6fd846ee22 handle exception thrown by BRepBuilderAPI_RefineModel 2017-07-23 15:46:57 +02:00
AjinkyaDahale
f139ecd22b Possible solution to a problem in pad/pocket up-to-face
Somehow we weren't able to pad/pocket up-to-face when the profile sketch
is made on a datum plane
2017-03-19 18:09:14 -03:00
Sergo
eda3620b71 couple of tests and fix to avoid crash on selected edge 2017-03-18 19:09:16 +01:00
Sergo
012f377e0b same axis and profile only for sketches 2017-03-18 19:09:16 +01:00
sergo
a2e35660cc fix getAxis for faces 2017-03-18 19:09:16 +01:00
Sergo
b55f33b41e set referenceaxis properly and fix getaxis 2017-03-18 19:09:16 +01:00
Kunda
9410e751e9 source typo fixes pt4 (only on py3 merged code) 2017-03-02 13:47:21 +01:00
wmayer
bab25b2719 remove duplicate and unused class 2016-11-07 12:28:22 +01:00
DeepSOIC
c612745902 PartDesign: port to use FaceMaker
Minimalistic port. Only re-use code that was duplicate before.
2016-10-01 23:13:44 +03:00
wmayer
dd7c91ddcf fix -Wextra in PartDesign 2016-09-22 18:34:56 +02:00
Wolfgang E. Sanyer
d1d2f1f811 This commit adds getShape and setShape to TopoShape 2016-08-06 23:42:55 +02:00
Stefan Tröger
609da4749a fixes #0002512 Allow multi-face part design tools 2016-05-18 23:54:18 +02:00
wmayer
f439a88c69 + remove 'using namespace Part' inside header file 2016-04-13 16:20:31 +02:00
Stefan Tröger
12e793bde8 PartDesign: Adopt pattern to face based features 2016-04-12 18:12:22 +02:00
Stefan Tröger
ae9dac71d7 PartDesign: Modeling features work with faces
-Rename Sketchbased to ProfileBased to show new behavior
-Adopt ProfileBased to make the relevant helper functions work with faces too
-Adopt features for unified use of helper functions
-Adopt commands to allow face selection
2016-04-12 18:12:22 +02:00
Alexander Golubev
3ed51ac4bd PartDesign: add Origin to the Body and unstrap the module from the Parts 2016-04-12 18:12:18 +02:00
Alexander Golubev
305151be34 App/Origin: big refactoring
- Rebase App::Origin on App::DocumentObject
 - Keep all control over the Origin structure inside the Origin and it's
   ViewProvider
 - Add OriginFeature class as common base for App::Plane and App::Line
 - Rebase App::Plane and App::Line on top of newly created class and
   move to the file.
 - Change Origin's ViewProvider API associated with temporary display
 - Lots of associated changes to files
 - Several minor fixes
 - Lots of new bugs
2016-04-12 18:12:18 +02:00
Alexander Golubev
af385f1c57 PartDesign/Feature: add an optional parameter to getBaseObject() to prevent it from throwing exceptions
In most cases getBaseObject() is used with an exception handler which
only detects if it failed but not the reason. This modification allows
to use it without excess exception handlers.
Also add the same parameter to SketchBased::getVerifiedSketch().
2016-04-12 18:12:15 +02:00
DeepSOIC
92a7811618 Revolution: fix failure on sketch edges used as an axis
PartDesign Revolution used to fail, when an edge of a sketch was
selected as an axis of revolution. This is fixed by this commit.
Also, made it support selecting an edge from the sketch the revolution
itself is made from.
2016-04-12 18:12:14 +02:00
DeepSOIC
288873f13a PartDesign: accomodating to sketch's multisupport
* FeatureSketchBased getSupportFace check for mapping mode
* Fixes failure to place sketches on DatumPlanes
2016-04-12 18:12:12 +02:00
DeepSOIC
f20ff5a8d4 PartDesign: refactor positionBySketch
Rename it to positionByPrevious. Rewrite.
Rewrite SketchBased::transformPlacement.
2016-04-12 18:12:11 +02:00
DeepSOIC
220c88edb6 PartDesign: tidy up sketch support and base feature confusion
Not complete, transformPlacement and positionBySketch are pending...
2016-04-12 18:12:11 +02:00
DeepSOIC
6aa31c33f4 Revolution: fix crash when selecting stuff during task 2016-04-12 18:12:10 +02:00
Stefan Tröger
eba61e360d make origin work correct with multiple parts 2016-04-12 18:12:08 +02:00
Stefan Tröger
4f43bdc814 make origin lines usable in groove 2016-04-12 18:12:08 +02:00
Stefan Tröger
38128e57bd make origin lines usable in revolution 2016-04-12 18:12:08 +02:00
Stefan Tröger
b0817ff086 allow non-sketch based additive and subtractive features 2016-04-12 18:12:06 +02:00
jrheinlaender
ef76cf8b52 Added some comments about things to be fixed in the future 2016-04-12 18:11:55 +02:00
jrheinlaender
be7c6adc21 Allow moving features between bodies from context menu of tree view 2016-04-12 18:11:53 +02:00
jrheinlaender
12bf1d58f6 Allow extruding from a datum plane to another face or plane, optionally with an offset 2016-04-12 18:11:53 +02:00
jrheinlaender
56d60a297f Revolution/Groove: Check that rotation axis is coplanar with sketch plane 2016-04-12 18:11:51 +02:00