Commit Graph

12 Commits

Author SHA1 Message Date
Abdullah Tahiri
395a0f19b4 Part/Sketcher - Construction Migration - step 3: Removal of Geometry construction data member
=============================================================================================

This commits removes the Geometry construction data member and adapts sketcher code to use
GeometryFacade to access construction information via the SketchGeometryExtension.
2020-12-10 18:34:06 +01:00
Zheng, Lei
6da72b9859 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
Abdullah Tahiri
33620d212e Part: Geometry extension set with unique id (type+name) and list based getExtensions python 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
11793ba0b2 Part Geometry: get an extension from type or name, also from python 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
afbe1df322 Part:: Geometry container extend hasExtension to type and name 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
854452e2e1 Part: Geometry - methods to remove extensions by name and type 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
dece5aa81d Part: Command to show list of extensions from Python 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
ef30cc2527 Part: Geometry Python interface to get/set an extension 2019-07-14 12:37:29 +02:00
Abdullah Tahiri
a3b93ee0eb Part: expose geometry clone support to python
=============================================

>>> geometries = ActiveSketch.Geometry
>>> geo0 = geometries[0]
>>> geo0.Tag
'a2b6883e-64d6-4348-b567-8b5e0a4896a0'
>>> geo1 = geo0.clone()
>>> geo1.Tag
'a2b6883e-64d6-4348-b567-8b5e0a4896a0'
>>> geo1.Radius = 3
>>> geo0.Tag
'a2b6883e-64d6-4348-b567-8b5e0a4896a0'
>>> geo0.Radius
30.157883192724587
>>> geo1.Tag
'a2b6883e-64d6-4348-b567-8b5e0a4896a0'
>>> geo1.Radius
3.0
2019-02-11 19:13:35 +01:00
wmayer
ce68a5b9dd expose Geometry::getTag to Python 2017-04-08 16:56:59 +02:00
wmayer
280019ddf9 + implement Geometry.copy for Python 2015-06-15 21:28:29 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00