Commit Graph

1551 Commits

Author SHA1 Message Date
wmayer
d05ae18340 fix -Wreturn-std-move 2019-09-07 15:19:28 +02:00
wmayer
b14cf8a00d extend convertTo function to also support SbRotation/Base::Rotation 2019-09-06 21:29:51 +02:00
DeepSOIC
ec7c18bef3 Gui: add tags for TempoVis
Tags can be used to identify TV instances in the stack.  This is mostly for add-ons, for Part-o-magic in particular, who may want to insert some visibility automation in specific places in the stack.
2019-09-04 11:37:48 -03:00
mwganson
a0316e9400 [Geometry check] open settings page first before running check, add 2 new navigation buttons: settings and results, allow to collapse results box 2019-09-03 17:37:48 +02:00
mwganson
dc86201bb0 [GeometryCheck] add new settings options 2019-09-03 17:37:34 +02:00
wmayer
05649e3848 include missing header 2019-09-01 17:25:42 +02:00
Zheng, Lei
405ec26e3a Part: fix missing signal disconnect in TaskFaceColors 2019-08-30 15:47:17 +02:00
Zheng, Lei
b78761cf3c Part: fix VBO update on multiple gl context
Multiple OpenGL context is caused by linking some shape object from
external documents. The VBO update must be triggered for all contexts.
2019-08-30 14:55:14 +02:00
Zheng, Lei
e196d33549 Part: fix TaskAttacher external editing 2019-08-30 14:53:50 +02:00
Zheng, Lei
f362229041 Part: avoid touching in ViewProviderAttachExtension mergeOverlayIcons
ViewProviderAttachExtension::extensionMergeOverlayIcons() calls
AttachExtension::positionBySupport() which will always touch the
extended object. This may cause recomputation problems, e.g a datum
that is always touched, because normal recomputation trigger tree
view update by a timer, tree view refreshes the icon, datum gets
touched again.
2019-08-30 14:46:38 +02:00
mwganson
663c975aa0 [Part workbench] add command create points object from mesh 2019-08-27 23:40:24 +02:00
Mark Ganson TheMarkster
25041288b1 Update Part.qrc 2019-08-27 23:40:15 +02:00
mwganson
6be089b006 [Part workbench] add Create points object from mesh command 2019-08-27 23:40:06 +02:00
sdh4
8928f863fe Part.BSplineSurface.buildFromPolesMultsKnots(): Fix 'Truth value of an array ... use a.any() or a.all()' when explicit knots or weights provided
Calls to BSplineSurface.buildFromPolesMultsKnots() with explicit knots or weights fail in recent versions of FreeCAD (tested on 0.18.3 with python3) with the message 'The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()'. 

This trivial change follows the pattern used later in the function of explicit comparisons with Py_None, replacing PyObject_Not() and PyObject_IsTrue()  when they are used to determine whether explicit weights or knots have been provided.
2019-08-27 21:48:52 +02:00
wmayer
a79ce8d823 add missing std:: namespace to build on Debian 10 2019-08-21 23:56:46 +02:00
wmayer
bbea71ce5f add missing std:: namespace to build on Debian 10 2019-08-21 19:22:01 +02:00
wmayer
fb3eb85586 add missing std:: namespace to build on Debian 10 2019-08-21 16:31:00 +02:00
wmayer
6795a28c99 add missing std:: namespace to build on Debian 10 2019-08-21 00:12:50 +02:00
wmayer
b594274407 add missing header and forward declaration 2019-08-17 23:14:45 +02:00
wmayer
7f4378a87e Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
+ fix -Wpessimizing-move (Geometry::clone: moving a temporary object prevents copy elision -> remove std::move call here)
2019-08-17 19:52:32 +02:00
luz.paz
3bb578c825 Fix more typos 2019-08-17 15:32:49 +02:00
luz.paz
b869b6e29e Fix typos in various src/Mod directories 2019-08-17 15:32:49 +02:00
luz.paz
63a577fe07 Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
Zheng, Lei
de93446a1c Test cases changes
Slight adjustment of various test cases due to various API changes.
2019-08-17 15:32:48 +02:00
Zheng, Lei
a460fdc8b6 Import: add new implementation of STEP importer/exporter
For better supporting Link and groups. The original implementation can
still be used by uncheck the STEP import setting 'Use Link Group'.
2019-08-17 15:15:47 +02:00
Zheng, Lei
f028ba42ff Part: changes to Part Module
* Added Part::Feature::getTopoShape/getShape() function that can obtain
  shape from any object with proper implementation of getSubObject(). It
  can even construct compound from group object with proper implementation
  of getSubObjects().

* Modified ViewProviderExt to work on any object, because it now obtain
  the shape using Part::Feature::getShape()

* Modified various Part features to obtain base/tool shapes using
  Part::getShape(), which allows them to be any type of object,
  including Link and groups.

* Modified various Part command to relax type requirement on selected
  objects.

* Add support of link and group to dimension, and add dimension refresh
  command

* Support link and group in simple command command, and add a few more
  copy command variations.

* Add special handling of 'Shape' attribute in PropertyContainerPy and
  use Part::Feature::getShape() to return shape for any object without
  Shape property. This allows many python feature work with any object
  without modification.

* GeometrySurface/CurvePy, add convenience attribute 'Rotation'

* TopoShapePy:

    * Extended support of sub shape attribute, e.g. Compound1, Solid2,
      SubShape3 ('SubShape' is used to access child shape of a compound)

    * makeWires(), new API to sort and return wires given a list of edges.

    * transformed/translated/rotated/scaled(), return a new shape with
      some transformation.

    * findPlane(), find the plane of a planar shape

    * isCoplanar(), check if two shape are coplanar
2019-08-17 15:08:35 +02:00
Zheng, Lei
f7edaabe43 Gui: add box geometry element selection command
Implement box element selection that support linked and grouped objects.
Also modified original box selection command to support the same with
the same code.
2019-08-17 15:08:33 +02:00
Zheng, Lei
5214f5b7ce Gui: add coinRemoveAllChildren to work around Coin3D bug
See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff

Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.

All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
2019-08-17 14:52:11 +02:00
Zheng, Lei
c9ba972d26 Gui: add support of selection context
The patch implements context-aware selection and rendering in 3D view.

Please check [here](https://git.io/fjiY5) for more details, including
the following 'Render Caching' section.

The patch also includes modification of View3DInventorViewer to support
always-on-top selection rendering using the secondary selection context
and the new coin node SoFCPathAnnotation.

Another small change in SoQtQuarterAdaptor for more responsive frame
rate display. The original implementation reports skewed frame rate
in the presence of long idle period.
2019-08-17 14:52:10 +02:00
Zheng, Lei
6731e83bf5 App: add New APIs for future Link function
DocumentObject:

* getSubObject(): the most important API for Link to work with
  hierarchies. The function is a inspired from and replaces the
  getPySubObjects(). It returns a child object following a dot separated
  subname reference, and can optionally return accumulated
  transformation, and/or a python object of the refered
  sub-object/element. The default implementation here is to look for
  link type property, and search for the referenced object. This patch also
  include other specialized implementation of this API, such as
  (GeoFeature)GroupExtension (through extensionGetSubObject()),
  PartDesign::Body, and so on. A link type object is expected to
  call the linked object's getSubObject() for resolving.

* getSubObjectList(): helper function to return a list of object
  referenced in the given subname.

* getSubObjects(): return a list of subname references of all children
  objects. The purpose of this function is similar to
  ViewProvider::claimChildren().  Container type object is expected to
  implement this function.  The reason it returns subname references
  instead of just object is to allow the container to skip hierarchies.
  For example, the Assembly3 container uses this to skip the constraint
  and element group.

* getLinkedObject(), obtain the linked object, and optionally with the
  accumulated transformation. It is expected to return a linked object
  or the object itself if it is not a link. In case there are multiple
  levels of linking involved, this function allows the caller to retrieve
  the linked object recursively.

* hasChildElement(), set/isElementVisible(), controls the children
  visibility for a group type object. Because the child object may be
  claimed by other objects, it is essential to have independent control
  of children visibilities. These APIs are designed to abstract how
  group manages the child visibility. For performance reason, these
  function are meant to control only the immediate child object.

* resolve(), helper function to parse subname reference and resolve the
  final object, and optionally the immediate parent of the final object,
  the final object reference name (for calling `set/isElementVisible()`),
  and the subname reference if there is one.

* touch(), add optional argument 'noRecompute' for better backward
  compatibility with the NoRecompute flag. By default, touch() causes
  recompute unless noRecompute is true

* signalChanged/signalBeforeChange, two new signal for tracking changes
  of a specific object.

* getViewProviderNameOverride(), return a string of the view provider
  type of this object. This allows Python class to override the view
  provider of an object. This feature will be used by ViewProviderLink
  which is designed to work with any object that has LinkBaseExtension.

* canLinkProperties(), will be used by Gui::PropertyView to display
  linked object properties together with the object's own properties.

* redirectSubname(), will be used by Gui::Tree to allow an object to
  redirect selection to some other object when (pre)selected in the tree
  view.

* Visibility, new property serve as the same purpose as view provider
  property of the same name. It is added here so that App namespace
  code can check for visibility without Gui module. This is useful,
  for example, when constructing a compound shape of a container that
  respects the children visibility.

* (has)hasHiddenMarker(), return or check for a special sub-element
  name used as marker for overriding sub-object visibility. Will be
  used by Gui::ViewProvider, it is put here for the same reason as
  adding Visibility property.

* getID(), return object internal identifier. Each object is now
  assigned an integer identifier that is unique within its containing
  document.

Document:

* ShowHidden, new property to tell tree view whether to show hidden
  object items.

* signalTouchedObject, new signal triggered when manually touch an
  object when calling its touch() function

* getObjectByID(), get object by its identifier

* addObject() is modified to allow overriding view provider

* has/getLinksTo(), helper function to obtain links to a given object.

Application:

* checkLinkDepth(), helper function to check recursive depth for link
  traversal. The depth is checked against the total object count of
  all opened documents. The count (_objCount) is internally updated
  whenever object is added or removed.

* has/getLinksTo(), same as Document::has/getLinksTo() but return links
  from all opened documents.

GroupExtension/OriginGroupExtension/DatumFeature/DatumCS/Part::Feature:
implement sepcialized getSubObject/getSubObjects().
2019-08-17 14:52:08 +02:00
donovaly
7a5fe3e606 DlgSettingsGeneral.ui: hide unused option from dialog 2019-08-02 17:39:48 +02:00
donovaly
927a83a794 TaskAttacher.ui: clarification and add tooltip 2019-07-21 18:59:03 +02:00
luz.paz
0f36eedc0b Fix typos
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller`
2019-07-16 11:21:52 -03:00
donovaly
9a594a8994 add missing tooltips for part import/export 2019-07-16 13:23:40 +02:00
Abdullah Tahiri
50eff2a5ee MSVC also fails to automatically move if no elision possible 2019-07-14 12:37:37 +02:00
Abdullah Tahiri
b13c564dc2 Enable RVO for any other than old GCCs like 4.8 2019-07-14 12:37:37 +02:00
Abdullah Tahiri
be79d3f6a0 GeometryExtensions: Add override when overriding virtual functions (EMCPP Item 12) 2019-07-14 12:37:37 +02:00
Abdullah Tahiri
f68f64b981 GCC 4.8 fails to covert lvalue during RVO optimization 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
12e9b6c60a old GCC C++11 specialisation in a different namespace and moving template instantiations after all specialisations 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
1d2c45c845 Base: Move std::make_unique to Base 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
006b470a20 Part: geometry extensions minor code clean up 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
4d86374cb0 Part: geometry extensions several memory leak fixes 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
21e1ccbe9b Part: Default geometry extensions for boolean and double 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
331817d1b7 Part: Geometry extension set with unique id (type+name) and list based getExtensions python 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
8618dfd3c6 Part Geometry: get an extension from type or name, also from python 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
d8e99c1923 Part:: Geometry container extend hasExtension to type and name 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
4d9d3b0c83 Part: Geometry - methods to remove extensions by name and type 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
1700760e0b Part: Default geometry extensions make sure built-in types are initialised 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
d99e667e30 Part: Command to show list of extensions from Python 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
665fcda4dc Part: Fix assignment after reserve of weak_ptr causes segfault 2019-07-14 12:37:33 +02:00