Commit Graph

163 Commits

Author SHA1 Message Date
Stefan Tröger
c5a2419e14 Extensions: Introduce classes and port App groups 2016-10-08 12:48:34 +02:00
wmayer
664cf65d26 fix -Wextra in PartDesign 2016-09-22 18:34:56 +02:00
wmayer
e8b36592c0 fix Coverity issues 2016-08-21 18:46:40 +02:00
Wolfgang E. Sanyer
7f4a437cc2 This commit adds getShape and setShape to TopoShape 2016-08-06 23:42:55 +02:00
wmayer
b4c084dd06 replace tabs with spaces 2016-07-15 10:44:19 +02:00
Sergo
9f0db2d900 refuse to create partdesign objects if no active body in document 2016-07-15 10:35:52 +02:00
DeepSOIC
f947101938 Attacher: use getModeName() instead of eMapModeStrings[]
getModeName() does range checking. eMapModeStrings[] will crash if out
of range.
2016-05-07 11:24:41 +02:00
DeepSOIC
505ec6a26d Attacher: change suggestion routine interface
When another bit of information was needed to be extracted from mode
suggestion routine, it felt like listMapModes had too many arguments.
So, the arguments have been collapsed into a struct. This triggered a
few namespace-related changes, which lead to massive search-and-replace
changes all over FreeCAD.

So the only functional change carried out is the addition of reference
types readout to info returned by suggestor.
2016-05-07 11:24:41 +02:00
wmayer
08df5cbc59 + remove 'using namespace Part' inside header file 2016-04-13 16:20:31 +02:00
wmayer
df48d1668b + remove 'using namespace Attacher' inside header file 2016-04-13 15:57:49 +02:00
Stefan Tröger
5f45bcbc94 PartDesign: Fix body command 2016-04-12 18:12:23 +02:00
Stefan Tröger
306611e8f8 Fix rebase error 2016-04-12 18:12:23 +02:00
Stefan Tröger
e7d8a1a9a4 Remove ShapeBinder2D
As profile based features can work with faces and wires now ShapeBinder can do everything that needed ShapeBinder2D before.
2016-04-12 18:12:23 +02:00
Stefan Tröger
4ec7fe6303 PartDesign: Adopt pattern to face based features 2016-04-12 18:12:22 +02:00
Stefan Tröger
f712f5e4ac 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
Stefan Tröger
4be81b01e4 Handle external references for revolution et all
The reference selection, used in multiple part design features, treated body external references not corectly.
2016-04-12 18:12:22 +02:00
Alexander Golubev
0cfc0cd424 Fix warnings introduced in new PartDesign
Mostly unused wariables and compare of signed & unsigned
2016-04-12 18:12:21 +02:00
Stefan Tröger
005c3db946 fix sketch classification for other body
hasObject does search recursive only in groups, but a body is not a group. Hence for sketches within a body this will always return false. Annother logic must be used to detect sketches in bodies.
2016-04-12 18:12:21 +02:00
Stefan Tröger
80fe971b55 fix sketch selection in part design
validateSketch was faulty: as every sketch is valid (non is removed) it could happen that the returned number was >0 but the iterator firstValidSketch was NULL nontheless. The routine needed to be udated to make snese and the usage in prepareSketchbased together with it.
2016-04-12 18:12:21 +02:00
Stefan Tröger
76c8cb3b69 add only a single reference copy 2016-04-12 18:12:21 +02:00
Stefan Tröger
ef2437bb5c Fix sketch on face of other body or part
The shapebinder object reduces the number of faces to 1, hence the subshape to select is always Face1 and not the original face name
2016-04-12 18:12:21 +02:00
Stefan Tröger
e7a96ac26f fix body booleans 2016-04-12 18:12:20 +02:00
Stefan Tröger
585e4cebb5 PartDesign/Gui: minor fix sWhatsThis of text 2016-04-12 18:12:20 +02:00
Stefan Tröger
2ff2d29f02 Fix crossreference handling 2016-04-12 18:12:20 +02:00
Stefan Tröger
5725dd7721 handle independent copies more gracefully 2016-04-12 18:12:20 +02:00
Stefan Tröger
3bd09ea570 change point of reference feedback for datums
On datum creation it is better to ask the user on OK than on tool activation, as he might hit cancel (and then the created references are till there) or even more important, he could add additional external references within the dialog. The disadvantae is that if the user sets "cross reference" ge gets asked again every time he opens and leaves the dialog.
2016-04-12 18:12:20 +02:00
Stefan Tröger
d5e035741a ask user if he creates inter part/body references 2016-04-12 18:12:20 +02:00
Stefan Tröger
e58ae2b616 Setup ShapeBinder Viewprovider and command 2016-04-12 18:12:19 +02:00
Stefan Tröger
9969aac671 fix dependent copy references
to make them work with sketches an additional Part2DObject reference needed to be created
2016-04-12 18:12:19 +02:00
Alexander Golubev
1a26f7551f PartDesign: add Origin to the Body and unstrap the module from the Parts 2016-04-12 18:12:18 +02:00
Alexander Golubev
2c2d155ee9 OriginGroup: add new abstraction layer between the Part and the GeoFeatureGroup 2016-04-12 18:12:18 +02:00
Alexander Golubev
797d6d3a11 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
abc925b62e PartDesign/Gui: Make partDesign's add sketch command Workflow-aware 2016-04-12 18:12:17 +02:00
Alexander Golubev
c4f094bba4 PartDesign/Gui: rename some fonctions in ReferenceSelection.cpp
e.g. getPythonStr -> buildLinkListPythonStr etc
2016-04-12 18:12:17 +02:00
Alexander Golubev
c782a11aab PartDesign/Gui: Move various utility stuff from Workbench to a separate file
Also do some header cleanup.
2016-04-12 18:12:17 +02:00
Alexander Golubev
444986e88a PartDesign/Gui: move body commands to a separate file 2016-04-12 18:12:16 +02:00
Alexander Golubev
8c5d514b18 PartDesign: Body rework - add BaseFeature property and make Tip always point to solid 2016-04-12 18:12:16 +02:00
Alexander Golubev
55f3f52f54 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
Alexander Golubev
9db8afd716 PartDesignGui: move shared code for all dressUp features into common place.
Also this allows the old workflow for thickness and draft features.
2016-04-12 18:12:15 +02:00
Alexander Golubev
86db4c3215 PartDesign/Gui: enable sketches on datum planes inside bodies 2016-04-12 18:12:14 +02:00
Alexander Golubev
e586f55fb2 PartDesign/Gui: more old workflow support
* remove an error message if adding a sketchbased feature without a body
* add champfer or fillet old workflow support

Also rework finishFeature() so at least champfer and fillet may be
inserted into any place of any apropriate body(not only the active one) of the body.
2016-04-12 18:12:14 +02:00
Alexander Golubev
4590305921 PartDesign/Gui: enhance the TaskFeaturePick with new cotegory of sketches: notInBody
Also add option tp show already used sketches and fix some spacing.
2016-04-12 18:12:14 +02:00
DeepSOIC
16e4ce20f0 PartDesign workflow without part/body
PartDesign: make datum features work outside of body/part
PartDesign old workflow: remove a few messageboxes about no part
PartDesign: old workflow: multitransform without body

Still has visibility issues, but generally works.
2016-04-12 18:12:14 +02:00
Stefan Tröger
a8bd2f6f7f prevent part design features from accidently cross referencing 2016-04-12 18:12:14 +02:00
Stefan Tröger
318c65eafd fix independent copy and cross reference 2016-04-12 18:12:14 +02:00
Stefan Tröger
a35c231d2a first take on enhanced feature pick task 2016-04-12 18:12:14 +02:00
Stefan Tröger
986623f462 fix loft tool naming 2016-04-12 18:12:13 +02:00
Stefan Tröger
d980952d31 fix body and part tool texts 2016-04-12 18:12:13 +02:00
DeepSOIC
72c70bcc50 Datum UI: fixes
* fix messagebox not popping when clicking OK but status is error
* accept preselection
* unify code for all datum commands
* edit selected datum if type matches, instead of creating new one
2016-04-12 18:12:13 +02:00
DeepSOIC
9e440b955c PartDesign: transfer Datums to become AttachableObjects
Crude and quick, needs cleanup.
2016-04-12 18:12:12 +02:00