Commit Graph

22 Commits

Author SHA1 Message Date
DeepSOIC
71f70eb855 AttachEngine: fix crash when referenced objects get deleted
... by verifying if the pointers equal to objects contained in all open
documents. Not terribly good, but I can't think of a situation where
doing this search might cause trouble.
2016-05-14 02:14:51 +03:00
DeepSOIC
162378220d Attacher: preparations for Py interface of shape type system
+ add getModeByName to AttachEngine
2016-05-13 19:54:44 +03:00
DeepSOIC
53bd9b674b Attacher: fix wrong inertial calculation on solids
was using surface calculation instead of volume...
2016-05-13 19:54:44 +03:00
DeepSOIC
6ffa0c9b37 Attacher: initialize member variables
They got garbage values on creation, as was revealed when testing Py
interface.
2016-05-13 19:54:44 +03:00
wmayer
1ccab846e2 + apply f3nix:fix-gcc-warnings-1 2016-05-08 12:00:26 +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
DeepSOIC
9d19bf023a Attacher: new modes: Inertia CS, Inertia axes
Modes added:
3D and plane attachment: Inertia CS
Line attachment: Inertia axes
This commit may serve a good example of how to add new attachment modes.
2016-05-07 11:24:41 +02:00
DeepSOIC
d12141d1fb Attacher: new mode: center of mass (point attacment) 2016-05-07 11:24:41 +02:00
DeepSOIC
2b057ef192 Attacher: for reachable modes, display what's to add
For grayed out modes in list, show what's needed to get to the mode.
Like so:
"Normal to edge (add Vertex)"
2016-05-07 11:24:41 +02:00
DeepSOIC
e6911adc50 Attacher: display modes that can be reached
Attachment mode list used to display only the modes that fit current
references. Now, modes that can be reached by adding more references are
listed too, but grayed out.
2016-05-07 11:24:41 +02:00
DeepSOIC
314617f16a Attacher: create special source file to contain attacher strings 2016-04-21 20:55:42 +03:00
DeepSOIC
d6a3d1b140 Attacher: fix superPlacement applied twice in some cases
superPlacement was applied twice on line and point attachment modes that
re-use 3d attachment modes code. Fixed.
2016-04-21 20:55:42 +03:00
DeepSOIC
431373823d Attacher: split Attacher3d and AttacherPlane
Even though they share all the functionality now, I split them, to allow
independent user-friendly mode names.
2016-04-21 20:55:42 +03:00
wmayer
5de9696365 + fix warnings:
-Wsign-compare, -Wunused-variable, -Wunused-function, -Wswitch
+ fix Qt issues
2016-04-13 14:26:38 +02:00
Stefan Tröger
4119bb7adc Fix compilation issue in Attacher code 2016-04-12 18:12:24 +02:00
Alexander Golubev
8bca27463e Part/Attacher: remove a couple of no more valid asserts 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
Stefan Tröger
d2f4410c1e fix datum crash when origin is selected 2016-04-12 18:12:13 +02:00
DeepSOIC
98717f010a Attacher: proximity modes
The modes that base on distToShape:
* a line that connects the closest points,
* the actual points
2016-04-12 18:12:12 +02:00
DeepSOIC
40592e6055 Attacher: line and point AttachEngines. Other changes.
* propose attachment modes
* refactor setUp and Copy
* split off postprocessing from 3D to reuse in 1D and 0D calculations
* AttachableObject: fix error printout in onChange
* AttachableObject: no more defaults to Attacher3D
* implementation of lines and points attachment (some of the proposed modes).
* refactor getShapeType, add getShapeType(obj, sub); add a flag to eRefType enum, indicating that referenced thing is a whole object that has placement.
* change readLinks to be static, and obtain shape types in the process.
* test mode enums lengths equality
* extend ObjectXY to work on conics.
* Fix upside-down sketches attached as TangentPlane on most shapes.
* Fix crash when a shape of unlisted type is in the links.
* fix attaching to datum lines go crazy because of infinities.
* abs->fabs
* support for App::Line
* Add namespace qualifiers to TYPESYSTEM_SOURCE-like stuff
2016-04-12 18:12:12 +02:00
DeepSOIC
ad01411efc Attacher: fix crash of suggestor on compounds 2016-04-12 18:12:12 +02:00
DeepSOIC
42ecc24ec5 Sketcher: new attachment engine 2016-04-12 18:12:12 +02:00