Commit Graph

10 Commits

Author SHA1 Message Date
Abdullah Tahiri
a56658489b Part: Make 3rd party libraries into PCH 2019-05-02 07:09:22 +02:00
Abdullah Tahiri
4e2ae6f408 Part: Rearrange inheritance not to use ArcPy
============================================

Inheritance:

Geometry
- GeomPoint
- GeomCurve (GeometryCurvePy)
- - GeomBoundedCurve (BoundedCurvePy)
- - - GeomBezierCurve (BezierCurvePy)
- - - GeomBSplineCurve (BSplineCurvePy)
- - - GeomTrimmedCurve (TrimmedCurvePy)
- - - - GeomArcOfConic (ArcOfConicPy)
- - - - - GeomArcOfCircle (ArcOfCirclePy)
- - - - - GeomArcOfEllipse (ArcOfEllipsePy)
- - - - - GeomArcOfHyperbola (ArcOfHyperbolaPy)
- - - - - GeomArcOfParabola (ArcOfParabolaPy)
- - - - GeomLineSegment (LineSegmentPy)
- - GeomConic
- - - GeomCircle
- - - GeomEllipse
- - - GeomHyperbola
- - - GeomParabola
- - GeomLine
- - GeomOffsetCurve

* Note: ArcPy is also a twinclass of c++ GeomTrimmedCurve, Python ArcPy derives from Python TrimmedCurvePy.

Same functionality as before:

>>> geometries = ActiveSketch.Geometry
>>> line = geometries[1]
>>> arc = geometries[2]
>>> line
<Line segment (-97.4389,42.4463,0) (-80.7887,44.5569,0) >
>>> arc
ArcOfCircle (Radius : 19.3111, Position : (-74.6914, -23.2165, 0), Direction : (0, 0, 1), Parameter : (1.82335, 2.71597))
>>> line.FirstParameter
0.0
>>> line.LastParameter
16.783437032695776
>>> line.setParameterRange(0,20)
>>> line.LastParameter
20.0
>>> arc.StartPoint
Vector (-79.51683708894876, -4.517938119394778, 0.0)
>>> arc.EndPoint
Vector (-92.27963885411512, -15.243140671641918, 0.0)
>>> arc.setParameterRange(1.5,3)
>>> arc
ArcOfCircle (Radius : 19.3111, Position : (-74.6914, -23.2165, 0), Direction : (0, 0, 1), Parameter : (1.5, 3))
>>> geometries[1] = line
>>> geometries[2] = arc
>>> ActiveSketch.Geometry = geometries
>>> ActiveSketch.solve()
0
>>>
2019-02-11 19:13:55 +01:00
Abdullah Tahiri
0ceae9ead4 Part: Enable trimmed curves to set their parameter range, from c++ and Python
=============================================================================

>>> geometries = ActiveSketch.Geometry
>>> geo2 = geometries[2]
>>> geo2
ArcOfCircle (Radius : 27.5267, Position : (-70.4702, -31.8933, 0), Direction : (0, 0, 1), Parameter : (1.34187, 2.35619))
>>> geo2.setParameterRange(1,3)
>>> geometries[2]=geo2
>>> ActiveSketch.Geometry=geometries
2019-02-11 19:13:16 +01: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
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
Abdullah Tahiri
75377ebfd3 Part Module New Feature: Hyperbola & ArcOfHyperbola
- Completed Hyperbola c++ implementation and python wrapper
- Created ArOfHyperbola c++ and python wrapper implementation
2014-12-21 00:54:07 +01:00
Abdullah Tahiri
6997cc9991 Part Module New Feature: Parabola & ArcOfParabola
- Completed Parabola c++ implementation and python wrapper implementation
- Created ArOfParabola c++ and python wrapper implementation
2014-12-21 00:51:24 +01: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
wmayer
d62ed23068 + Fix compiler warnings with OCC 6.6 2013-12-05 23:06:13 +01: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