Commit Graph

92 Commits

Author SHA1 Message Date
wmayer
904574d368 Part: expose GeomPlate algorithm to Python 2020-09-28 18:46:35 +02:00
wmayer
77f84ce743 Part: [skip ci] fix shape builder to create filled face from vertexes 2020-09-25 13:42:39 +02:00
wmayer
0a6929a122 Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00
wmayer
2799f553a1 Py2: fix Python 2 build failure 2020-06-12 17:51:33 +02:00
wmayer
88fd77b31d 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
7eb270017e [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
fd286c04e5 Part: [skip ci] include missing header file 2020-04-14 09:37:45 +02:00
Eric Trombly
1ac9c2f4e9 move getFacets from Path to Part 2020-04-06 06:34:53 -05:00
wandererfan
41ae2518dc [Part]Handle CJK font names for ShapeString 2020-02-19 13:11:01 -05:00
luz.paz
17ada69518 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
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
Zheng, Lei
8426ebe2ba Fix various Py::Object leak 2019-10-08 17:53:20 +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
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
wmayer
83844e261d improve doc string of Part.sortEdges 2019-06-20 14:41:50 +02:00
wmayer
98a53884dc use INCH instead of IN when setting units for STEP or IGES export 2019-06-13 12:40:01 +02:00
wmayer
addb368e52 also support shapetype parameter in Part.makeRevolution() if first argument is an edge 2019-05-12 11:33:38 +02:00
Abdullah Tahiri
216926233f Part: Make 3rd party libraries into PCH 2019-05-02 07:09:22 +02:00
wmayer
dc1720a7f2 continue PCH on Part module 2019-05-01 16:10:38 +02:00
wmayer
9aa6a700d8 Replace Base::Exception with appropriate subclass 2018-11-14 19:45:20 +01:00
Markus Lampert
e13c09235f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
wmayer
99ec96acd5 prepare for PyCXX 7.0 2018-04-18 19:20:50 +02:00
wmayer
846195327a harmonize show() function of Part, Mesh, Fem, Path and Points modules 2017-09-29 00:35:48 +02:00
Markus Lampert
5150737031 Added optional name parameter to Part.show() 2017-09-28 23:22:11 +02:00
wmayer
6126d63ac1 add missing header file 2017-09-28 18:34:40 +02:00
wmayer
674c0159da expose BRepFeat_SplitShape to Python 2017-09-28 12:55:24 +02:00
tomate44
f335d1f10d add MaxDegree setting to Part.Loft 2017-09-18 12:07:00 +02:00
wmayer
0d617f97d6 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
422328483e AppPartPy.cpp: improved docstrings for Part.makeLine and Part.makePolygon 2017-05-11 20:01:37 +02:00
Peter Lama
fa4bebf2e0 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
d5e9afa52b py3: ported Part to python3 2017-03-01 16:38:53 +01:00
Zheng, Lei
c9a9691fa9 Part: fixed missing export declare of sort_Edges 2017-01-20 18:30:56 +08:00
Zheng, Lei
a1a8645ea9 Part: exported Part::sort_Edges
Fixed export of Part::shape2pyshape
2017-01-20 17:46:47 +08:00
Zheng, Lei
0bae247c0f Added Part.sortEdges
Unlike Part.__sortEdges__ which only return a list of connected edges,
and discard the rest. Part.sortEdges return a list of list of
connected edges, which includes all input edges.
2017-01-03 16:59:16 +08:00
DeepSOIC
115c7e4f88 Part: FaceMaker: check if instance is actually created.
Part::FaceMaker::ConstructFromType() could return null pointer if
abstract class type is supplied.

Here, it is fixed by checking for null pointer in facemaker itself,
rather than in every place  ConstructFromType is being used.
2016-10-04 10:03:19 +02:00
wmayer
da406cddb8 handle possible crashes with FaceMaker and fix a few coding flaws 2016-10-02 14:47:59 +02:00
DeepSOIC
585fc856bc Part: Py API: add methods to use FaceMakers
* new Part.Shape.Face() constructor footprints with facemaker class
supplied as string mane of C++ class.
* add Part.makeFace method that uses facemaker.
2016-10-01 23:13:44 +03:00
wmayer
fcdaf5405c fix Coverity issues 2016-08-20 15:41:33 +02:00
Wolfgang E. Sanyer
d1d2f1f811 This commit adds getShape and setShape to TopoShape 2016-08-06 23:42:55 +02:00
DeepSOIC
7338ea3e85 Part: TopoShapePy: made Solid constructor accept CompSolid
Part.Solid(shape) now accepts compsolid as input, and creates a solid by
joining the compsolid.

Same done to Part.makeSolid().

+ change exception handling to expose the error message.
2016-07-04 14:58:53 +03:00
wmayer
cb73d010bb + port to OCC 7.0 2016-05-14 16:53:27 +02:00
wmayer
294c978341 + simplify porting of Part module to Python3 2016-01-20 22:05:53 +01:00
wmayer
6f8adef286 + PLate surface approximation 2015-11-19 18:52:19 +01:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
Yorik van Havre
e7eafef4f4 Part.__sortEdges__ now reorients edges if needed 2015-09-03 11:17:46 -03:00
wmayer
8caf6275a5 + fix Part.__sortEdges__, check for object type in Part.Wire 2015-04-10 18:25:31 +02:00
wmayer
5bde5ae011 + fix doc string of Part.makeLoft 2015-02-25 21:36:40 +01:00
wmayer
adf3c12ced + better exception handling in Part module 2014-11-04 11:03:51 +01:00
Sebastian Hoogen
01cf0f5872 issue #1027 use unicode filepaths 2014-10-11 13:32:06 +02:00
Sebastian Hoogen
d49528b27e issue #1700 replace PyExc_Exception 2014-09-17 11:15:57 +02:00