Commit Graph

46 Commits

Author SHA1 Message Date
wmayer
8ae3185e3b Part: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 13:31:10 +02:00
wmayer
70a5faf327 Part: fix build failure 2022-07-04 02:21:59 +02:00
Uwe
7a17e579f5 [Part] Geometry*PyImp.cpp: remove unneeded includes
- also sort includes
2022-07-04 01:03:23 +02:00
tomate44
3af5cfaed6 Part: add method to project point on curve 2022-06-28 12:58:49 +02:00
wmayer
068c0e5a98 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
luz paz
c69f245d6f Part: remove py2 code 2021-04-25 11:29:35 +02:00
wmayer
27b6066beb clang/gcc/cmake: move handling of suppressed deprecated-copy warnings from source file to CMake file to more easily support gcc 10 2020-06-09 15:30:42 +02:00
wmayer
300e887480 Handle clang 10 warnings:
+ fix -Wtautological-bitwise-compare
+ fix -Wimplicit-int-float-conversion
+ fix -Wmisleading-indentation
+ fix -Wrange-loop-construct
+ suppress -Wdeprecated-copy of 3rd party libs
2020-05-25 15:34:43 +02:00
wmayer
7b970ab3b7 Part: [skip ci] get n-th derivative of a curve via Python 2020-05-17 23:25:07 +02:00
wmayer
ff0e556b59 Part: [skip ci] add methods to determine continuity 2020-05-17 21:57:25 +02:00
Zhang Wei
0bef3cdee4 Patch for MIPS64 Architecture 2020-02-15 19:32:58 +01:00
wmayer
3cbe309330 Part: determine tangent intersection of two 2d curves 2020-02-13 12:51:40 +01:00
Zheng, Lei
71c54272a0 Fix various Py::Object leak 2019-10-08 17:53:20 +02: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
wmayer
1e343d339f PVS: V779 Unreachable code detected. It is possible that an error is present. 2019-02-17 20:12:56 +01:00
wmayer
041a550815 handle also B-spline and Bezier curves in GeomCurve::closestParameter 2019-01-21 13:47:41 +01:00
wmayer
7ba92f96a5 reduce code duplication 2019-01-03 17:33:39 +01:00
Abdullah Tahiri
8b97a31372 Part: Geometry refactoring
==========================

python c+ wrapper to use twin class c++ function instead of duplicating the code
2018-10-28 18:31:35 +01:00
wmayer
f84971fca2 avoid throwing exception in intersectCC 2018-10-05 22:17:20 +02:00
wmayer
c6df59969b expose more methods of Geom_Curve to Python 2018-09-15 11:26:26 +02:00
wmayer
949c86d364 Port to occ7.2:
+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
2017-09-01 16:27:46 +02:00
wmayer
99e3f95fff + add method trim() to Part.Curve 2017-07-26 22:59:39 +02:00
wmayer
18f723cb03 use specialized Python exception classes 2017-04-28 19:33:51 +02:00
Peter Lama
a75a98ef27 Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
wmayer
ed23c0d3c4 py3: ported Part to python3 2017-03-01 16:38:53 +01:00
wmayer
27fd215e1c add methods to convert a curve to a B-Spline or NURBS 2017-02-13 10:38:09 +01:00
wmayer
89a896b52e fix bug in Curve class 2016-12-03 11:04:24 +01:00
wmayer
9cbcb36280 expose methods to Python to get normal, curvature and center of curvature for curve 2016-10-28 21:19:27 +02:00
wmayer
fbaf3a1bbc implement method to get GeomSurface from Geom_Surface 2016-10-17 22:39:17 +02:00
wmayer
e8b36592c0 fix Coverity issues 2016-08-21 18:46:40 +02:00
maito78
8fe7c94452 Add parameter at given distance method for curves 2016-07-29 22:40:19 +02:00
wmayer
bca7a1866e + port to OCC 7.0 2016-05-14 16:53:27 +02:00
jrheinlaender
ae1890f56b Python functions to intersect curves and surfaces 2016-04-12 18:11:55 +02:00
Sebastian Hoogen
5e51a6cdf7 fixes #0001422: Subclass Exception
inherit Base.FreeCADError form RuntimeError
inherit Part.OCCError from Base.FreeCADError
inherit OCCDomainError from Part.OCCError
inherit OCCRangeError from Part.OCCError
inherit OCCConstructionError from OCCDomainError
inherit OCCDimensionError from OCCDomainError
Added PY_CATCH_OCC macro
replace PyExc_Exception
use FreeCADError in makeWireString
catch exception in BSplineCurve.increasedegree
2014-09-17 11:15:56 +02:00
wmayer
7eaa4fff74 + Support Quasi methods in discretize() 2014-08-14 19:11:51 +02:00
wmayer
9ed61f107b + support First and Last keywords in discretize 2014-08-14 11:16:54 +02:00
wmayer
3d2a2b06f0 + fix and improve discretize() method 2014-08-13 23:33:27 +02:00
wmayer
d3760deeeb + fixes #0001388: SIGSEGV in Part::GeometryCurvePy::toBSpline 2014-02-17 11:40:09 +01:00
wmayer
98cef33d61 + Approximate curve to B-Spline 2014-01-17 10:53:13 +01:00
wmayer
34d1e45f35 + Attribute to get continuity of curve 2013-10-24 18:11:24 +02:00
wmayer
d22772d5fd + Method to convert any curve into B-Spline 2013-10-24 17:30:38 +02:00
wmayer
42b54c1293 Fix build failure 2013-04-10 09:41:44 +02:00
wmayer
f43f70f395 Implement GeometryCurvePy::length 2013-04-08 12:54:46 +02:00
wmayer
1aa7e55e92 + implement Python interface to discretize wires or edge with given deflection or number of points
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5423 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2012-01-24 15:23:58 +00:00
wmayer
1bb663c897 + add method to get intersection of two curves
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5414 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2012-01-17 15:08:47 +00: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