Commit Graph

109 Commits

Author SHA1 Message Date
wmayer
0054cbddaa Fix coverity issue:
* CID 332682: Resource leak
* CID 350607: Resource leak
* CID 332677: Resource leak
2022-03-14 11:35:04 +01:00
Uwe
bc55cf4007 [Part] compile fix for precompiled header
For an unknown reason BRepFill_Generator.hxx must be load explicitly for precompiled headers.
2022-02-21 16:52:41 +01:00
Uwe
67a0966398 [Part] remove some unused includes and sorting 2022-02-21 04:29:28 +01:00
mwganson
c63c3e6538 Part.show() python return the new document object instead of None 2022-01-29 23:50:43 +01:00
wmayer
73a986714c Part: expose HLR algorithm to Python 2021-12-21 10:49:03 +01:00
wmayer
9b4db7e064 Part: in Part.getFacets() use functions of Tools class 2021-10-08 15:32:41 +02:00
wmayer
6aef001272 Part: remove some more deprecated Py2 code 2021-04-26 11:13:22 +02:00
luz paz
c69f245d6f Part: remove py2 code 2021-04-25 11:29:35 +02:00
wmayer
4561deb4fa Part: [skip ci] implement makeShellFromWires 2021-03-16 16:01:43 +01:00
wmayer
23073c14da Py2: fix Py2 build failure 2020-12-23 14:04:14 +01:00
Aapo
b66c895bb8 [Part] AppPartPy.cpp Python 3.9 Unicode warning fixes. 2020-12-23 13:51:52 +01:00
wmayer
aec9d5f07a Py: fix memory leaks by incorrect use of PyList_Append 2020-12-13 16:30:04 +01:00
joe-bookwood
998e17748a replace auto with type 2020-12-02 12:23:43 +01:00
wmayer
e1b56f8551 Part: expose BRepFeat_MakePrism to Python 2020-10-16 13:50:29 +02:00
wmayer
b33a120935 Part: [skip ci] implement getPyObject/setPyObject of TopoShape class 2020-10-16 13:46:44 +02:00
wmayer
12155f4aab Part: [skip ci] harmonizing the way to add sub-modules to Part module 2020-10-10 11:44:51 +02:00
wmayer
9c20ce05ed Part: [skip ci] expose ShapeUpgrade_UnifySameDomain to Python 2020-10-05 16:57:16 +02:00
wmayer
00e0e7745c Part: expose GeomPlate algorithm to Python 2020-09-28 18:46:35 +02:00
wmayer
b44d20dbd8 Part: [skip ci] fix shape builder to create filled face from vertexes 2020-09-25 13:42:39 +02:00
wmayer
421f6c52cb Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00
wmayer
8ed90c8586 Py2: fix Python 2 build failure 2020-06-12 17:51:33 +02:00
wmayer
3f212ad8ac Porting Py3.8/Py3.9:
Since Py3.3: 'Py_ssize_t PyUnicode_GetSize(PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'PyObject* PyEval_CallObjectWithKeywords(PyObject*, PyObject*, PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
luz.paz
0c326f094f [skip ci] fix documentation typos
Found via codespell v1.17.0.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -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,./src/Doc/FreeCAD.uml
```
2020-04-20 12:59:09 +02:00
wmayer
d91bd53e10 Part: [skip ci] include missing header file 2020-04-14 09:37:45 +02:00
Eric Trombly
b631c5600a move getFacets from Path to Part 2020-04-06 06:34:53 -05:00
wandererfan
e3b5b0b177 [Part]Handle CJK font names for ShapeString 2020-02-19 13:11:01 -05:00
luz.paz
53bb216b57 Part: [skip ci] fix header uniformity
This PR fixes header uniformity across all Part WB files
2019-12-22 00:59:47 +01:00
asapelkin
e951094af9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
Zheng, Lei
71c54272a0 Fix various Py::Object leak 2019-10-08 17:53:20 +02:00
wmayer
67b06d7a36 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
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
1031644fab improve doc string of Part.sortEdges 2019-06-20 14:41:50 +02:00
wmayer
1b26173580 use INCH instead of IN when setting units for STEP or IGES export 2019-06-13 12:40:01 +02:00
wmayer
f6ee90557d also support shapetype parameter in Part.makeRevolution() if first argument is an edge 2019-05-12 11:33:38 +02:00
Abdullah Tahiri
a56658489b Part: Make 3rd party libraries into PCH 2019-05-02 07:09:22 +02:00
wmayer
43bdef67d6 continue PCH on Part module 2019-05-01 16:10:38 +02:00
wmayer
e02695b91f Replace Base::Exception with appropriate subclass 2018-11-14 19:45:20 +01:00
Markus Lampert
0b40519f3f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
wmayer
840c9e8b3c prepare for PyCXX 7.0 2018-04-18 19:20:50 +02:00
wmayer
a8a9650816 harmonize show() function of Part, Mesh, Fem, Path and Points modules 2017-09-29 00:35:48 +02:00
Markus Lampert
6bbefe94f5 Added optional name parameter to Part.show() 2017-09-28 23:22:11 +02:00
wmayer
29f2d818af add missing header file 2017-09-28 18:34:40 +02:00
wmayer
76264ec1c7 expose BRepFeat_SplitShape to Python 2017-09-28 12:55:24 +02:00
tomate44
f8585e71c1 add MaxDegree setting to Part.Loft 2017-09-18 12:07:00 +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
Richard Crozier
56e023a37a AppPartPy.cpp: improved docstrings for Part.makeLine and Part.makePolygon 2017-05-11 20:01:37 +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
Zheng, Lei
2c249e8356 Part: fixed missing export declare of sort_Edges 2017-01-20 18:30:56 +08:00
Zheng, Lei
eb0f89f477 Part: exported Part::sort_Edges
Fixed export of Part::shape2pyshape
2017-01-20 17:46:47 +08:00