Commit Graph

13699 Commits

Author SHA1 Message Date
Zheng, Lei
d049eed121 Draft: fix for python2 2019-08-17 15:32:50 +02:00
Zheng, Lei
fe0548cad5 Sketcher: auto undo when canceling constraint editing 2019-08-17 15:32:50 +02:00
Zheng, Lei
0f66755843 Sketcher: fix external editing 2019-08-17 15:32:50 +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
88b5b2a845 Draft/Arch related changes
* Add Draft_LinkArray and Draft_PathLinkArray that uses link for both
  data and visualization, which supports linking external objects

* Add link group support for draft snap

* Fix ArchWindows expression ambiguity
2019-08-17 15:32:47 +02:00
Zheng, Lei
cfc6c0ee89 Path changes
* Relaxed valid base shape requirement, as long as it can return a
  shape using part.getShape()

* Improve ViewProviderPath performance by sharing the same selection
  observer

* Relocate libarea binary installation
2019-08-17 15:15:48 +02:00
Zheng, Lei
2727ddc7c0 Fem: minor changes 2019-08-17 15:15:47 +02:00
Zheng, Lei
cd2b7e297c PartDesign changes
* Mostly for supporting in-place editing

* Add new SubShapeBinder that support cross coordinate system,
  external, and sub-object binding
2019-08-17 15:15:47 +02:00
Zheng, Lei
11321bb996 Spreadsheet changes
Various changes to support in-place editing, and more.
2019-08-17 15:15:47 +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
e90d09dc40 TechDraw: Link related changes
* Support link and group objects

* Support view sync by implementing view provider API getMDIView()

* Use handleChangedPropertyType() for object migration instead of
  reimplementing Restore() because of a lots of changes in
  PropertyContainer::Restore().

* Various other small fixes.
2019-08-17 15:15:46 +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
fc87332709 Gui: Placement/DatumCS view provider changes
* Add always zoom invariant and always on top rendering to
  ViewProviderDatumCS

* Add a new utility class AxisOrigin for more efficient axis rendering.
  Also exposed to python.

* Change ViewProviderPlacement to use AxisOrigin for rendering.
  A single instance of AxisOrigin is shared by all
  ViewProviderPlacement. Selection context is used to distinguish among
  different instances.
2019-08-17 15:08:34 +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
d4ac072306 Gui: support in-place editing
The link support means that an object can now appear in more than one
places, and even inside a document different from its own. This patch
adds support for in-place editing, meaning that the object can be edited
at correct place regardless where it is.

See [here](https://git.io/fjPIk) for more info about the relavent APIs.

This patch includes two example of modifications to support in-place
editing. One is the ViewProviderDragger, which simply adds the dragger
node to editing root node by calling
View3DInventorViewer::setupEditingRoot(dragger). The other much more
complex one is ViewProviderSketch which calls setupEditingRoot(0) to
transfer all its children node into editing root. ViewProviderSketch
also includes various modifications to command invocation, because we
can no longer assume the active document is the owner of the editing
object.

This patch also includes necessary modification of the 'Show' module to
support in-place editing.
2019-08-17 15:08:32 +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
b4751145b4 Spreadsheet: convert PropertySheet to link type property
PropertySheet is changed to derive from PropertyExpressionContainer,
which makes it a link type property that is capable of external linking.
It now relies on the unified link property API to manage object
depenency, and tracking of object life time, relabeling, etc.

This patch also includes various fix and improvement of Spreadsheet,
such as improved recompute efficiency, correct handling of document
label change, etc.
2019-08-17 14:52:09 +02:00
Zheng, Lei
ced27a69c6 PropertyExpressionEngine: convert to link type property
PropertyExpressionEngine is changed to derived from a new class
PropertyExpressionContainer, which is in turn derives from
PropertyXLinkContainer. This makes PropertyExpressionEngine a link type
property that is capable of external linking. It now uses the unified
link property APIs for dependency management and tracking of object
life time, re-labeling, etc.

ObjectIdentifier is modified to support sub-object reference, but is
not exposed to end-user, because expression syntax is kept mostly
unchanged, which will be submitted in future PR. There is, however,
one small change in expression syntax (ExpressionParser.y) to introduce
local property reference to avoid ambiguity mentioned in
FreeCAD/FreeCAD#1619

Modified Expression/ExpressionModifier interface to support various link
property API for link modification.
2019-08-17 14:52:09 +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
Yorik van Havre
5ca5f906d9 Arch/TD: Support for Arch BuildingParts in TD ArchView 2019-08-16 19:03:49 -03:00
sliptonic
892bfa92a4 Merge pull request #2412 from mlampert/feature/misc-improvements
Path: Feature/misc improvements
2019-08-16 15:49:31 -05:00
Yorik van Havre
80a35c6325 Merge branch 'master' of github.com:FreeCAD/FreeCAD 2019-08-16 16:41:08 -03:00
Yorik van Havre
7ee75eae6a Draft: Shape2Dview now supports buildingparts 2019-08-16 16:40:50 -03:00
Yorik van Havre
af65305d45 Arch: misc small fixes to buildingpart 2019-08-16 16:38:43 -03:00
sliptonic
912fda45f3 Merge pull request #2426 from dubstar-04/Fixture-Travel-Height
[Path] Make the z traverse height equal to the stock z max plus the clearanc…
2019-08-16 14:24:23 -05:00
sliptonic
76d55281c9 Merge branch 'master' into feature/misc-improvements 2019-08-16 13:38:10 -05:00
sliptonic
f4598d968e Merge branch 'master' into HoleDiaDetection 2019-08-16 12:15:56 -05:00
Bernd Hahnebach
80bdd21471 FEM: code formating, command manager, more formating 2019-08-16 08:33:30 +02:00
Bernd Hahnebach
657b17594a FEM: code formating, command manager, fix indents 2019-08-16 08:33:24 +02:00
Bernd Hahnebach
b9ec1e15be FEM: code formating, commands, some new lines 2019-08-16 08:33:17 +02:00
Bernd Hahnebach
9bb420caf4 FEM: code formating, commands, use double quotes instead of single ones 2019-08-16 08:33:12 +02:00
Bernd Hahnebach
2c9eef4bbb FEM: code formating, small ones 2019-08-16 08:33:06 +02:00
Bernd Hahnebach
08a150ca95 FEM: ccx tools, small indent code formating 2019-08-15 08:40:01 +02:00
Yorik van Havre
b20a706fc6 Arch: Reorganized view properties of buildingParts 2019-08-15 00:20:24 -03:00
Yorik van Havre
c1c5210654 Arch: Minor fixes to IFC export 2019-08-14 17:56:15 -03:00
Bernd Hahnebach
bdf1abacc7 Arch: make new property to use shape color instead of material color working for all Arch objs 2019-08-14 21:41:47 +02:00
Yorik van Havre
09d0b2d0e7 Arch: Merge of PR #2259 - Fix ifc project 2019-08-14 16:04:52 -03:00
Daniel Wood
c15ef69f02 Merge branch 'master' into Fixture-Travel-Height 2019-08-14 19:06:19 +01:00
furti
a12b851ab3 Arch: Fix missing cache value for SectionPlane
When the Arch SectionPlane was rendered via TechDraw in Solid mode, the
last parameter "fillSpaces" was not set for the svgcache.
So the next render operation threw an exeption because there where only
4 instead of 5 elements in the cache list.
2019-08-14 14:43:13 -03:00
vocx-fc
bb96ff25df Draft: importSVG, commit 19f87739 accidentally introduced blady merged code that produced syntax errors; then 1ad65467 tried to fix it by removing the syntax errors; however a large block of text needs to be removed as well; this was supposed to happen in pull request #2418; however, that pull request no longer merges cleanly so it was withdrawn; this commit finally fixes the problem. 2019-08-14 14:41:58 -03:00
luz.paz
cab148a1ee [AddonManager] Add CADExchanger workbench icon
Manually created this .svg file. This PR also fixes a previous commit typos for AirplaneDesign and A2plus workbenches that fail to make them display correctly in the AddonManager GUI
2019-08-14 14:40:07 -03:00
luz.paz
144afc52f5 [AddonManager] Add ThreadProfile WB icon
+ fix whitespace issue in .qrc file
2019-08-14 14:38:52 -03:00
luz.paz
7d6d267c2d Fix issue in previous commit 2019-08-14 14:36:53 -03:00
luz.paz
020a66cddf Fix misc. 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 -L od,orign,orginx,orginy`
2019-08-14 14:36:53 -03:00
vocx-fc
d1b19f7f3c Draft: DraftTrackers.py, the docstrings need triple quotes and be next to the method or class name so they are correctly picked up by Doxygen or Sphinx to generate documentation; this complies with PEP 257 2019-08-14 14:34:31 -03:00
vocx-fc
24086baef4 Draft: DraftTools.py, the docstrings need triple quotes and be next to the method or class in order to be picked up by Doxygen or Sphinx; this complies with PEP 257. 2019-08-14 14:33:57 -03:00