Commit Graph

603 Commits

Author SHA1 Message Date
wmayer
a9ade2be5b expose methods to Python to get normal, curvature and center of curvature for curve 2016-10-28 21:19:27 +02:00
wmayer
1fd3da29c8 add missing header 2016-10-26 11:23:02 +02:00
wmayer
13b7a32596 add support of Hermite curves 2016-10-26 10:28:23 +02:00
wmayer
b44408a2a4 implement method to get GeomSurface from Geom_Surface 2016-10-17 22:39:17 +02:00
wmayer
03d6c2ebf8 extend API of several surface types 2016-10-17 21:59:20 +02:00
wmayer
52d6b1810a simplify generic version of uIso/vIso 2016-10-17 19:04:52 +02:00
wmayer
b0767a1328 fix resource leaks 2016-10-17 16:35:16 +02:00
wmayer
0500bdc16c fix build failure with older occ version 2016-10-17 16:15:53 +02:00
wmayer
56721e6a37 implement generic uIso/vIso methods in GeometrySurfacePy 2016-10-17 16:10:33 +02:00
tomate44
11b1e502bb add uIso and vIso methods to SurfaceOfExtrusion 2016-10-17 10:43:56 +02:00
wmayer
169dc381db issue #0002723: Vertex ordering of Face 2016-10-09 23:33:23 +02:00
wmayer
677ec6cd30 fix coverity issues 2016-10-08 17:43:30 +02:00
wmayer
11a4c26dae + fix -Wunused-parameter 2016-10-08 15:13:56 +02:00
wmayer
f1127dd2f4 Fix issues:
+ improve formatting
+ remove superfluous semicolons
+ comment unused parameters
+ rename Initialisation to Initialization
+ rename Deinitialisation to Finalization
+ remove spaces
2016-10-08 12:48:34 +02:00
Stefan Tröger
28c21914d0 Extensions: Handle static/dynamic cast
After the change of the virtual inheritance position in the inheritance chain some
formally added dynamic_cast's can be reverted to the old behaviour
2016-10-08 12:48:34 +02:00
Stefan Tröger
3e1ba47d61 Extensions: Handle new dynamic_cast's 2016-10-08 12:48:34 +02:00
Stefan Tröger
6fa964c53f Extensions: Introduce classes and port App groups 2016-10-08 12:48:34 +02:00
DeepSOIC
aae97dedd9 Part: Py API: fix memory leak in Part.Vertex.Point
fix #2728
2016-10-07 15:02:14 -03:00
DeepSOIC
2045cb9b4a Part: Extrude, Revolve: fix #2720 - relax action of Solid=true
When facemakers were introduced, Solid property of Revolve and Extrude
was made strict: it calls facemaker if Solid==true, and facemaker would
fail if shape being extruded/revolved is a face.

This is fixed by testing there are no faces in source shape prior to
calling facemaker.
2016-10-04 21:51:58 +03: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
2d8f76eff9 Part: Py API: deprecate Part.Face.makeOffset 2016-10-01 23:13:44 +03:00
DeepSOIC
08307aa2e5 Part: Offset2D: rewrite to use FaceMaker
new features supported:
* fill offset in collective mode when result wires are closed
* offsetting faces in collective mode

Remaining TODOs:
- collective offset of open wires in "skin" mode
2016-10-01 23:13:44 +03: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
DeepSOIC
6043a2bdd3 Part: TopoShape: deprecate solid flag for revolve method 2016-10-01 23:13:44 +03:00
DeepSOIC
d06c7df069 Part: Revolve: port to use FaceMaker
For old documents, default to old behavior. For new objects, default to
use FaceMakerBullseye
2016-10-01 23:13:44 +03:00
DeepSOIC
8671edf76c Part: Extrude: port to use FaceMaker
For old documents, default to old behavior. For new objects, default to
use FaceMakerBullseye
2016-10-01 23:13:44 +03:00
DeepSOIC
b04219af6b Part: Face: use facemakers
For old documents, default to FaceMakerCheese. For newly created
objects, use FaceMakerBullseye
2016-10-01 23:13:44 +03:00
DeepSOIC
31f2a93c38 Part: register facemaker classes into typesystem 2016-10-01 23:13:44 +03:00
DeepSOIC
4b26988cb7 Part: implement facemakers: FaceMakerCheese, FaceMakerBullseye
FaceMakerCheese: based on code extracted from Part FeatureExtrude,
exactly the same as facemaking code in PartDesign.

FaceMakerBullseye: new facemaker, that supports nesting like hole inside
a face inside a hole of another face...
2016-10-01 23:13:44 +03:00
DeepSOIC
68918a881f Part: Introduce FaceMaker class
A general class to implement smart making faces from wires (e.g. making
a face from sketch prior to extruding)
2016-10-01 23:13:44 +03:00
wmayer
5bd455cc76 fix -Wdeprecated in Part & FreeCADGui 2016-09-22 15:32:49 +02:00
wmayer
2af6bb6e49 replace deprecated auto_ptr with unique_ptr 2016-09-22 13:01:20 +02:00
wmayer
7d38edb065 fix -Wextra in Part 2016-09-22 11:49:28 +02:00
DeepSOIC
5b3ab1b857 Part: Offset2D: fix save-load instability
Fixes #2699
It was found out that when direction of normal found by FindPlane
depends on if we are using result of offset directly, or after copying.

The fix (workaround) is to copy offset result inside  offset routine, so
that no unstable behavior makes its way to the user.
2016-09-18 18:45:04 +03:00
wmayer
25108d8634 support offset curve in edge.Curve for occ 7.0 2016-09-15 10:36:44 +02:00
wmayer
d0e6621cc9 allow to pass parameter range when creating a line from a line 2016-09-09 13:02:15 +02:00
DeepSOIC
50296e4096 Part: add Offset2D feature
derived from Part::Offset, to re-use task dialog easily
2016-09-02 16:26:02 +02:00
DeepSOIC
53e7a15df1 Part: Offset feature: split off into separate file
withdrew code from PartFeatures.h/.cpp and created FeatureOffset.h/.cpp
2016-09-02 16:26:02 +02:00
DeepSOIC
2a4d4c3b57 Part: Py API: deprecate Part.Wire.makeOffset
(code unchanged. Only added deprecation note to documentation)
2016-09-02 16:26:02 +02:00
DeepSOIC
d4fc0becd7 Part: Py API: add makeOffset2d method to Part.Shape
+ write documentation to makeOffsetShape
2016-09-02 16:26:02 +02:00
DeepSOIC
5462fe60e7 Part: TopoShape: add makeOffset2D method
Supports:
* offsetting wire, compound of wires.
* offsetting compounds in collective or independent manners
('intersection' parameter)
* two offset modes (parameter 'allowOpenResult')
* filling offset when offsetting one wire, or compound in independent
manner

Not supported yet (planned):
* filling offset when offset in collective manner (intersection= true)
* offsetting planar faces
2016-09-02 16:26:02 +02:00
DeepSOIC
6fb25b9df5 Part: Extrude: improvements
* split Dir into Dir+Length; added second Length
* support for parametric linked direction: to arbitrary edge, and to
normal
* options: reverse, symmetric
* second taper angle
* changed offset join mode for tapered extrusion on OCCT7
2016-09-01 11:46:18 +02:00
DeepSOIC
f70ef9745c [breaking] Part: Revolve: fix forgotten check for reverseness of axis link
I didn't know BRepAdaptor_Curve does not take shape orientation
(reverseness) into account.

The commit can break existing projects. If revolution feature was
created with axis linked to reversed edge, and angle span is not 360,
the revolution direction will now swap. The chances of this situation
are pretty low, and revolution supports axis linkage for not long yet.
So I hope it won't cause any noticeable trouble.

--DeepSOIC
2016-09-01 11:46:18 +02:00
wmayer
4c9b486954 fix crash when saving a document after aborting a pending transaction 2016-08-31 17:58:55 +02:00
wmayer
24333d02d3 fix Coverity issues 2016-08-22 15:33:54 +02:00
wmayer
c2dd2e2b99 fix Coverity issues 2016-08-21 18:46:40 +02:00
wmayer
fcdaf5405c fix Coverity issues 2016-08-20 15:41:33 +02:00
wmayer
26865522ea issue #0002666: Error on Save File 2016-08-12 13:33:48 +02:00
wmayer
0d011e2190 fix various compiler warnings 2016-08-09 13:16:26 +02:00