Commit Graph

46 Commits

Author SHA1 Message Date
Chris Hennes
fa65438556 Core: Enable compiling with MSVC /permissive- (#11014)
* Base: Fixes for MSVC permissive-

* App: Fixes for MSVC permissive-

* Gui: Fixes for MSVC permissive-

* Main: Fixes for MSVC permissive-

* Fem: Fixes for MSVC permissive-

* Material: Fixes for MSVC permissive-

* Part: Fixes for MSVC permissive-

* Mesh: Fixes for MSVC permissive-

* Points: Fixes for MSVC permissive-

* Robot: Fixes for MSVC permissive-

* TechDraw: Fixes for MSVC permissive-

* Path: Fixes for MSVC permissive-

* Core; Changes per review comments

* TD: Revision from wandererfan

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-27 17:37:29 +01:00
Chris Hennes
0e8be10b90 Part: Wrap PyArg_ParseTupleAndKeywords 2023-08-25 15:34:26 -05:00
luz paz
6e542b6fad Part: remove trailing whitespace 2022-11-15 14:19:30 -06:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
wmayer
8ae3185e3b Part: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 13:31:10 +02:00
Uwe
7a17e579f5 [Part] Geometry*PyImp.cpp: remove unneeded includes
- also sort includes
2022-07-04 01:03:23 +02:00
andrea
93525ff7eb removed references to OCC<7 2022-06-25 14:29:24 +02:00
wmayer
068c0e5a98 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
edd346cc3d Part: Fix several coverity issues:
* CID 350581: Structurally dead code
* CID 350620: Structurally dead code
* CID 350563: Big parameter passed by value
* CID 350552: Uncaught exception
* CID 305193: Uncaught exception
* CID 350556: Uninitialized scalar field
* CID 350579: Uninitialized pointer read
2022-03-13 16:06:40 +01:00
wmayer
9252f5f9ec Part: issue #6488: Cone surface returns wrong dv derivative
This is a workaround to fix a bug in ElSLib::ConeDN
2022-03-01 14:59:26 +01:00
wmayer
5593b8499b Part: add function Geometry.toShell 2021-10-06 19:44:53 +02:00
wmayer
1bc39542d3 Part: [skip ci] support of keywords in Part.GeometrySurface.toBSpline() 2020-12-11 14:40:09 +01:00
tomate44
f5f349fac8 Part:Surface.toBSpline use OCC MaxDegree instead of fixed value. 2020-12-11 14:05:08 +01:00
tomate44
75a2f471ea Part: update GeomSurface.toBSpline doc 2020-12-11 14:05:08 +01:00
tomate44
e7c06e8483 Part: add default values to GeomSurface.toBSpline() 2020-12-11 14:05:08 +01:00
wmayer
a6c55acdb1 Part: improve Python interface
+ rename getCurve2dFromGeom2d to makeFromCurve2d
+ add function makeFromCurve and makeFromTrimmedCurve like makeFromSurface
+ implement OffsetCurve.BasisCurve
+ fix memory leak in BRepOffsetAPI_MakePipeShellPy
2020-09-27 23:34:45 +02:00
tomate44
48bf133ea6 convert Geom_TrimmedCurve to subclass 2020-09-20 18:25:39 +02:00
wmayer
1a16cde1f5 Coverity: Structurally/Logically dead code 2020-07-20 17:34:28 +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
1d8235c234 Part: [skip ci] get n-th derivative of a surface via Python 2020-05-18 13:17:26 +02:00
wmayer
9d311b2b12 Part: [skip ci] add method to project point on surface 2020-03-05 10:48:12 +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
wmayer
58887d8b84 fix reference counting issue 2018-02-11 14:08:18 +01:00
luzpaz
706141b967 Make uniform the use of B-spline visible to users
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=25411
This commit does not include fixes to source  comments unless they were 'doxygenated'.
No .xml files were altered either.
2017-11-17 19:30:37 -05:00
wmayer
0a86d959c0 add method to check for planar surface 2017-09-30 00:23: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
wmayer
7aec98ffb6 add methods to get normal and curvature information from surfaces 2017-08-14 12:24:42 +02:00
wmayer
df9c81252f fix build failure 2017-07-27 11:06:06 +02:00
wmayer
99e3f95fff + add method trim() to Part.Curve 2017-07-26 22:59:39 +02:00
wmayer
6df816170a fix makeGeometryCurvePy to return a LinePy for lines instead of a GeometryCurvePy 2017-07-26 10:08:01 +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
448ac27e56 fix crash in uIso of Sphere 2017-02-19 20:36:40 +01:00
wmayer
c6529d21fe implement Line class 2016-12-01 00:04:13 +01:00
wmayer
fbaf3a1bbc implement method to get GeomSurface from Geom_Surface 2016-10-17 22:39:17 +02:00
wmayer
7baeb6e51a simplify generic version of uIso/vIso 2016-10-17 19:04:52 +02:00
wmayer
12c3fde399 fix resource leaks 2016-10-17 16:35:16 +02:00
wmayer
1dbdfc276a fix build failure with older occ version 2016-10-17 16:15:53 +02:00
wmayer
5365678f72 implement generic uIso/vIso methods in GeometrySurfacePy 2016-10-17 16:10:33 +02:00
jrheinlaender
ae1890f56b Python functions to intersect curves and surfaces 2016-04-12 18:11:55 +02:00
wmayer
1a12d109e9 + fix strict-aliasing warnings 2015-08-29 19:48:08 +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
Sebastian Hoogen
256d844801 python property Continuity of GeometrySurface 2014-09-01 11:04:38 +02:00
wmayer
52d65e2085 + port to OCC 6.5.2
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5318 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-17 12:58: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