Commit Graph

1099 Commits

Author SHA1 Message Date
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
wmayer
3a8a6aae1b Surface: add command to create surface from sections 2020-09-26 16:32:42 +02:00
wmayer
7616153b3c Part: add method to add a wire (e.g. to create a hole) to a face 2020-09-25 16:00:01 +02:00
wmayer
da6cdb94a1 Part: add method to return a reversed shape 2020-09-25 15:59:08 +02:00
wmayer
92fe662d65 Part: implement BSplineSurface.buildFromNSections based on GeomFill_NSections 2020-09-25 15:07:47 +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
ffa1da617f Python: [skip ci] expose Python types in their corresponding modules 2020-09-21 15:04:26 +02:00
tomate44
43604f284b Part: remove uIso and vIso methods from RectangularTrimmedSurface 2020-09-20 18:25:39 +02:00
tomate44
48bf133ea6 convert Geom_TrimmedCurve to subclass 2020-09-20 18:25:39 +02:00
tomate44
053c918e60 Part: remove uIso and vIso methods. Methods from base class GeomSurface will be used instead 2020-09-20 18:25:39 +02:00
donovaly
5abb45f7cf [PD] fix wording for skew prisms
the UI and the property is not consistent. In the dialog we use the term angle upon user feedback while the property still has the name "skew" in it.
I simply forgot this change in my PR that implemented skew prisms.

This is now corrected by this PR.
2020-09-15 22:13:26 +02:00
wmayer
7459f87c88 Part: [skip ci] Coverity: Uninitialized scalar field 2020-09-14 19:30:21 +02:00
donovaly
d4519d5aec [PD and Part] add possibility to create skew prisms 2020-09-12 13:28:00 +02:00
tomate44
c493d42bfe SurfaceOfExtrusion: use uIso and vIso methods of parent class 2020-09-09 11:06:21 +02:00
wmayer
a5899f3892 Part: [skip ci] return std::unique_ptr from Part::makeFromSurface() to avoid memory leaks 2020-08-29 23:56:12 +02:00
tomate44
efb403b8f9 Edge.curveOnSurface : add placement to the output tuple 2020-08-29 22:22:43 +02:00
tomate44
7d3ff633b7 Part.EdgePy : get access to stored Pcurves 2020-08-29 22:22:43 +02:00
tomate44
2ea94bee60 Part.Curve2d : adjust parameters 2020-08-24 16:09:54 +02:00
tomate44
f504152917 Part.Curve2d : fix for toShape sometimes generating wrong BSpline curves 2020-08-24 16:09:54 +02:00
tomate44
bba3d2a322 fix long spiral bug similar to #954. Work around OCC bug #23314 2020-08-22 14:29:07 +02:00
wmayer
9c17fe359b Part: [skip ci] fixes #0004117: Crash during extrusion 2020-08-13 14:23:16 +02:00
Zheng, Lei
488419cd73 Part: fix FaceMakerBullseye plane finding
Copy the shape to work around OCC circular edge transformation bug
2020-07-31 17:37:18 +02:00
Abdullah Tahiri
60d73e0e8e Part: Attacher intersection calculation fix
===========================================

In OCCT 7.4 (and apparently <= 7.4 too):

A GeomAdaptor_Curve obtained directly from BRepAdaptor_Curve will not work because it won't respect the
Location/orientation of the underlying curve.

This commit proposes to create a new GeomAdaptor_Curve from an intermediary curve handle to work around
this issue.
2020-07-29 19:06:59 +02:00
wmayer
cd5341001e remove superfluous includes of iostream, use iosfwd instead 2020-07-28 15:22:23 +02:00
wmayer
244d7aae41 LGTM: [skip ci] fix: Inconsistent definition of copy constructor and assignment ('Rule of Two') 2020-07-27 14:39:14 +02:00
wmayer
3b0eeb63e8 LGTM: [skip ci] fix: Inconsistent definition of copy constructor and assignment ('Rule of Two')
Remove user-defined copy constructor of Exception classes without assignment operator
2020-07-27 13:47:41 +02:00
wmayer
44f42a8e2c LGTM: [skip ci] fix: Declaration hides parameter
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
wmayer
d5d7d65bfc LGTM: [skip ci] fix: Large object passed by value 2020-07-24 18:32:31 +02:00
wmayer
1a16cde1f5 Coverity: Structurally/Logically dead code 2020-07-20 17:34:28 +02:00
wmayer
421f6c52cb Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00
wmayer
6f06fbf36d PVS: V601 The bool type is implicitly cast to the double type 2020-07-18 10:59:28 +02:00
wmayer
0f18bdeb72 PVS: V524 It is odd that the body of 'getLastUKnotIndex' function is fully equivalent to the body of 'getFirstUKnotIndex' function 2020-07-18 10:59:27 +02:00
wmayer
f29a1c43cb PVS: V773 The exception was thrown without releasing the pointer. A memory leak is possible. 2020-07-18 10:59:27 +02:00
Abdullah Tahiri
9ca8568f89 PropertyGeometryList: move setValue and refactor 2020-07-01 14:04:25 +02:00
wmayer
478823b909 Part: [skip ci] fix regression in ruled surface feature by applying placement of source object twice
See: https://forum.freecadweb.org/viewtopic.php?p=411934
2020-06-27 23:17:32 +02:00
Gabriel Wicke
487215d2f5 [part] More robust tessellation angular deflection default
OCC currently does not reliably enforce linear deflection on curved
surfaces, especially curved lofts over nurbs splines. To avoid surprises
when tight tolerances are needed, replace the static default angular
deflection of 0.5 radians (~28 degrees), with a more sensible angular
deflection derived from the provided linear deflection tolerance.

By adding the default heuristic to TopoShape, we can keep typical
tessellate() and STL export functionality users simple, and also avoid
the need to implement similar heuristics in many places. If more
explicit control over angular deflection is needed for some use cases,
then we could still choose to expose the option to override the derived
default explicitly.

The hope is that OCC's linear deflection enforcement will be more
reliable at some point, at which point this heuristic will no longer be
needed.
2020-06-23 12:17:51 +02:00
wmayer
6c74b78507 Part: [skip ci] add missing headers 2020-06-21 22:53:42 +02:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
8ed90c8586 Py2: fix Python 2 build failure 2020-06-12 17:51:33 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 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
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
fdc07cb6c9 Py3.8: [skip ci] missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 2020-06-08 14:40:00 +02:00
wandererfan
8311b1e66d [Part]Fix bad shape from Fillet
- see #4285 for similar fix on Chamfer
2020-06-07 22:08:41 -04:00
wandererfan
73f086f73d [Part]Fix #4285 Bad Shape from Chamfer
- chamfer was producing invalid shape as output.
  fix uses shapefix to correct invalid surface/face.
2020-06-07 11:26:56 -04:00
wandererfan
4a3bd23877 [Part]use BSpline for makeWireString instead of Bezier curves.
- the bezier curves from the font definitions cause checkGeometry
  errors when extruded.  bsplines do not have this problem.
2020-05-31 11:26:22 -04:00
Gabriel Wicke
7822daf1f2 Part: Parallelize tessellations in TopoShape
Update parameters for all BRepMesh_IncrementalMesh instances to allow
parallel meshing. This matches what is already done for view
tessellations.

Other positional parameters are filled with their defaults in
BRepMesh_IncrementalMesh, so there should be no behavior change outside
of allowing parallelism.
2020-05-28 22:05:12 +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
7b970ab3b7 Part: [skip ci] get n-th derivative of a curve via Python 2020-05-17 23:25:07 +02:00