1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0024023: Revamp the OCCT Handle -- general

Missing headers added; includes of headers "Handle_...hxx" removed.

Misuses of macro Handle() and its use in typedefs corrected.

Alias classes Profile and Option are removed from IFSelect; ones defined in MoniTool are used directly.

Removed header files defining only Handle classes (except Image_PixMap_Handle.hxx)

Classes SelectMgr_BaseFrustum and now inherit Standard_Transient and can be manipulated by Handle (not NCollection_Handle)

Fixed reference-type local variable pointing to temporary object

Use of handle in conditional expressions and comparisons to NULL are replaced by call to method IsNull()
This commit is contained in:
abv 2015-06-30 10:25:12 +03:00
parent 35c0599a42
commit c04c30b3ee
311 changed files with 725 additions and 1175 deletions

View File

@ -34,6 +34,7 @@
#include <TopoDS_Face.hxx> #include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx> #include <TopoDS_Vertex.hxx>
class AIS_AngleDimension;
DEFINE_STANDARD_HANDLE (AIS_AngleDimension, AIS_Dimension) DEFINE_STANDARD_HANDLE (AIS_AngleDimension, AIS_Dimension)
//! Angle dimension. Can be constructed: //! Angle dimension. Can be constructed:

View File

@ -24,6 +24,7 @@
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
class AIS_DiameterDimension;
DEFINE_STANDARD_HANDLE (AIS_DiameterDimension, AIS_Dimension) DEFINE_STANDARD_HANDLE (AIS_DiameterDimension, AIS_Dimension)
//! Diameter dimension. Can be constructued: //! Diameter dimension. Can be constructued:

View File

@ -42,6 +42,7 @@
#include <NCollection_Sequence.hxx> #include <NCollection_Sequence.hxx>
#include <NCollection_Handle.hxx> #include <NCollection_Handle.hxx>
class AIS_Dimension;
DEFINE_STANDARD_HANDLE(AIS_Dimension, AIS_InteractiveObject) DEFINE_STANDARD_HANDLE(AIS_Dimension, AIS_InteractiveObject)
//! AIS_Dimension is a base class for 2D presentations of linear (length, diameter, radius) //! AIS_Dimension is a base class for 2D presentations of linear (length, diameter, radius)

View File

@ -28,7 +28,7 @@
#include <Aspect_InteriorStyle.hxx> #include <Aspect_InteriorStyle.hxx>
#include <Prs3d_ShadingAspect.hxx> #include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_IsoAspect.hxx>
static Handle(Prs3d_LineAspect) GetLineAspect(const Handle(Prs3d_Drawer)& Dr, static Handle(Prs3d_LineAspect) GetLineAspect(const Handle(Prs3d_Drawer)& Dr,
const AIS_TypeOfAttribute Att) const AIS_TypeOfAttribute Att)

View File

@ -395,11 +395,11 @@ void AIS_InteractiveContext::SetViewAffinity (const Handle(AIS_InteractiveObject
anAffinity->SetVisible (aCView->ViewId, theIsVisible == Standard_True); anAffinity->SetVisible (aCView->ViewId, theIsVisible == Standard_True);
if (theIsVisible) if (theIsVisible)
{ {
theView->View()->ChangeHiddenObjects()->Remove (theIObj); theView->View()->ChangeHiddenObjects()->Remove (theIObj.get());
} }
else else
{ {
theView->View()->ChangeHiddenObjects()->Add (theIObj); theView->View()->ChangeHiddenObjects()->Add (theIObj.get());
} }
} }
@ -2435,7 +2435,7 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
myMainVwr->Viewer()->UnregisterObject (theIObj); myMainVwr->Viewer()->UnregisterObject (theIObj);
for (myMainVwr->InitDefinedViews(); myMainVwr->MoreDefinedViews(); myMainVwr->NextDefinedViews()) for (myMainVwr->InitDefinedViews(); myMainVwr->MoreDefinedViews(); myMainVwr->NextDefinedViews())
{ {
myMainVwr->DefinedView()->View()->ChangeHiddenObjects()->Remove (theIObj); myMainVwr->DefinedView()->View()->ChangeHiddenObjects()->Remove (theIObj.get());
} }
if (theToUpdateviewer if (theToUpdateviewer
@ -2826,7 +2826,7 @@ void AIS_InteractiveContext::Disconnect (const Handle(AIS_InteractiveObject)& th
theObj->Disconnect (theObjToDisconnect); theObj->Disconnect (theObjToDisconnect);
mgrSelector->Remove (theObjToDisconnect); mgrSelector->Remove (theObjToDisconnect);
} }
else if (theAssembly->IsInstance ("AIS_ConnectedInteractive") && theObjToDisconnect == NULL) else if (theAssembly->IsInstance ("AIS_ConnectedInteractive") && theObjToDisconnect.IsNull())
{ {
const Handle(AIS_ConnectedInteractive)& theObj = const Handle(AIS_ConnectedInteractive)& theObj =
Handle(AIS_ConnectedInteractive)::DownCast (theAssembly); Handle(AIS_ConnectedInteractive)::DownCast (theAssembly);

View File

@ -674,7 +674,7 @@ Standard_Integer AIS_InteractiveContext::PurgeDisplay()
//======================================================================= //=======================================================================
Standard_Integer AIS_InteractiveContext::PurgeViewer(const Handle(V3d_Viewer)& Vwr) Standard_Integer AIS_InteractiveContext::PurgeViewer(const Handle(V3d_Viewer)& Vwr)
{ {
const Handle(Graphic3d_StructureManager)& GSM = Vwr->Viewer(); Handle(Graphic3d_StructureManager) GSM = Vwr->Viewer();
Standard_Integer NbCleared(0); Standard_Integer NbCleared(0);
Graphic3d_MapOfStructure SOS; Graphic3d_MapOfStructure SOS;
GSM->DisplayedStructures(SOS); GSM->DisplayedStructures(SOS);

View File

@ -41,6 +41,7 @@
#include <BRepAdaptor_Curve.hxx> #include <BRepAdaptor_Curve.hxx>
#include <Geom_Ellipse.hxx> #include <Geom_Ellipse.hxx>
#include <Geom_OffsetCurve.hxx>
#include <Geom_TrimmedCurve.hxx> #include <Geom_TrimmedCurve.hxx>
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
#include <Geom_Surface.hxx> #include <Geom_Surface.hxx>
@ -323,7 +324,7 @@ void AIS_MaxRadiusDimension::ComputeSelection(const Handle(SelectMgr_Selection)&
else else
parStart = par; parStart = par;
Handle(Geom_TrimmedCurve)TrimCurve; Handle(Geom_Curve)TrimCurve;
if(myIsOffset) if(myIsOffset)
{ {
Handle(Geom_Curve) aCurve = myOffsetCurve; Handle(Geom_Curve) aCurve = myOffsetCurve;

View File

@ -42,6 +42,7 @@
#include <BRepAdaptor_Curve.hxx> #include <BRepAdaptor_Curve.hxx>
#include <Geom_Ellipse.hxx> #include <Geom_Ellipse.hxx>
#include <Geom_OffsetCurve.hxx>
#include <Geom_TrimmedCurve.hxx> #include <Geom_TrimmedCurve.hxx>
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
#include <Geom_Surface.hxx> #include <Geom_Surface.hxx>
@ -325,7 +326,7 @@ void AIS_MinRadiusDimension::ComputeSelection(const Handle(SelectMgr_Selection)&
} }
else else
parStart = par; parStart = par;
Handle(Geom_TrimmedCurve)TrimCurve; Handle(Geom_Curve)TrimCurve;
if(myIsOffset) if(myIsOffset)
{ {
Handle(Geom_Curve) aCurve = myOffsetCurve; Handle(Geom_Curve) aCurve = myOffsetCurve;

View File

@ -27,6 +27,7 @@
#include <TColgp_HArray1OfDir.hxx> #include <TColgp_HArray1OfDir.hxx>
#include <TColgp_HArray1OfPnt.hxx> #include <TColgp_HArray1OfPnt.hxx>
class AIS_PointCloud;
DEFINE_STANDARD_HANDLE(AIS_PointCloud, AIS_InteractiveObject) DEFINE_STANDARD_HANDLE(AIS_PointCloud, AIS_InteractiveObject)
//! Interactive object for set of points. //! Interactive object for set of points.

View File

@ -22,6 +22,7 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
class AIS_RadiusDimension;
DEFINE_STANDARD_HANDLE (AIS_RadiusDimension,AIS_Dimension) DEFINE_STANDARD_HANDLE (AIS_RadiusDimension,AIS_Dimension)
//! Radius dimension. Can be constructued: //! Radius dimension. Can be constructued:

View File

@ -1131,7 +1131,7 @@ void BOPAlgo_PaveFiller::UpdateFaceInfo
const BOPDS_Curve& theNC, const BOPDS_Curve& theNC,
const Standard_Real theTolR3D, const Standard_Real theTolR3D,
const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn, const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn,
Handle(BOPDS_PaveBlock&) aPBOut) Handle(BOPDS_PaveBlock)& aPBOut)
{ {
Standard_Boolean bRet; Standard_Boolean bRet;
Standard_Real aT1, aT2, aTm, aTx; Standard_Real aT1, aT2, aTm, aTx;

View File

@ -516,7 +516,7 @@ void BOPAlgo_PaveFiller::MakePCurves()
} }
// //
Handle(BOPDS_CommonBlock) aCB=myDS->CommonBlock(aPB); Handle(BOPDS_CommonBlock) aCB=myDS->CommonBlock(aPB);
if (!aCB) { if (aCB.IsNull()) {
continue; continue;
} }
// //

View File

@ -17,6 +17,7 @@
#include <NCollection_List.hxx> #include <NCollection_List.hxx>
class BOPDS_PaveBlock;
typedef NCollection_List<Handle(BOPDS_PaveBlock)> BOPDS_ListOfPaveBlock; typedef NCollection_List<Handle(BOPDS_PaveBlock)> BOPDS_ListOfPaveBlock;
typedef BOPDS_ListOfPaveBlock::Iterator BOPDS_ListIteratorOfListOfPaveBlock; typedef BOPDS_ListOfPaveBlock::Iterator BOPDS_ListIteratorOfListOfPaveBlock;

View File

@ -31,6 +31,7 @@
#include <Geom2d_Parabola.hxx> #include <Geom2d_Parabola.hxx>
#include <Geom2d_Hyperbola.hxx> #include <Geom2d_Hyperbola.hxx>
#include <Geom2d_TrimmedCurve.hxx> #include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2dAdaptor.hxx> #include <Geom2dAdaptor.hxx>

View File

@ -41,7 +41,7 @@
#include <BRepCheck.hxx> #include <BRepCheck.hxx>
#include <BRepCheck_ListOfStatus.hxx> #include <BRepCheck_ListOfStatus.hxx>
class BRepCheck_HSC;
DEFINE_STANDARD_HANDLE(BRepCheck_HSC, MMgt_TShared); DEFINE_STANDARD_HANDLE(BRepCheck_HSC, MMgt_TShared);
//======================================================================= //=======================================================================
//class : BRepCheck_HSC //class : BRepCheck_HSC

View File

@ -60,7 +60,7 @@
#include <Geom2d_BezierCurve.hxx> #include <Geom2d_BezierCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx> #include <Geom2d_TrimmedCurve.hxx>
#include <Geom_Surface.hxx> #include <Geom_BSplineSurface.hxx>
#include <TColgp_SequenceOfXY.hxx> #include <TColgp_SequenceOfXY.hxx>
#include <GeomPlate_PlateG0Criterion.hxx> #include <GeomPlate_PlateG0Criterion.hxx>

View File

@ -45,7 +45,7 @@
#include <Geom_BezierCurve.hxx> #include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx> #include <Geom_BSplineCurve.hxx>
#include <Geom2d_Line.hxx> #include <Geom2d_Line.hxx>
#include <Geom2d_Curve.hxx> #include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx> #include <Geom2d_TrimmedCurve.hxx>
#include <GeomLib.hxx> #include <GeomLib.hxx>
#include <GeomLib_IsPlanarSurface.hxx> #include <GeomLib_IsPlanarSurface.hxx>

View File

@ -176,7 +176,7 @@ Standard_Integer BRepGProp_Gauss::MaxSubs(const Standard_Integer theN,
//function : Init //function : Init
//purpose : //purpose :
//======================================================================= //=======================================================================
void BRepGProp_Gauss::Init(Handle(Vector)& theOutVec, void BRepGProp_Gauss::Init(NCollection_Handle<math_Vector>& theOutVec,
const Standard_Real theValue, const Standard_Real theValue,
const Standard_Integer theFirst, const Standard_Integer theFirst,
const Standard_Integer theLast) const Standard_Integer theLast)
@ -227,10 +227,10 @@ Standard_Integer BRepGProp_Gauss::FillIntervalBounds(
const TColStd_Array1OfReal& theKnots, const TColStd_Array1OfReal& theKnots,
const Standard_Integer theNumSubs, const Standard_Integer theNumSubs,
InertiaArray& theInerts, InertiaArray& theInerts,
Handle(Vector)& theParam1, NCollection_Handle<math_Vector>& theParam1,
Handle(Vector)& theParam2, NCollection_Handle<math_Vector>& theParam2,
Handle(Vector)& theError, NCollection_Handle<math_Vector>& theError,
Handle(Vector)& theCommonError) NCollection_Handle<math_Vector>& theCommonError)
{ {
const Standard_Integer aSize = const Standard_Integer aSize =
Max(theKnots.Upper(), MaxSubs(theKnots.Upper() - 1, theNumSubs)); Max(theKnots.Upper(), MaxSubs(theKnots.Upper() - 1, theNumSubs));
@ -550,10 +550,10 @@ Standard_Real BRepGProp_Gauss::Compute(
InertiaArray anInertiaU = new NCollection_Array1<Inertia>(1, SM); InertiaArray anInertiaU = new NCollection_Array1<Inertia>(1, SM);
// Prepare Gauss points and weights // Prepare Gauss points and weights
Handle(Vector) LGaussP[2]; NCollection_Handle<math_Vector> LGaussP[2];
Handle(Vector) LGaussW[2]; NCollection_Handle<math_Vector> LGaussW[2];
Handle(Vector) UGaussP[2]; NCollection_Handle<math_Vector> UGaussP[2];
Handle(Vector) UGaussW[2]; NCollection_Handle<math_Vector> UGaussW[2];
const Standard_Integer aNbGaussPoint = const Standard_Integer aNbGaussPoint =
RealToInt(Ceiling(ERROR_ALGEBR_RATIO * GPM)); RealToInt(Ceiling(ERROR_ALGEBR_RATIO * GPM));
@ -568,14 +568,14 @@ Standard_Real BRepGProp_Gauss::Compute(
UGaussW[0] = new math_Vector(1, GPM); UGaussW[0] = new math_Vector(1, GPM);
UGaussW[1] = new math_Vector(1, aNbGaussPoint); UGaussW[1] = new math_Vector(1, aNbGaussPoint);
Handle(Vector) L1 = new math_Vector(1, SM); NCollection_Handle<math_Vector> L1 = new math_Vector(1, SM);
Handle(Vector) L2 = new math_Vector(1, SM); NCollection_Handle<math_Vector> L2 = new math_Vector(1, SM);
Handle(Vector) U1 = new math_Vector(1, SM); NCollection_Handle<math_Vector> U1 = new math_Vector(1, SM);
Handle(Vector) U2 = new math_Vector(1, SM); NCollection_Handle<math_Vector> U2 = new math_Vector(1, SM);
Handle(Vector) ErrL = new math_Vector(1, SM, 0.0); NCollection_Handle<math_Vector> ErrL = new math_Vector(1, SM, 0.0);
Handle(Vector) ErrU = new math_Vector(1, SM, 0.0); NCollection_Handle<math_Vector> ErrU = new math_Vector(1, SM, 0.0);
Handle(Vector) ErrUL = new math_Vector(1, SM, 0.0); NCollection_Handle<math_Vector> ErrUL = new math_Vector(1, SM, 0.0);
// Face parametrization in U and V direction // Face parametrization in U and V direction
Standard_Real BV1, BV2, BU1, BU2; Standard_Real BV1, BV2, BU1, BU2;
@ -746,7 +746,7 @@ Standard_Real BRepGProp_Gauss::Compute(
if (Abs(u2 - u1) < EPS_PARAM) if (Abs(u2 - u1) < EPS_PARAM)
continue; continue;
Handle(Vector) aDummy; NCollection_Handle<math_Vector> aDummy;
iUSubEnd = FillIntervalBounds(u1, u2, UKnots, NumSubs, anInertiaU, U1, U2, ErrU, aDummy); iUSubEnd = FillIntervalBounds(u1, u2, UKnots, NumSubs, anInertiaU, U1, U2, ErrU, aDummy);
UMaxSubs = BRepGProp_Gauss::MaxSubs(iUSubEnd); UMaxSubs = BRepGProp_Gauss::MaxSubs(iUSubEnd);

View File

@ -251,7 +251,7 @@ private: //! @name private methods
const Standard_Integer theCoeff = 32); const Standard_Integer theCoeff = 32);
static void Init( static void Init(
Handle(Vector)& theOutVec, NCollection_Handle<math_Vector>& theOutVec,
const Standard_Real theValue, const Standard_Real theValue,
const Standard_Integer theFirst = 0, const Standard_Integer theFirst = 0,
const Standard_Integer theLast = 0); const Standard_Integer theLast = 0);
@ -268,10 +268,10 @@ private: //! @name private methods
const TColStd_Array1OfReal& theKnots, const TColStd_Array1OfReal& theKnots,
const Standard_Integer theNumSubs, const Standard_Integer theNumSubs,
InertiaArray& theInerts, InertiaArray& theInerts,
Handle(Vector)& theParam1, NCollection_Handle<math_Vector>& theParam1,
Handle(Vector)& theParam2, NCollection_Handle<math_Vector>& theParam2,
Handle(Vector)& theError, NCollection_Handle<math_Vector>& theError,
Handle(Vector)& theCommonError); NCollection_Handle<math_Vector>& theCommonError);
private: //! @name private fields private: //! @name private fields

View File

@ -30,7 +30,7 @@
# include <MAT_ListOfBisector.hxx> # include <MAT_ListOfBisector.hxx>
# include <MAT_DataMapOfIntegerBasicElt.hxx> # include <MAT_DataMapOfIntegerBasicElt.hxx>
# include <MAT_DataMapIteratorOfDataMapOfIntegerBasicElt.hxx> # include <MAT_DataMapIteratorOfDataMapOfIntegerBasicElt.hxx>
# include <Geom2d_Curve.hxx> # include <Geom2d_TrimmedCurve.hxx>
# include <gp_Pnt2d.hxx> # include <gp_Pnt2d.hxx>
# include <TColGeom2d_SequenceOfGeometry.hxx> # include <TColGeom2d_SequenceOfGeometry.hxx>
# include <Precision.hxx> # include <Precision.hxx>

View File

@ -613,12 +613,12 @@ void AdjustCurveEnd(Handle(Geom2d_BoundedCurve)& theC2d, const gp_Pnt2d theP,
if(isFirst) if(isFirst)
{ {
gp_Pnt2d aP = theC2d->Value(theC2d->LastParameter()); gp_Pnt2d aP = theC2d->Value(theC2d->LastParameter());
theC2d = GCE2d_MakeSegment(theP, aP); theC2d = GCE2d_MakeSegment(theP, aP).Value();
} }
else else
{ {
gp_Pnt2d aP = theC2d->Value(theC2d->FirstParameter()); gp_Pnt2d aP = theC2d->Value(theC2d->FirstParameter());
theC2d = GCE2d_MakeSegment(aP, theP); theC2d = GCE2d_MakeSegment(aP, theP).Value();
} }
} }
else else

View File

@ -47,6 +47,7 @@
class BRepMesh_Vertex; class BRepMesh_Vertex;
class TopoDS_Edge; class TopoDS_Edge;
class TopoDS_Vertex; class TopoDS_Vertex;
class BRepMesh_FaceAttribute;
class BRepMesh_VertexInspector; class BRepMesh_VertexInspector;
class BRepMesh_CircleInspector; class BRepMesh_CircleInspector;
class BRepMesh_Classifier; class BRepMesh_Classifier;

View File

@ -28,6 +28,7 @@ class Poly_Triangulation;
class Poly_PolygonOnTriangulation; class Poly_PolygonOnTriangulation;
class TopoDS_Edge; class TopoDS_Edge;
class TopoDS_Face; class TopoDS_Face;
class Geom2d_Curve;
//! Auxiliary class implements functionality retrieving tessellated //! Auxiliary class implements functionality retrieving tessellated
//! representation of an edge stored in polygon. //! representation of an edge stored in polygon.

View File

@ -32,6 +32,7 @@
#include <GeomLib.hxx> #include <GeomLib.hxx>
#include <Geom_Surface.hxx> #include <Geom_Surface.hxx>
#include <Geom_BSplineSurface.hxx> #include <Geom_BSplineSurface.hxx>
#include <Geom_BezierSurface.hxx>
#include <GCPnts_TangentialDeflection.hxx> #include <GCPnts_TangentialDeflection.hxx>
#include <GCPnts_AbscissaPoint.hxx> #include <GCPnts_AbscissaPoint.hxx>

View File

@ -18,9 +18,11 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_DefineAlloc.hxx> #include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepMesh_FaceAttribute.hxx> #include <BRepMesh_FaceAttribute.hxx>
#include <BRepMesh.hxx> #include <BRepMesh.hxx>
class Poly_Triangulation;
class TopoDS_Face; class TopoDS_Face;
class TopoDS_Edge; class TopoDS_Edge;
class Bnd_Box; class Bnd_Box;

View File

@ -49,6 +49,7 @@
#include <Geom_Line.hxx> #include <Geom_Line.hxx>
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
#include <Geom_TrimmedCurve.hxx> #include <Geom_TrimmedCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx> #include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <Precision.hxx> #include <Precision.hxx>
#include <Geom2d_TrimmedCurve.hxx> #include <Geom2d_TrimmedCurve.hxx>

View File

@ -92,6 +92,7 @@
#include <BRepAdaptor_Curve2d.hxx> #include <BRepAdaptor_Curve2d.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx> #include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <Geom_SphericalSurface.hxx> #include <Geom_SphericalSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <TopoDS_Wire.hxx> #include <TopoDS_Wire.hxx>
#include <BRepTools_Substitution.hxx> #include <BRepTools_Substitution.hxx>
#include <Geom_TrimmedCurve.hxx> #include <Geom_TrimmedCurve.hxx>

View File

@ -186,8 +186,8 @@ static void UpdateEdge (const TopoDS_Edge& E,
//======================================================================= //=======================================================================
static void ComputeCurve3d(TopoDS_Edge Edge, static void ComputeCurve3d(TopoDS_Edge Edge,
Handle(Geom2d_Curve) Curve, const Handle(Geom2d_Curve)& Curve,
Handle(Geom_Surface) Surf, const Handle(Geom_Surface)& Surf,
const TopLoc_Location Loc, const TopLoc_Location Loc,
Standard_Real Tol) Standard_Real Tol)
{ {

View File

@ -55,6 +55,7 @@
#include <GeomAbs_Shape.hxx> #include <GeomAbs_Shape.hxx>
#include <Geom_Curve.hxx> #include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
#include <Geom_BSplineSurface.hxx> #include <Geom_BSplineSurface.hxx>
#include <Geom_TrimmedCurve.hxx> #include <Geom_TrimmedCurve.hxx>
#include <Geom_BezierCurve.hxx> #include <Geom_BezierCurve.hxx>

View File

@ -48,6 +48,7 @@
#include <ProjLib_ComputeApproxOnPolarSurface.hxx> #include <ProjLib_ComputeApproxOnPolarSurface.hxx>
#include <DrawTrSurf.hxx> #include <DrawTrSurf.hxx>
#include <Geom_Plane.hxx>
#include <Draw_Segment3D.hxx> #include <Draw_Segment3D.hxx>
#include <Draw_Marker3D.hxx> #include <Draw_Marker3D.hxx>

View File

@ -634,7 +634,7 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
for (i=1;i<=nb;i++) for (i=1;i<=nb;i++)
{Standard_Integer s=aRakk.NbSection(i); {Standard_Integer s=aRakk.NbSection(i);
for (j=1;j<=s;j++) for (j=1;j<=s;j++)
{Handle(Geom_TrimmedCurve Sec); {Handle(Geom_TrimmedCurve) Sec;
aRakk.Section(i,j,Sec); aRakk.Section(i,j,Sec);
Sprintf(localname, "%s%d%d" ,"sec",i,j); Sprintf(localname, "%s%d%d" ,"sec",i,j);
temp =localname; temp =localname;

View File

@ -52,7 +52,7 @@
#include <gp_Trsf.hxx> #include <gp_Trsf.hxx>
#include <BRepTools_TrsfModification.hxx> #include <BRepTools_TrsfModification.hxx>
#include <Message_ProgressSentry.hxx> #include <Message_ProgressSentry.hxx>
#include <Geom_Surface.hxx>
//======================================================================= //=======================================================================

View File

@ -52,6 +52,7 @@
#include <TColStd_HArray1OfReal.hxx> #include <TColStd_HArray1OfReal.hxx>
#include <Poly_Triangulation.hxx> #include <Poly_Triangulation.hxx>
#include <Poly_PolygonOnTriangulation.hxx> #include <Poly_PolygonOnTriangulation.hxx>
#include <Poly_Polygon2D.hxx>
#include <Message_ProgressIndicator.hxx> #include <Message_ProgressIndicator.hxx>
#include <Message_ProgressSentry.hxx> #include <Message_ProgressSentry.hxx>

View File

@ -21,6 +21,8 @@
#include <BVH_SweepPlaneBuilder.hxx> #include <BVH_SweepPlaneBuilder.hxx>
#include <BVH_SpatialMedianBuilder.hxx> #include <BVH_SpatialMedianBuilder.hxx>
#include <Standard_Real.hxx>
// Specific instantiations of struct templates to avoid compilation warnings // Specific instantiations of struct templates to avoid compilation warnings
template class BVH_Box<Standard_Real, 2>; template class BVH_Box<Standard_Real, 2>;

View File

@ -19,11 +19,6 @@
#include <BinLDrivers.hxx> #include <BinLDrivers.hxx>
#include <BinTObjDrivers.hxx> #include <BinTObjDrivers.hxx>
IMPLEMENT_STANDARD_HANDLE (BinTObjDrivers_DocumentRetrievalDriver,
BinLDrivers_DocumentRetrievalDriver)
IMPLEMENT_STANDARD_RTTIEXT(BinTObjDrivers_DocumentRetrievalDriver,
BinLDrivers_DocumentRetrievalDriver)
//======================================================================= //=======================================================================
//function : BinTObjDrivers_DocumentRetrievalDriver //function : BinTObjDrivers_DocumentRetrievalDriver
//purpose : //purpose :

View File

@ -19,11 +19,6 @@
#include <BinLDrivers.hxx> #include <BinLDrivers.hxx>
#include <BinTObjDrivers.hxx> #include <BinTObjDrivers.hxx>
IMPLEMENT_STANDARD_HANDLE (BinTObjDrivers_DocumentStorageDriver,
BinLDrivers_DocumentStorageDriver)
IMPLEMENT_STANDARD_RTTIEXT(BinTObjDrivers_DocumentStorageDriver,
BinLDrivers_DocumentStorageDriver)
//======================================================================= //=======================================================================
//function : BinTObjDrivers_DocumentStorageDriver //function : BinTObjDrivers_DocumentStorageDriver
//purpose : //purpose :

View File

@ -23,6 +23,7 @@
#include <Poly_PolygonOnTriangulation.hxx> #include <Poly_PolygonOnTriangulation.hxx>
#include <Poly_Polygon3D.hxx> #include <Poly_Polygon3D.hxx>
#include <Poly_Triangulation.hxx> #include <Poly_Triangulation.hxx>
#include <Poly_Polygon2D.hxx>
#include <BRepTools.hxx> #include <BRepTools.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BRep_TVertex.hxx> #include <BRep_TVertex.hxx>

View File

@ -16,6 +16,7 @@
#include <Precision.hxx> #include <Precision.hxx>
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
#include <GC_MakeLine.hxx> #include <GC_MakeLine.hxx>
#include <Geom_Line.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx> #include <BRepBuilderAPI_MakeEdge.hxx>
#include <TopoDS_Iterator.hxx> #include <TopoDS_Iterator.hxx>

View File

@ -34,6 +34,7 @@
#include <ElCLib.hxx> #include <ElCLib.hxx>
#include <Geom_BSplineCurve.hxx> #include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_Line.hxx> #include <Geom_Line.hxx>
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
#include <Geom2d_Curve.hxx> #include <Geom2d_Curve.hxx>

View File

@ -93,7 +93,7 @@ static void Reduce(const Standard_Real& p1,
{ {
GeomAdaptor_Surface& s1 = hs1->ChangeSurface(); GeomAdaptor_Surface& s1 = hs1->ChangeSurface();
GeomAdaptor_Surface& s2 = hs2->ChangeSurface(); GeomAdaptor_Surface& s2 = hs2->ChangeSurface();
const Handle(Geom_Surface&) surf = s1.Surface(); const Handle(Geom_Surface)& surf = s1.Surface();
Standard_Real ud,uf,vd,vf; Standard_Real ud,uf,vd,vf;
surf->Bounds(ud,uf,vd,vf); surf->Bounds(ud,uf,vd,vf);
Standard_Real milmoins = 0.51*vd+0.49*vf, milplus = 0.49*vd+0.51*vf; Standard_Real milmoins = 0.51*vd+0.49*vf, milplus = 0.49*vd+0.51*vf;

View File

@ -64,6 +64,7 @@
#include <Geom2d_Line.hxx> #include <Geom2d_Line.hxx>
#include <Geom_Line.hxx> #include <Geom_Line.hxx>
#include <Geom_Curve.hxx> #include <Geom_Curve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom2d_TrimmedCurve.hxx> #include <Geom2d_TrimmedCurve.hxx>
#include <GeomInt_IntSS.hxx> #include <GeomInt_IntSS.hxx>
#include <GeomLib.hxx> #include <GeomLib.hxx>

View File

@ -580,7 +580,7 @@ static void FillSD (TopOpeBRepDS_DataStructure& DStr,
for(;trouve;) { for(;trouve;) {
const HatchGen_PointOnElement& PEtemp = pPH->Point(LeType); const HatchGen_PointOnElement& PEtemp = pPH->Point(LeType);
IE = PEtemp.Index(); IE = PEtemp.Index();
Handle(BRepAdaptor_HCurve2d) HE = Handle(BRepAdaptor_HCurve2d::DownCast(M(IE))); Handle(BRepAdaptor_HCurve2d) HE = Handle(BRepAdaptor_HCurve2d)::DownCast(M(IE));
if(!HE.IsNull()) { if(!HE.IsNull()) {
const TopoDS_Edge& Etemp = HE->ChangeCurve2d().Edge(); const TopoDS_Edge& Etemp = HE->ChangeCurve2d().Edge();
TopExp::Vertices(Etemp,V1,V2); TopExp::Vertices(Etemp,V1,V2);

View File

@ -48,6 +48,7 @@
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
#include <Geom2d_Line.hxx> #include <Geom2d_Line.hxx>
#include <Geom_Line.hxx> #include <Geom_Line.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomAdaptor_HSurface.hxx> #include <GeomAdaptor_HSurface.hxx>
#include <BRepAdaptor_Surface.hxx> #include <BRepAdaptor_Surface.hxx>

View File

@ -38,6 +38,7 @@
#include <Geom_BSplineCurve.hxx> #include <Geom_BSplineCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx> #include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_BSplineCurve.hxx> #include <Geom2d_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Law_Linear.hxx> #include <Law_Linear.hxx>
#include <BRepBlend_CSCircular.hxx> #include <BRepBlend_CSCircular.hxx>
#include <BRepBlend_Line.hxx> #include <BRepBlend_Line.hxx>

View File

@ -45,6 +45,7 @@
#include <Geom2d_Curve.hxx> #include <Geom2d_Curve.hxx>
#include <Geom2d_TrimmedCurve.hxx> #include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_Line.hxx> #include <Geom2d_Line.hxx>
#include <Geom_BSplineSurface.hxx>
#include <IntAna_QuadQuadGeo.hxx> #include <IntAna_QuadQuadGeo.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx> #include <IntCurveSurface_IntersectionPoint.hxx>

View File

@ -188,7 +188,8 @@ Geom2dHatch_Hatcher (Geom2dHatch_Intersector (IntersectorConfusion,
// if U1 and U2 coincide-->do nothing // if U1 and U2 coincide-->do nothing
if (Abs (U1 - U2) <= Precision::PConfusion()) continue; if (Abs (U1 - U2) <= Precision::PConfusion()) continue;
Handle (Geom2d_TrimmedCurve) TrimPCurve = new Geom2d_TrimmedCurve (PCurve, U1, U2); Handle (Geom2d_TrimmedCurve) TrimPCurve = new Geom2d_TrimmedCurve (PCurve, U1, U2);
AddElement (TrimPCurve, TopologicalEdge.Orientation()); Geom2dAdaptor_Curve aGAC (TrimPCurve);
AddElement (aGAC, TopologicalEdge.Orientation());
} }
} }

View File

@ -527,7 +527,7 @@ static Standard_Integer copy(Draw_Interpretor& , Standard_Integer n, const char*
D = D->Copy(); D = D->Copy();
else else
// clear old name // clear old name
Draw::Set(a[i],Handle(Draw_Drawable3D())); Draw::Set(a[i],Handle(Draw_Drawable3D)());
Draw::Set(a[i+1],D); Draw::Set(a[i+1],D);
} }

View File

@ -19,6 +19,7 @@
#include <FairCurve_Batten.hxx> #include <FairCurve_Batten.hxx>
#include <FairCurve_AnalysisCode.hxx> #include <FairCurve_AnalysisCode.hxx>
#include <GeomTools_Curve2dSet.hxx> #include <GeomTools_Curve2dSet.hxx>
#include <Geom2d_BSplineCurve.hxx>
DrawFairCurve_Batten::DrawFairCurve_Batten(const Standard_Address TheBatten) DrawFairCurve_Batten::DrawFairCurve_Batten(const Standard_Address TheBatten)
: DrawTrSurf_BSplineCurve2d( ((FairCurve_Batten*)TheBatten)->Curve()), : DrawTrSurf_BSplineCurve2d( ((FairCurve_Batten*)TheBatten)->Curve()),

View File

@ -19,6 +19,7 @@
#include <NCollection_Array1.hxx> #include <NCollection_Array1.hxx>
class Expr_NamedUnknown;
typedef NCollection_Array1<Handle(Expr_NamedUnknown)> Expr_Array1OfNamedUnknown; typedef NCollection_Array1<Handle(Expr_NamedUnknown)> Expr_Array1OfNamedUnknown;

View File

@ -22,6 +22,7 @@
#include <GC_MakeSegment.hxx> #include <GC_MakeSegment.hxx>
#include <Geom_BezierCurve.hxx> #include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx> #include <Geom_BSplineCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
#include <Geom2d_BezierCurve.hxx> #include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx> #include <Geom2d_BSplineCurve.hxx>

View File

@ -17,7 +17,6 @@
#include <Geom_Axis1Placement.ixx> #include <Geom_Axis1Placement.ixx>
typedef Geom_Axis1Placement Axis1Placement; typedef Geom_Axis1Placement Axis1Placement;
typedef Handle(Geom_Axis1Placement) Handle(Axis1Placement);
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Dir Dir; typedef gp_Dir Dir;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
@ -31,7 +30,7 @@ typedef gp_Vec Vec;
Handle(Geom_Geometry) Geom_Axis1Placement::Copy() const { Handle(Geom_Geometry) Geom_Axis1Placement::Copy() const {
Handle(Axis1Placement) A1; Handle(Geom_Axis1Placement) A1;
A1 = new Axis1Placement (axis); A1 = new Axis1Placement (axis);
return A1; return A1;
} }
@ -66,7 +65,7 @@ void Geom_Axis1Placement::Reverse() { axis.Reverse(); }
void Geom_Axis1Placement::Transform (const Trsf& T) { axis.Transform (T); } void Geom_Axis1Placement::Transform (const Trsf& T) { axis.Transform (T); }
Handle(Axis1Placement) Geom_Axis1Placement::Reversed() const { Handle(Geom_Axis1Placement) Geom_Axis1Placement::Reversed() const {
gp_Ax1 A1 = axis; gp_Ax1 A1 = axis;
A1.Reverse(); A1.Reverse();

View File

@ -16,7 +16,6 @@
#include <Geom_Axis2Placement.ixx> #include <Geom_Axis2Placement.ixx>
typedef Handle(Geom_Axis2Placement) Handle(Axis2Placement);
typedef Geom_Axis2Placement Axis2Placement; typedef Geom_Axis2Placement Axis2Placement;
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Dir Dir; typedef gp_Dir Dir;
@ -32,7 +31,7 @@ typedef gp_Vec Vec;
Handle(Geom_Geometry) Geom_Axis2Placement::Copy() const { Handle(Geom_Geometry) Geom_Axis2Placement::Copy() const {
Handle(Axis2Placement) A2; Handle(Geom_Axis2Placement) A2;
A2 = new Axis2Placement (axis.Location(), axis.Direction(), vxdir, vydir); A2 = new Axis2Placement (axis.Location(), axis.Direction(), vxdir, vydir);
return A2; return A2;
} }

View File

@ -16,7 +16,6 @@
#include <Geom_AxisPlacement.ixx> #include <Geom_AxisPlacement.ixx>
typedef Handle(Geom_AxisPlacement) Handle(AxisPlacement);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Dir Dir; typedef gp_Dir Dir;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
@ -34,7 +33,7 @@ void Geom_AxisPlacement::SetAxis (const Ax1& A1) { axis = A1; }
void Geom_AxisPlacement::SetLocation (const Pnt& P) {axis.SetLocation (P);} void Geom_AxisPlacement::SetLocation (const Pnt& P) {axis.SetLocation (P);}
Standard_Real Geom_AxisPlacement::Angle (const Handle(AxisPlacement)& Other) const { Standard_Real Geom_AxisPlacement::Angle (const Handle(Geom_AxisPlacement)& Other) const {
return axis.Angle (Other->Axis()); return axis.Angle (Other->Axis());
} }

View File

@ -17,14 +17,11 @@
#include <Geom_CartesianPoint.ixx> #include <Geom_CartesianPoint.ixx>
typedef Geom_CartesianPoint CartesianPoint; typedef Geom_CartesianPoint CartesianPoint;
typedef Handle(Geom_CartesianPoint) Handle(CartesianPoint);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Vec Vec; typedef gp_Vec Vec;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
//======================================================================= //=======================================================================
//function : Geom_CartesianPoint //function : Geom_CartesianPoint
//purpose : //purpose :
@ -49,7 +46,7 @@ const Standard_Real X, const Standard_Real Y, const Standard_Real Z) : gpPnt (X,
Handle(Geom_Geometry) Geom_CartesianPoint::Copy() const { Handle(Geom_Geometry) Geom_CartesianPoint::Copy() const {
Handle(CartesianPoint) P; Handle(Geom_CartesianPoint) P;
P = new CartesianPoint (gpPnt); P = new CartesianPoint (gpPnt);
return P; return P;
} }

View File

@ -21,7 +21,6 @@
#include <Standard_ConstructionError.hxx> #include <Standard_ConstructionError.hxx>
typedef Geom_Circle Circle; typedef Geom_Circle Circle;
typedef Handle(Geom_Circle) Handle(Circle);
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
@ -38,7 +37,7 @@ typedef gp_XYZ XYZ;
Handle(Geom_Geometry) Geom_Circle::Copy() const { Handle(Geom_Geometry) Geom_Circle::Copy() const {
Handle(Circle) C; Handle(Geom_Circle) C;
C = new Circle (pos, radius); C = new Circle (pos, radius);
return C; return C;
} }

View File

@ -32,7 +32,6 @@
#include <Geom_Circle.hxx> #include <Geom_Circle.hxx>
typedef Geom_ConicalSurface ConicalSurface; typedef Geom_ConicalSurface ConicalSurface;
typedef Handle(Geom_ConicalSurface) Handle(ConicalSurface);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Ax3 Ax3; typedef gp_Ax3 Ax3;
@ -44,9 +43,6 @@ typedef gp_Trsf Trsf;
typedef gp_Vec Vec; typedef gp_Vec Vec;
typedef gp_XYZ XYZ; typedef gp_XYZ XYZ;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -54,7 +50,7 @@ typedef gp_XYZ XYZ;
Handle(Geom_Geometry) Geom_ConicalSurface::Copy () const { Handle(Geom_Geometry) Geom_ConicalSurface::Copy () const {
Handle(ConicalSurface) Cs; Handle(Geom_ConicalSurface) Cs;
Cs = new ConicalSurface (pos, semiAngle, radius); Cs = new ConicalSurface (pos, semiAngle, radius);
return Cs; return Cs;
} }

View File

@ -17,17 +17,15 @@
#include <Geom_Curve.ixx> #include <Geom_Curve.ixx>
typedef Geom_Curve Curve; typedef Geom_Curve Curve;
typedef Handle(Geom_Curve) Handle(Curve);
//======================================================================= //=======================================================================
//function : Reversed //function : Reversed
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Curve) Geom_Curve::Reversed () const Handle(Geom_Curve) Geom_Curve::Reversed () const
{ {
Handle(Curve) C = Handle(Curve)::DownCast(Copy()); Handle(Geom_Curve) C = Handle(Geom_Curve)::DownCast(Copy());
C->Reverse(); C->Reverse();
return C; return C;
} }

View File

@ -31,7 +31,6 @@
#include <ElSLib.hxx> #include <ElSLib.hxx>
typedef Geom_CylindricalSurface CylindricalSurface; typedef Geom_CylindricalSurface CylindricalSurface;
typedef Handle(Geom_CylindricalSurface) Handle(CylindricalSurface);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
@ -53,7 +52,7 @@ typedef gp_XYZ XYZ;
Handle(Geom_Geometry) Geom_CylindricalSurface::Copy () const { Handle(Geom_Geometry) Geom_CylindricalSurface::Copy () const {
Handle(CylindricalSurface) Cs; Handle(Geom_CylindricalSurface) Cs;
Cs = new CylindricalSurface (pos, radius); Cs = new CylindricalSurface (pos, radius);
return Cs; return Cs;
} }

View File

@ -19,9 +19,7 @@
#include <Standard_ConstructionError.hxx> #include <Standard_ConstructionError.hxx>
typedef Geom_Direction Direction; typedef Geom_Direction Direction;
typedef Handle(Geom_Direction) Handle(Direction);
typedef Geom_Vector Vector; typedef Geom_Vector Vector;
typedef Handle(Geom_Vector) Handle(Vector);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
@ -36,7 +34,7 @@ typedef gp_Trsf Trsf;
Handle(Geom_Geometry) Geom_Direction::Copy() const { Handle(Geom_Geometry) Geom_Direction::Copy() const {
Handle(Direction) D; Handle(Geom_Direction) D;
D = new Direction (gpVec); D = new Direction (gpVec);
return D; return D;
} }
@ -95,7 +93,7 @@ void Geom_Direction::SetZ (const Standard_Real Z) {
} }
void Geom_Direction::Cross (const Handle(Vector)& Other) { void Geom_Direction::Cross (const Handle(Geom_Vector)& Other) {
gp_Dir V (gpVec.Crossed(Other->Vec())); gp_Dir V (gpVec.Crossed(Other->Vec()));
gpVec = V; gpVec = V;
@ -103,14 +101,14 @@ void Geom_Direction::Cross (const Handle(Vector)& Other) {
void Geom_Direction::CrossCross ( void Geom_Direction::CrossCross (
const Handle(Vector)& V1, const Handle(Vector)& V2) { const Handle(Geom_Vector)& V1, const Handle(Geom_Vector)& V2) {
gp_Dir V (gpVec.CrossCrossed (V1->Vec(), V2->Vec())); gp_Dir V (gpVec.CrossCrossed (V1->Vec(), V2->Vec()));
gpVec = V; gpVec = V;
} }
Handle(Vector) Geom_Direction::Crossed (const Handle(Vector)& Other) Handle(Geom_Vector) Geom_Direction::Crossed (const Handle(Geom_Vector)& Other)
const { const {
gp_Dir V (gpVec.Crossed (Other->Vec())); gp_Dir V (gpVec.Crossed (Other->Vec()));
@ -118,8 +116,8 @@ const {
} }
Handle(Vector) Geom_Direction::CrossCrossed ( Handle(Geom_Vector) Geom_Direction::CrossCrossed (
const Handle(Vector)& V1, const Handle(Vector)& V2) const { const Handle(Geom_Vector)& V1, const Handle(Geom_Vector)& V2) const {
gp_Dir V (gpVec.CrossCrossed (V1->Vec(), V2->Vec())); gp_Dir V (gpVec.CrossCrossed (V1->Vec(), V2->Vec()));
return new Direction (V); return new Direction (V);

View File

@ -16,12 +16,7 @@
#include <Geom_ElementarySurface.ixx> #include <Geom_ElementarySurface.ixx>
typedef Geom_ElementarySurface ElementarySurface; typedef Geom_ElementarySurface ElementarySurface;
typedef Handle(Geom_ElementarySurface) Handle(ElementarySurface);
typedef Handle(Geom_Surface) Handle(Surface);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Ax3 Ax3; typedef gp_Ax3 Ax3;
@ -29,9 +24,6 @@ typedef gp_Dir Dir;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
typedef gp_Vec Vec; typedef gp_Vec Vec;
//======================================================================= //=======================================================================
//function : Continuity //function : Continuity
//purpose : //purpose :

View File

@ -21,7 +21,6 @@
#include <Standard_RangeError.hxx> #include <Standard_RangeError.hxx>
typedef Geom_Ellipse Ellipse; typedef Geom_Ellipse Ellipse;
typedef Handle(Geom_Ellipse) Handle(Ellipse);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
@ -29,10 +28,6 @@ typedef gp_Vec Vec;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
typedef gp_XYZ XYZ; typedef gp_XYZ XYZ;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -40,7 +35,7 @@ typedef gp_XYZ XYZ;
Handle(Geom_Geometry) Geom_Ellipse::Copy() const Handle(Geom_Geometry) Geom_Ellipse::Copy() const
{ {
Handle(Ellipse) E; Handle(Geom_Ellipse) E;
E = new Ellipse (pos, majorRadius, minorRadius); E = new Ellipse (pos, majorRadius, minorRadius);
return E; return E;
} }

View File

@ -20,7 +20,6 @@
#include <Geom_Geometry.ixx> #include <Geom_Geometry.ixx>
#include <Standard_ConstructionError.hxx> #include <Standard_ConstructionError.hxx>
typedef Handle(Geom_Geometry) Handle(Geometry);
typedef Geom_Geometry Geometry; typedef Geom_Geometry Geometry;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
typedef gp_Vec Vec; typedef gp_Vec Vec;
@ -28,8 +27,6 @@ typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
Handle(Geom_Geometry) Geom_Geometry::Copy() const { Handle(Geom_Geometry) Geom_Geometry::Copy() const {
Handle(Geom_Geometry) G; Handle(Geom_Geometry) G;
@ -94,85 +91,69 @@ void Geom_Geometry::Translate (const gp_Pnt& P1, const gp_Pnt& P2) {
} }
Handle(Geometry) Geom_Geometry::Mirrored (const gp_Pnt& P) const { Handle(Geom_Geometry) Geom_Geometry::Mirrored (const gp_Pnt& P) const
{
Handle(Geometry) me = this; Handle(Geom_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Mirror (P); G->Mirror (P);
return G; return G;
} }
Handle(Geometry) Geom_Geometry::Mirrored (const gp_Ax1& A1) const { Handle(Geom_Geometry) Geom_Geometry::Mirrored (const gp_Ax1& A1) const
{
Handle(Geometry) me = this; Handle(Geom_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Mirror (A1); G->Mirror (A1);
return G; return G;
} }
Handle(Geometry) Geom_Geometry::Mirrored (const gp_Ax2& A2) const { Handle(Geom_Geometry) Geom_Geometry::Mirrored (const gp_Ax2& A2) const
{
Handle(Geometry) me = this; Handle(Geom_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Mirror (A2); G->Mirror (A2);
return G; return G;
} }
Handle(Geometry) Geom_Geometry::Rotated ( Handle(Geom_Geometry) Geom_Geometry::Rotated (const gp_Ax1& A1, const Standard_Real Ang) const
{
const gp_Ax1& A1, Handle(Geom_Geometry) G = Copy();
const Standard_Real Ang
) const {
Handle(Geometry) me = this;
Handle(Geometry) G = me->Copy();
G->Rotate (A1, Ang); G->Rotate (A1, Ang);
return G; return G;
} }
Handle(Geometry) Geom_Geometry::Scaled (const gp_Pnt& P, const Standard_Real S) const { Handle(Geom_Geometry) Geom_Geometry::Scaled (const gp_Pnt& P, const Standard_Real S) const
{
Handle(Geometry) me = this; Handle(Geom_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Scale (P, S); G->Scale (P, S);
return G; return G;
} }
Handle(Geometry) Geom_Geometry::Transformed (const gp_Trsf& T) const { Handle(Geom_Geometry) Geom_Geometry::Transformed (const gp_Trsf& T) const
{
Handle(Geometry) me = this; Handle(Geom_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Transform (T); G->Transform (T);
return G; return G;
} }
Handle(Geometry) Geom_Geometry::Translated (const gp_Vec& V) const { Handle(Geom_Geometry) Geom_Geometry::Translated (const gp_Vec& V) const
{
Handle(Geometry) me = this; Handle(Geom_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Translate (V); G->Translate (V);
return G; return G;
} }
Handle(Geometry) Geom_Geometry::Translated ( Handle(Geom_Geometry) Geom_Geometry::Translated (const gp_Pnt& P1, const gp_Pnt& P2) const
{
const gp_Pnt& P1, Handle(Geom_Geometry) G = Copy();
const gp_Pnt& P2
) const {
Handle(Geometry) me = this;
Handle(Geometry) G = me->Copy();
G->Translate (P1, P2); G->Translate (P1, P2);
return G; return G;
} }

View File

@ -24,7 +24,6 @@
typedef Geom_Hyperbola Hyperbola; typedef Geom_Hyperbola Hyperbola;
typedef Handle(Geom_Hyperbola) Handle(Hyperbola);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
@ -32,10 +31,6 @@ typedef gp_Vec Vec;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
typedef gp_XYZ XYZ; typedef gp_XYZ XYZ;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -43,7 +38,7 @@ typedef gp_XYZ XYZ;
Handle(Geom_Geometry) Geom_Hyperbola::Copy() const { Handle(Geom_Geometry) Geom_Hyperbola::Copy() const {
Handle(Hyperbola) H; Handle(Geom_Hyperbola) H;
H = new Hyperbola (pos, majorRadius, minorRadius); H = new Hyperbola (pos, majorRadius, minorRadius);
return H; return H;
} }

View File

@ -42,20 +42,13 @@
#include <CSLib_Offset.hxx> #include <CSLib_Offset.hxx>
typedef Geom_OffsetCurve OffsetCurve; typedef Geom_OffsetCurve OffsetCurve;
typedef Handle(Geom_OffsetCurve) Handle(OffsetCurve);
typedef Geom_Curve Curve; typedef Geom_Curve Curve;
typedef Handle(Geom_Curve) Handle(Curve);
typedef Handle(Geom_Geometry) Handle(Geometry);
typedef gp_Dir Dir; typedef gp_Dir Dir;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
typedef gp_Vec Vec; typedef gp_Vec Vec;
typedef gp_XYZ XYZ; typedef gp_XYZ XYZ;
//ordre de derivation maximum pour la recherche de la premiere //ordre de derivation maximum pour la recherche de la premiere
//derivee non nulle //derivee non nulle
static const int maxDerivOrder = 3; static const int maxDerivOrder = 3;
@ -79,7 +72,7 @@ static Standard_Boolean AdjustDerivative(
Handle(Geom_Geometry) Geom_OffsetCurve::Copy () const { Handle(Geom_Geometry) Geom_OffsetCurve::Copy () const {
Handle(OffsetCurve) C; Handle(Geom_OffsetCurve) C;
C = new OffsetCurve (basisCurve, offsetValue, direction); C = new OffsetCurve (basisCurve, offsetValue, direction);
return C; return C;
} }
@ -174,12 +167,12 @@ Standard_Real Geom_OffsetCurve::Period () const
//purpose : //purpose :
//======================================================================= //=======================================================================
void Geom_OffsetCurve::SetBasisCurve (const Handle(Curve)& C, void Geom_OffsetCurve::SetBasisCurve (const Handle(Geom_Curve)& C,
const Standard_Boolean isNotCheckC0) const Standard_Boolean isNotCheckC0)
{ {
const Standard_Real aUf = C->FirstParameter(), const Standard_Real aUf = C->FirstParameter(),
aUl = C->LastParameter(); aUl = C->LastParameter();
Handle(Curve) aCheckingCurve = Handle(Curve)::DownCast(C->Copy()); Handle(Geom_Curve) aCheckingCurve = Handle(Geom_Curve)::DownCast(C->Copy());
Standard_Boolean isTrimmed = Standard_False; Standard_Boolean isTrimmed = Standard_False;
while(aCheckingCurve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)) || while(aCheckingCurve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)) ||
@ -255,7 +248,7 @@ void Geom_OffsetCurve::SetBasisCurve (const Handle(Curve)& C,
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Curve) Geom_OffsetCurve::BasisCurve () const Handle(Geom_Curve) Geom_OffsetCurve::BasisCurve () const
{ {
return basisCurve; return basisCurve;
} }

View File

@ -71,13 +71,8 @@
#include <GeomAbs_Shape.hxx> #include <GeomAbs_Shape.hxx>
#include <GeomAbs_CurveType.hxx> #include <GeomAbs_CurveType.hxx>
typedef Handle(Geom_OffsetCurve) Handle(OffsetCurve);
typedef Geom_OffsetCurve OffsetCurve; typedef Geom_OffsetCurve OffsetCurve;
typedef Handle(Geom_Curve) Handle(Curve);
typedef Handle(Geom_Surface) Handle(Surface);
typedef Handle(Geom_OffsetSurface) Handle(OffsetSurface);
typedef Geom_OffsetSurface OffsetSurface; typedef Geom_OffsetSurface OffsetSurface;
typedef Handle(Geom_Geometry) Handle(Geometry);
typedef gp_Dir Dir; typedef gp_Dir Dir;
typedef gp_Vec Vec; typedef gp_Vec Vec;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
@ -210,7 +205,7 @@ static void derivatives(Standard_Integer MaxOrder,
Handle(Geom_Geometry) Geom_OffsetSurface::Copy () const { Handle(Geom_Geometry) Geom_OffsetSurface::Copy () const {
Handle(OffsetSurface) S; Handle(Geom_OffsetSurface) S;
S = new OffsetSurface (basisSurf, offsetValue); S = new OffsetSurface (basisSurf, offsetValue);
return S; return S;
} }
@ -240,13 +235,13 @@ Geom_OffsetSurface::Geom_OffsetSurface (const Handle(Geom_Surface)& theSurf,
//purpose : //purpose :
//======================================================================= //=======================================================================
void Geom_OffsetSurface::SetBasisSurface (const Handle(Surface)& S, void Geom_OffsetSurface::SetBasisSurface (const Handle(Geom_Surface)& S,
const Standard_Boolean isNotCheckC0) const Standard_Boolean isNotCheckC0)
{ {
Standard_Real aUf, aUl, aVf, aVl; Standard_Real aUf, aUl, aVf, aVl;
S->Bounds(aUf, aUl, aVf, aVl); S->Bounds(aUf, aUl, aVf, aVl);
Handle(Surface) aCheckingSurf = Handle(Surface)::DownCast(S->Copy()); Handle(Geom_Surface) aCheckingSurf = Handle(Geom_Surface)::DownCast(S->Copy());
Standard_Boolean isTrimmed = Standard_False; Standard_Boolean isTrimmed = Standard_False;
while(aCheckingSurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)) || while(aCheckingSurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)) ||
@ -429,7 +424,7 @@ Standard_Real Geom_OffsetSurface::VReversedParameter( const Standard_Real V) con
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Surface) Geom_OffsetSurface::BasisSurface () const Handle(Geom_Surface) Geom_OffsetSurface::BasisSurface () const
{ {
return basisSurf; return basisSurf;
} }
@ -1280,7 +1275,8 @@ Handle(Geom_Curve) Geom_OffsetSurface::UIso (const Standard_Real UU) const
GeomAbs_Shape Cont = GeomAbs_C1; GeomAbs_Shape Cont = GeomAbs_C1;
Standard_Integer MaxSeg = 100, MaxDeg =14; Standard_Integer MaxSeg = 100, MaxDeg =14;
Geom_OffsetSurface_UIsoEvaluator ev (this, UU); Handle(Geom_OffsetSurface) me (this);
Geom_OffsetSurface_UIsoEvaluator ev (me, UU);
AdvApprox_ApproxAFunction Approx(Num1, Num2, Num3, T1, T2, T3, AdvApprox_ApproxAFunction Approx(Num1, Num2, Num3, T1, T2, T3,
V1, V2, Cont, V1, V2, Cont,
MaxDeg,MaxSeg, ev); MaxDeg,MaxSeg, ev);
@ -1347,7 +1343,8 @@ Handle(Geom_Curve) Geom_OffsetSurface::VIso (const Standard_Real VV) const
GeomAbs_Shape Cont = GeomAbs_C1; GeomAbs_Shape Cont = GeomAbs_C1;
Standard_Integer MaxSeg = 100, MaxDeg =14; Standard_Integer MaxSeg = 100, MaxDeg =14;
Geom_OffsetSurface_VIsoEvaluator ev (this, VV); Handle(Geom_OffsetSurface) me (this);
Geom_OffsetSurface_VIsoEvaluator ev (me, VV);
AdvApprox_ApproxAFunction Approx (Num1, Num2, Num3, T1, T2, T3, AdvApprox_ApproxAFunction Approx (Num1, Num2, Num3, T1, T2, T3,
U1, U2, Cont, MaxDeg, MaxSeg, ev); U1, U2, Cont, MaxDeg, MaxSeg, ev);
@ -1447,13 +1444,13 @@ Standard_Real Geom_OffsetSurface::VPeriod() const
Standard_Boolean Geom_OffsetSurface::IsUClosed () const { Standard_Boolean Geom_OffsetSurface::IsUClosed () const {
Standard_Boolean UClosed; Standard_Boolean UClosed;
Handle(Surface) SBasis = BasisSurface(); Handle(Geom_Surface) SBasis = BasisSurface();
if (SBasis->IsKind (STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { if (SBasis->IsKind (STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
Handle(Geom_RectangularTrimmedSurface) St = Handle(Geom_RectangularTrimmedSurface) St =
Handle(Geom_RectangularTrimmedSurface)::DownCast(SBasis); Handle(Geom_RectangularTrimmedSurface)::DownCast(SBasis);
Handle(Surface) S = Handle(Surface)::DownCast(St->BasisSurface()); Handle(Geom_Surface) S = Handle(Geom_Surface)::DownCast(St->BasisSurface());
if (S->IsKind (STANDARD_TYPE(Geom_ElementarySurface))) { if (S->IsKind (STANDARD_TYPE(Geom_ElementarySurface))) {
UClosed = SBasis->IsUClosed(); UClosed = SBasis->IsUClosed();
} }
@ -1461,7 +1458,7 @@ Standard_Boolean Geom_OffsetSurface::IsUClosed () const {
Handle(Geom_SurfaceOfLinearExtrusion) Extru = Handle(Geom_SurfaceOfLinearExtrusion) Extru =
Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(S); Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(S);
Handle(Curve) C = Extru->BasisCurve(); Handle(Geom_Curve) C = Extru->BasisCurve();
if (C->IsKind (STANDARD_TYPE(Geom_Circle)) || C->IsKind (STANDARD_TYPE(Geom_Ellipse))) { if (C->IsKind (STANDARD_TYPE(Geom_Circle)) || C->IsKind (STANDARD_TYPE(Geom_Ellipse))) {
UClosed = SBasis->IsUClosed(); UClosed = SBasis->IsUClosed();
} }
@ -1480,7 +1477,7 @@ Standard_Boolean Geom_OffsetSurface::IsUClosed () const {
Handle(Geom_SurfaceOfLinearExtrusion) Extru = Handle(Geom_SurfaceOfLinearExtrusion) Extru =
Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(SBasis); Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(SBasis);
Handle(Curve) C = Extru->BasisCurve(); Handle(Geom_Curve) C = Extru->BasisCurve();
UClosed = (C->IsKind(STANDARD_TYPE(Geom_Circle)) || C->IsKind(STANDARD_TYPE(Geom_Ellipse))); UClosed = (C->IsKind(STANDARD_TYPE(Geom_Circle)) || C->IsKind(STANDARD_TYPE(Geom_Ellipse)));
} }
else if (SBasis->IsKind (STANDARD_TYPE(Geom_SurfaceOfRevolution))) { else if (SBasis->IsKind (STANDARD_TYPE(Geom_SurfaceOfRevolution))) {
@ -1500,13 +1497,13 @@ Standard_Boolean Geom_OffsetSurface::IsUClosed () const {
Standard_Boolean Geom_OffsetSurface::IsVClosed () const { Standard_Boolean Geom_OffsetSurface::IsVClosed () const {
Standard_Boolean VClosed; Standard_Boolean VClosed;
Handle(Surface) SBasis = BasisSurface(); Handle(Geom_Surface) SBasis = BasisSurface();
if (SBasis->IsKind (STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { if (SBasis->IsKind (STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
Handle(Geom_RectangularTrimmedSurface) St = Handle(Geom_RectangularTrimmedSurface) St =
Handle(Geom_RectangularTrimmedSurface)::DownCast(SBasis); Handle(Geom_RectangularTrimmedSurface)::DownCast(SBasis);
Handle(Surface) S = Handle(Surface)::DownCast(St->BasisSurface()); Handle(Geom_Surface) S = Handle(Geom_Surface)::DownCast(St->BasisSurface());
if (S->IsKind (STANDARD_TYPE(Geom_ElementarySurface))) { if (S->IsKind (STANDARD_TYPE(Geom_ElementarySurface))) {
VClosed = SBasis->IsVClosed(); VClosed = SBasis->IsVClosed();
} }

View File

@ -23,7 +23,6 @@
#include <Standard_RangeError.hxx> #include <Standard_RangeError.hxx>
typedef Geom_Parabola Parabola; typedef Geom_Parabola Parabola;
typedef Handle(Geom_Parabola) Handle(Parabola);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
@ -31,11 +30,6 @@ typedef gp_Trsf Trsf;
typedef gp_Vec Vec; typedef gp_Vec Vec;
typedef gp_XYZ XYZ; typedef gp_XYZ XYZ;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -43,7 +37,7 @@ typedef gp_XYZ XYZ;
Handle(Geom_Geometry) Geom_Parabola::Copy() const { Handle(Geom_Geometry) Geom_Parabola::Copy() const {
Handle(Parabola) Prb; Handle(Geom_Parabola) Prb;
Prb = new Parabola (pos, focalLength); Prb = new Parabola (pos, focalLength);
return Prb; return Prb;
} }

View File

@ -28,9 +28,6 @@
#include <GeomAbs_UVSense.hxx> #include <GeomAbs_UVSense.hxx>
typedef Geom_Plane Plane; typedef Geom_Plane Plane;
typedef Handle(Geom_Plane) Handle(Plane);
typedef Handle(Geom_Line) Handle(Line);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Ax3 Ax3; typedef gp_Ax3 Ax3;
@ -42,8 +39,6 @@ typedef gp_Trsf Trsf;
typedef gp_Vec Vec; typedef gp_Vec Vec;
typedef gp_XYZ XYZ; typedef gp_XYZ XYZ;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -51,7 +46,7 @@ typedef gp_XYZ XYZ;
Handle(Geom_Geometry) Geom_Plane::Copy () const { Handle(Geom_Geometry) Geom_Plane::Copy () const {
Handle(Plane) Pl = new Plane ( pos); Handle(Geom_Plane) Pl = new Plane ( pos);
return Pl; return Pl;
} }

View File

@ -16,12 +16,9 @@
#include <Geom_Point.ixx> #include <Geom_Point.ixx>
typedef Handle(Geom_Point) Handle(Point);
typedef Geom_Point Point; typedef Geom_Point Point;
Standard_Real Geom_Point::Distance (const Handle(Geom_Point)& Other) const {
Standard_Real Geom_Point::Distance (const Handle(Point)& Other) const {
gp_Pnt P1 = this->Pnt (); gp_Pnt P1 = this->Pnt ();
gp_Pnt P2 = Other->Pnt (); gp_Pnt P2 = Other->Pnt ();
@ -29,7 +26,7 @@ Standard_Real Geom_Point::Distance (const Handle(Point)& Other) const {
} }
Standard_Real Geom_Point::SquareDistance (const Handle(Point)& Other) const { Standard_Real Geom_Point::SquareDistance (const Handle(Geom_Point)& Other) const {
gp_Pnt P1 = this->Pnt (); gp_Pnt P1 = this->Pnt ();
gp_Pnt P2 = Other->Pnt (); gp_Pnt P2 = Other->Pnt ();

View File

@ -42,21 +42,13 @@
#include <Precision.hxx> #include <Precision.hxx>
#include <ElCLib.hxx> #include <ElCLib.hxx>
typedef Handle(Geom_Surface) Handle(Surface);
typedef Handle(Geom_Geometry) Handle(Geometry);
typedef Geom_RectangularTrimmedSurface RectangularTrimmedSurface; typedef Geom_RectangularTrimmedSurface RectangularTrimmedSurface;
typedef Handle(Geom_RectangularTrimmedSurface) Handle(RectangularTrimmedSurface);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
typedef gp_Vec Vec; typedef gp_Vec Vec;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -64,7 +56,7 @@ typedef gp_Vec Vec;
Handle(Geom_Geometry) Geom_RectangularTrimmedSurface::Copy () const { Handle(Geom_Geometry) Geom_RectangularTrimmedSurface::Copy () const {
Handle(RectangularTrimmedSurface) S; Handle(Geom_RectangularTrimmedSurface) S;
if ( isutrimmed && isvtrimmed ) if ( isutrimmed && isvtrimmed )
S = new RectangularTrimmedSurface (basisSurf, S = new RectangularTrimmedSurface (basisSurf,
@ -91,7 +83,7 @@ Handle(Geom_Geometry) Geom_RectangularTrimmedSurface::Copy () const {
Geom_RectangularTrimmedSurface::Geom_RectangularTrimmedSurface ( Geom_RectangularTrimmedSurface::Geom_RectangularTrimmedSurface (
const Handle(Surface)& S, const Handle(Geom_Surface)& S,
const Standard_Real U1, const Standard_Real U1,
const Standard_Real U2, const Standard_Real U2,
const Standard_Real V1, const Standard_Real V1,
@ -111,9 +103,9 @@ const Standard_Boolean VSense)
Handle(Geom_RectangularTrimmedSurface) T = Handle(Geom_RectangularTrimmedSurface) T =
Handle(Geom_RectangularTrimmedSurface)::DownCast(S); Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
if (!T.IsNull()) if (!T.IsNull())
basisSurf = Handle(Surface)::DownCast(T->BasisSurface()->Copy()); basisSurf = Handle(Geom_Surface)::DownCast(T->BasisSurface()->Copy());
else else
basisSurf = Handle(Surface)::DownCast(S->Copy()); basisSurf = Handle(Geom_Surface)::DownCast(S->Copy());
Handle(Geom_OffsetSurface) O = Handle(Geom_OffsetSurface) O =
Handle(Geom_OffsetSurface)::DownCast(basisSurf); Handle(Geom_OffsetSurface)::DownCast(basisSurf);
@ -122,7 +114,7 @@ const Standard_Boolean VSense)
Handle(Geom_RectangularTrimmedSurface) S2 = Handle(Geom_RectangularTrimmedSurface) S2 =
new Geom_RectangularTrimmedSurface( O->BasisSurface(),U1,U2, V1, V2, USense, VSense); new Geom_RectangularTrimmedSurface( O->BasisSurface(),U1,U2, V1, V2, USense, VSense);
Handle(Geom_OffsetSurface) OS = new Geom_OffsetSurface(S2, O->Offset()); Handle(Geom_OffsetSurface) OS = new Geom_OffsetSurface(S2, O->Offset());
basisSurf = Handle(Surface)::DownCast(OS); basisSurf = Handle(Geom_Surface)::DownCast(OS);
} }
SetTrim( U1, U2, V1, V2, USense, VSense); SetTrim( U1, U2, V1, V2, USense, VSense);
@ -147,9 +139,9 @@ Geom_RectangularTrimmedSurface::Geom_RectangularTrimmedSurface (
Handle(Geom_RectangularTrimmedSurface) T = Handle(Geom_RectangularTrimmedSurface) T =
Handle(Geom_RectangularTrimmedSurface)::DownCast(S); Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
if (!T.IsNull()) if (!T.IsNull())
basisSurf = Handle(Surface)::DownCast(T->BasisSurface()->Copy()); basisSurf = Handle(Geom_Surface)::DownCast(T->BasisSurface()->Copy());
else else
basisSurf = Handle(Surface)::DownCast(S->Copy()); basisSurf = Handle(Geom_Surface)::DownCast(S->Copy());
Handle(Geom_OffsetSurface) O = Handle(Geom_OffsetSurface) O =
Handle(Geom_OffsetSurface)::DownCast(basisSurf); Handle(Geom_OffsetSurface)::DownCast(basisSurf);
@ -158,7 +150,7 @@ Geom_RectangularTrimmedSurface::Geom_RectangularTrimmedSurface (
Handle(Geom_RectangularTrimmedSurface) S2 = Handle(Geom_RectangularTrimmedSurface) S2 =
new Geom_RectangularTrimmedSurface( O->BasisSurface(),Param1,Param2, UTrim, Sense); new Geom_RectangularTrimmedSurface( O->BasisSurface(),Param1,Param2, UTrim, Sense);
Handle(Geom_OffsetSurface) OS = new Geom_OffsetSurface(S2, O->Offset()); Handle(Geom_OffsetSurface) OS = new Geom_OffsetSurface(S2, O->Offset());
basisSurf = Handle(Surface)::DownCast(OS); basisSurf = Handle(Geom_Surface)::DownCast(OS);
} }
SetTrim(Param1, Param2, UTrim, Sense); SetTrim(Param1, Param2, UTrim, Sense);
@ -380,7 +372,7 @@ Standard_Real Geom_RectangularTrimmedSurface::VReversedParameter( const Standard
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Surface) Geom_RectangularTrimmedSurface::BasisSurface () const Handle(Geom_Surface) Geom_RectangularTrimmedSurface::BasisSurface () const
{ {
return basisSurf; return basisSurf;
} }

View File

@ -26,9 +26,6 @@
typedef Geom_Circle Circle; typedef Geom_Circle Circle;
typedef Geom_SphericalSurface SphericalSurface; typedef Geom_SphericalSurface SphericalSurface;
typedef Handle(Geom_SphericalSurface) Handle(SphericalSurface);
typedef Handle(Geom_Curve) Handle(Curve);
typedef Handle(Geom_Circle) Handle(Circle);
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Ax3 Ax3; typedef gp_Ax3 Ax3;
typedef gp_Circ Circ; typedef gp_Circ Circ;
@ -38,9 +35,6 @@ typedef gp_Trsf Trsf;
typedef gp_XYZ XYZ; typedef gp_XYZ XYZ;
typedef gp_Vec Vec; typedef gp_Vec Vec;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -48,7 +42,7 @@ typedef gp_Vec Vec;
Handle(Geom_Geometry) Geom_SphericalSurface::Copy () const { Handle(Geom_Geometry) Geom_SphericalSurface::Copy () const {
Handle(SphericalSurface) Cs; Handle(Geom_SphericalSurface) Cs;
Cs = new SphericalSurface (pos, radius); Cs = new SphericalSurface (pos, radius);
return Cs; return Cs;
} }
@ -313,7 +307,7 @@ gp_Sphere Geom_SphericalSurface::Sphere () const {
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Curve) Geom_SphericalSurface::UIso (const Standard_Real U) const Handle(Geom_Curve) Geom_SphericalSurface::UIso (const Standard_Real U) const
{ {
Handle(Geom_Circle) GC = new Geom_Circle(ElSLib::SphereUIso(pos,radius,U)); Handle(Geom_Circle) GC = new Geom_Circle(ElSLib::SphereUIso(pos,radius,U));
Handle(Geom_TrimmedCurve) iso = new Geom_TrimmedCurve(GC,-M_PI/2.,M_PI/2); Handle(Geom_TrimmedCurve) iso = new Geom_TrimmedCurve(GC,-M_PI/2.,M_PI/2);
@ -326,7 +320,7 @@ Handle(Curve) Geom_SphericalSurface::UIso (const Standard_Real U) const
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Curve) Geom_SphericalSurface::VIso (const Standard_Real V) const Handle(Geom_Curve) Geom_SphericalSurface::VIso (const Standard_Real V) const
{ {
Handle(Geom_Circle) Handle(Geom_Circle)
GC = new Geom_Circle(ElSLib::SphereVIso(pos,radius,V)); GC = new Geom_Circle(ElSLib::SphereVIso(pos,radius,V));

View File

@ -17,17 +17,15 @@
#include <Geom_Surface.ixx> #include <Geom_Surface.ixx>
typedef Geom_Surface Surface; typedef Geom_Surface Surface;
typedef Handle(Geom_Surface) Handle(Surface);
//======================================================================= //=======================================================================
//function : UReversed //function : UReversed
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Surface) Geom_Surface::UReversed () const Handle(Geom_Surface) Geom_Surface::UReversed () const
{ {
Handle(Surface) S = Handle(Surface)::DownCast(Copy()); Handle(Geom_Surface) S = Handle(Geom_Surface)::DownCast(Copy());
S->UReverse(); S->UReverse();
return S; return S;
} }
@ -38,9 +36,9 @@ Handle(Surface) Geom_Surface::UReversed () const
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Surface) Geom_Surface::VReversed () const Handle(Geom_Surface) Geom_Surface::VReversed () const
{ {
Handle(Surface) S = Handle(Surface)::DownCast(Copy()); Handle(Geom_Surface) S = Handle(Geom_Surface)::DownCast(Copy());
S->VReverse(); S->VReverse();
return S; return S;
} }

View File

@ -44,9 +44,7 @@
#define FMULTS (BSplCLib::NoMults()) #define FMULTS (BSplCLib::NoMults())
typedef Geom_SurfaceOfLinearExtrusion SurfaceOfLinearExtrusion; typedef Geom_SurfaceOfLinearExtrusion SurfaceOfLinearExtrusion;
typedef Handle(Geom_SurfaceOfLinearExtrusion) Handle(SurfaceOfLinearExtrusion);
typedef Geom_Curve Curve; typedef Geom_Curve Curve;
typedef Handle(Geom_Curve) Handle(Curve);
typedef gp_Dir Dir; typedef gp_Dir Dir;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
@ -131,10 +129,10 @@ Handle(Geom_Geometry) Geom_SurfaceOfLinearExtrusion::Copy () const
//======================================================================= //=======================================================================
Geom_SurfaceOfLinearExtrusion::Geom_SurfaceOfLinearExtrusion Geom_SurfaceOfLinearExtrusion::Geom_SurfaceOfLinearExtrusion
( const Handle(Curve)& C, ( const Handle(Geom_Curve)& C,
const Dir& V) { const Dir& V) {
basisCurve = Handle(Curve)::DownCast(C->Copy()); // Copy 10-03-93 basisCurve = Handle(Geom_Curve)::DownCast(C->Copy()); // Copy 10-03-93
direction = V; direction = V;
smooth = C->Continuity(); smooth = C->Continuity();
} }
@ -202,10 +200,10 @@ void Geom_SurfaceOfLinearExtrusion::SetDirection (const Dir& V) {
//purpose : //purpose :
//======================================================================= //=======================================================================
void Geom_SurfaceOfLinearExtrusion::SetBasisCurve (const Handle(Curve)& C) { void Geom_SurfaceOfLinearExtrusion::SetBasisCurve (const Handle(Geom_Curve)& C) {
smooth = C->Continuity(); smooth = C->Continuity();
basisCurve = Handle(Curve)::DownCast(C->Copy()); // Copy 10-03-93 basisCurve = Handle(Geom_Curve)::DownCast(C->Copy()); // Copy 10-03-93
} }
@ -491,11 +489,11 @@ Handle(Geom_Curve) Geom_SurfaceOfLinearExtrusion::UIso (const Standard_Real U) c
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Curve) Geom_SurfaceOfLinearExtrusion::VIso (const Standard_Real V) const { Handle(Geom_Curve) Geom_SurfaceOfLinearExtrusion::VIso (const Standard_Real V) const {
Vec Vdir (direction); Vec Vdir (direction);
Vdir.Multiply (V); Vdir.Multiply (V);
Handle(Curve) C; Handle(Geom_Curve) C;
C = Handle(Geom_Curve)::DownCast(basisCurve->Translated(Vdir)); C = Handle(Geom_Curve)::DownCast(basisCurve->Translated(Vdir));
return C; return C;
} }

View File

@ -38,10 +38,7 @@
#define FMULTS (BSplCLib::NoMults()) #define FMULTS (BSplCLib::NoMults())
typedef Geom_SurfaceOfRevolution SurfaceOfRevolution; typedef Geom_SurfaceOfRevolution SurfaceOfRevolution;
typedef Handle(Geom_SurfaceOfRevolution) Handle(SurfaceOfRevolution);
typedef Handle(Geom_Geometry) Handle(Geometry);
typedef Geom_Curve Curve; typedef Geom_Curve Curve;
typedef Handle(Geom_Curve) Handle(Curve);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Dir Dir; typedef gp_Dir Dir;
@ -50,6 +47,7 @@ typedef gp_Pnt Pnt;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
typedef gp_Vec Vec; typedef gp_Vec Vec;
typedef gp_XYZ XYZ; typedef gp_XYZ XYZ;
//======================================================================= //=======================================================================
//function : LocateSide //function : LocateSide
//purpose : This method locates U parameter on basis BSpline curve //purpose : This method locates U parameter on basis BSpline curve
@ -135,10 +133,10 @@ Handle(Geom_Geometry) Geom_SurfaceOfRevolution::Copy () const {
//======================================================================= //=======================================================================
Geom_SurfaceOfRevolution::Geom_SurfaceOfRevolution Geom_SurfaceOfRevolution::Geom_SurfaceOfRevolution
(const Handle(Curve)& C , (const Handle(Geom_Curve)& C ,
const Ax1& A1 ) : loc (A1.Location()) { const Ax1& A1 ) : loc (A1.Location()) {
basisCurve = Handle(Curve)::DownCast(C->Copy()); basisCurve = Handle(Geom_Curve)::DownCast(C->Copy());
direction = A1.Direction(); direction = A1.Direction();
smooth = C->Continuity(); smooth = C->Continuity();
} }
@ -300,9 +298,9 @@ void Geom_SurfaceOfRevolution::SetDirection (const Dir& V) {
//purpose : //purpose :
//======================================================================= //=======================================================================
void Geom_SurfaceOfRevolution::SetBasisCurve (const Handle(Curve)& C) { void Geom_SurfaceOfRevolution::SetBasisCurve (const Handle(Geom_Curve)& C) {
basisCurve = Handle(Curve)::DownCast(C->Copy()); basisCurve = Handle(Geom_Curve)::DownCast(C->Copy());
smooth = C->Continuity(); smooth = C->Continuity();
} }
@ -1111,9 +1109,9 @@ Ax2 Geom_SurfaceOfRevolution::ReferencePlane() const {
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Curve) Geom_SurfaceOfRevolution::UIso (const Standard_Real U) const { Handle(Geom_Curve) Geom_SurfaceOfRevolution::UIso (const Standard_Real U) const {
Handle(Curve) C = Handle(Curve)::DownCast(basisCurve->Copy()); Handle(Geom_Curve) C = Handle(Geom_Curve)::DownCast(basisCurve->Copy());
Ax1 RotAxis = Ax1 (loc, direction); Ax1 RotAxis = Ax1 (loc, direction);
C->Rotate (RotAxis, U); C->Rotate (RotAxis, U);
return C; return C;

View File

@ -28,7 +28,6 @@
#include <Standard_RangeError.hxx> #include <Standard_RangeError.hxx>
typedef Geom_ToroidalSurface ToroidalSurface; typedef Geom_ToroidalSurface ToroidalSurface;
typedef Handle(Geom_ToroidalSurface) Handle(ToroidalSurface);
typedef TColStd_Array1OfReal Array1OfReal; typedef TColStd_Array1OfReal Array1OfReal;
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
@ -49,7 +48,7 @@ typedef gp_XYZ XYZ;
Handle(Geom_Geometry) Geom_ToroidalSurface::Copy () const { Handle(Geom_Geometry) Geom_ToroidalSurface::Copy () const {
Handle(ToroidalSurface) Cs; Handle(Geom_ToroidalSurface) Cs;
Cs = new ToroidalSurface (pos, majorRadius, minorRadius); Cs = new ToroidalSurface (pos, majorRadius, minorRadius);
return Cs; return Cs;
} }

View File

@ -16,7 +16,6 @@
#include <Geom_Transformation.ixx> #include <Geom_Transformation.ixx>
typedef Handle(Geom_Transformation) Handle(Transformation);
typedef Geom_Transformation Transformation; typedef Geom_Transformation Transformation;
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
@ -25,9 +24,6 @@ typedef gp_Pnt Pnt;
typedef gp_TrsfForm TrsfForm; typedef gp_TrsfForm TrsfForm;
typedef gp_Vec Vec; typedef gp_Vec Vec;
Geom_Transformation::Geom_Transformation () { } Geom_Transformation::Geom_Transformation () { }
@ -37,7 +33,7 @@ Geom_Transformation::Geom_Transformation (const gp_Trsf& T)
Handle(Geom_Transformation) Geom_Transformation::Copy() const { Handle(Geom_Transformation) Geom_Transformation::Copy() const {
Handle(Transformation) T; Handle(Geom_Transformation) T;
T = new Transformation (gpTrsf); T = new Transformation (gpTrsf);
return T; return T;
} }
@ -104,13 +100,13 @@ Standard_Real Geom_Transformation::Value (const Standard_Integer Row, const Stan
void Geom_Transformation::Invert () { gpTrsf.Invert(); } void Geom_Transformation::Invert () { gpTrsf.Invert(); }
Handle(Transformation) Geom_Transformation::Inverted () const { Handle(Geom_Transformation) Geom_Transformation::Inverted () const {
return new Transformation (gpTrsf.Inverted()); return new Transformation (gpTrsf.Inverted());
} }
Handle(Transformation) Geom_Transformation::Multiplied ( Handle(Geom_Transformation) Geom_Transformation::Multiplied (
const Handle(Geom_Transformation)& Other) const { const Handle(Geom_Transformation)& Other) const {
return new Transformation (gpTrsf.Multiplied (Other->Trsf())); return new Transformation (gpTrsf.Multiplied (Other->Trsf()));
@ -126,7 +122,7 @@ void Geom_Transformation::Multiply (const Handle(Geom_Transformation)& Other) {
void Geom_Transformation::Power (const Standard_Integer N) { gpTrsf.Power (N); } void Geom_Transformation::Power (const Standard_Integer N) { gpTrsf.Power (N); }
Handle(Transformation) Geom_Transformation::Powered (const Standard_Integer N) const { Handle(Geom_Transformation) Geom_Transformation::Powered (const Standard_Integer N) const {
gp_Trsf T = gpTrsf; gp_Trsf T = gpTrsf;
T.Power (N); T.Power (N);

View File

@ -31,11 +31,7 @@
#include <Precision.hxx> #include <Precision.hxx>
#include <ElCLib.hxx> #include <ElCLib.hxx>
typedef Handle(Geom_TrimmedCurve) Handle(TrimmedCurve);
typedef Geom_TrimmedCurve TrimmedCurve; typedef Geom_TrimmedCurve TrimmedCurve;
typedef Handle(Geom_Curve) Handle(Curve);
typedef Handle(Geom_Geometry) Handle(Geometry);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
@ -49,7 +45,7 @@ typedef gp_Vec Vec;
Handle(Geom_Geometry) Geom_TrimmedCurve::Copy () const { Handle(Geom_Geometry) Geom_TrimmedCurve::Copy () const {
Handle(TrimmedCurve) Tc = new TrimmedCurve (basisCurve, uTrim1, uTrim2); Handle(Geom_TrimmedCurve) Tc = new TrimmedCurve (basisCurve, uTrim1, uTrim2);
return Tc; return Tc;
} }
@ -70,9 +66,9 @@ Geom_TrimmedCurve::Geom_TrimmedCurve (const Handle(Geom_Curve)& C,
// kill trimmed basis curves // kill trimmed basis curves
Handle(Geom_TrimmedCurve) T = Handle(Geom_TrimmedCurve)::DownCast(C); Handle(Geom_TrimmedCurve) T = Handle(Geom_TrimmedCurve)::DownCast(C);
if (!T.IsNull()) if (!T.IsNull())
basisCurve = Handle(Curve)::DownCast(T->BasisCurve()->Copy()); basisCurve = Handle(Geom_Curve)::DownCast(T->BasisCurve()->Copy());
else else
basisCurve = Handle(Curve)::DownCast(C->Copy()); basisCurve = Handle(Geom_Curve)::DownCast(C->Copy());
SetTrim(U1, U2, Sense, theAdjustPeriodic); SetTrim(U1, U2, Sense, theAdjustPeriodic);
} }
@ -207,7 +203,7 @@ GeomAbs_Shape Geom_TrimmedCurve::Continuity () const {
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Curve) Geom_TrimmedCurve::BasisCurve () const { Handle(Geom_Curve) Geom_TrimmedCurve::BasisCurve () const {
return basisCurve; return basisCurve;
} }

View File

@ -17,15 +17,11 @@
#include <Geom_Vector.ixx> #include <Geom_Vector.ixx>
typedef Geom_Vector Vector; typedef Geom_Vector Vector;
typedef Handle(Geom_Vector) Handle(Vector);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
void Geom_Vector::Reverse () { gpVec.Reverse(); } void Geom_Vector::Reverse () { gpVec.Reverse(); }
Standard_Real Geom_Vector::X () const { return gpVec.X(); } Standard_Real Geom_Vector::X () const { return gpVec.X(); }
@ -36,22 +32,22 @@ Standard_Real Geom_Vector::Z () const { return gpVec.Z(); }
const gp_Vec& Geom_Vector::Vec () const { return gpVec; } const gp_Vec& Geom_Vector::Vec () const { return gpVec; }
Handle(Vector) Geom_Vector::Reversed () const Handle(Geom_Vector) Geom_Vector::Reversed () const
{ {
Handle(Vector) V = Handle(Vector)::DownCast(Copy()); Handle(Geom_Vector) V = Handle(Geom_Vector)::DownCast(Copy());
V->Reverse(); V->Reverse();
return V; return V;
} }
Standard_Real Geom_Vector::Angle (const Handle(Vector)& Other) const { Standard_Real Geom_Vector::Angle (const Handle(Geom_Vector)& Other) const {
return gpVec.Angle (Other->Vec()); return gpVec.Angle (Other->Vec());
} }
Standard_Real Geom_Vector::AngleWithRef ( Standard_Real Geom_Vector::AngleWithRef (
const Handle(Vector)& Other, const Handle(Vector)& VRef) const { const Handle(Geom_Vector)& Other, const Handle(Geom_Vector)& VRef) const {
return gpVec.AngleWithRef (Other->Vec(), VRef->Vec()); return gpVec.AngleWithRef (Other->Vec(), VRef->Vec());
} }
@ -63,14 +59,14 @@ void Geom_Vector::Coord (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) c
} }
Standard_Real Geom_Vector::Dot (const Handle(Vector)& Other) const { Standard_Real Geom_Vector::Dot (const Handle(Geom_Vector)& Other) const {
return gpVec.Dot (Other->Vec()); return gpVec.Dot (Other->Vec());
} }
Standard_Real Geom_Vector::DotCross ( Standard_Real Geom_Vector::DotCross (
const Handle(Vector)& V1, const Handle(Vector)& V2) const { const Handle(Geom_Vector)& V1, const Handle(Geom_Vector)& V2) const {
return gpVec.DotCross (V1->Vec(), V2->Vec()); return gpVec.DotCross (V1->Vec(), V2->Vec());
} }

View File

@ -17,18 +17,12 @@
#include <Geom_VectorWithMagnitude.ixx> #include <Geom_VectorWithMagnitude.ixx>
typedef Geom_VectorWithMagnitude VectorWithMagnitude; typedef Geom_VectorWithMagnitude VectorWithMagnitude;
typedef Handle(Geom_VectorWithMagnitude) Handle(VectorWithMagnitude);
typedef Geom_Vector Vector; typedef Geom_Vector Vector;
typedef Handle(Geom_Vector) Handle(Vector);
typedef Handle(Geom_Geometry) Handle(Geometry);
typedef gp_Ax1 Ax1; typedef gp_Ax1 Ax1;
typedef gp_Ax2 Ax2; typedef gp_Ax2 Ax2;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
typedef gp_Trsf Trsf; typedef gp_Trsf Trsf;
//======================================================================= //=======================================================================
//function : Geom_VectorWithMagnitude //function : Geom_VectorWithMagnitude
//purpose : //purpose :
@ -63,7 +57,7 @@ const Pnt& P1, const Pnt& P2) { gpVec = gp_Vec (P1, P2); }
Handle(Geom_Geometry) Geom_VectorWithMagnitude::Copy() const { Handle(Geom_Geometry) Geom_VectorWithMagnitude::Copy() const {
Handle(VectorWithMagnitude) V; Handle(Geom_VectorWithMagnitude) V;
V = new VectorWithMagnitude (gpVec); V = new VectorWithMagnitude (gpVec);
return V; return V;
} }
@ -128,7 +122,7 @@ Standard_Real Geom_VectorWithMagnitude::SquareMagnitude () const {
//purpose : //purpose :
//======================================================================= //=======================================================================
void Geom_VectorWithMagnitude::Add (const Handle(Vector)& Other) { void Geom_VectorWithMagnitude::Add (const Handle(Geom_Vector)& Other) {
gpVec.Add (Other->Vec()); gpVec.Add (Other->Vec());
} }
@ -139,8 +133,8 @@ void Geom_VectorWithMagnitude::Add (const Handle(Vector)& Other) {
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Added ( Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Added (
const Handle(Vector)& Other) const { const Handle(Geom_Vector)& Other) const {
gp_Vec V1 = gpVec; gp_Vec V1 = gpVec;
V1.Add (Other->Vec()); V1.Add (Other->Vec());
@ -153,7 +147,7 @@ const Handle(Vector)& Other) const {
//purpose : //purpose :
//======================================================================= //=======================================================================
void Geom_VectorWithMagnitude::Cross (const Handle(Vector)& Other) { void Geom_VectorWithMagnitude::Cross (const Handle(Geom_Vector)& Other) {
gpVec.Cross (Other->Vec()); gpVec.Cross (Other->Vec());
} }
@ -165,8 +159,8 @@ void Geom_VectorWithMagnitude::Cross (const Handle(Vector)& Other) {
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Vector) Geom_VectorWithMagnitude::Crossed ( Handle(Geom_Vector) Geom_VectorWithMagnitude::Crossed (
const Handle(Vector)& Other) const { const Handle(Geom_Vector)& Other) const {
gp_Vec V (gpVec); gp_Vec V (gpVec);
V.Cross (Other->Vec()); V.Cross (Other->Vec());
@ -180,7 +174,7 @@ const Handle(Vector)& Other) const {
//======================================================================= //=======================================================================
void Geom_VectorWithMagnitude::CrossCross ( void Geom_VectorWithMagnitude::CrossCross (
const Handle(Vector)& V1, const Handle(Vector)& V2) { const Handle(Geom_Vector)& V1, const Handle(Geom_Vector)& V2) {
gpVec.CrossCross (V1->Vec(), V2->Vec()); gpVec.CrossCross (V1->Vec(), V2->Vec());
} }
@ -191,8 +185,8 @@ const Handle(Vector)& V1, const Handle(Vector)& V2) {
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Vector) Geom_VectorWithMagnitude::CrossCrossed ( Handle(Geom_Vector) Geom_VectorWithMagnitude::CrossCrossed (
const Handle(Vector)& V1, const Handle(Vector)& V2) const { const Handle(Geom_Vector)& V1, const Handle(Geom_Vector)& V2) const {
gp_Vec V (gpVec); gp_Vec V (gpVec);
V.CrossCross (V1->Vec(), V2->Vec()); V.CrossCross (V1->Vec(), V2->Vec());
@ -216,7 +210,7 @@ void Geom_VectorWithMagnitude::Divide (const Standard_Real Scalar) {
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Divided ( Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Divided (
const Standard_Real Scalar) const { const Standard_Real Scalar) const {
gp_Vec V (gpVec); gp_Vec V (gpVec);
@ -230,7 +224,7 @@ const Standard_Real Scalar) const {
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Multiplied ( Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Multiplied (
const Standard_Real Scalar) const { const Standard_Real Scalar) const {
gp_Vec V (gpVec); gp_Vec V (gpVec);
@ -263,7 +257,7 @@ void Geom_VectorWithMagnitude::Normalize () { gpVec.Normalize (); }
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Normalized () const { Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Normalized () const {
gp_Vec V (gpVec); gp_Vec V (gpVec);
V.Normalize (); V.Normalize ();
@ -276,7 +270,7 @@ Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Normalized () const {
//purpose : //purpose :
//======================================================================= //=======================================================================
void Geom_VectorWithMagnitude::Subtract (const Handle(Vector)& Other) { void Geom_VectorWithMagnitude::Subtract (const Handle(Geom_Vector)& Other) {
gpVec.Subtract (Other->Vec()); gpVec.Subtract (Other->Vec());
} }
@ -287,8 +281,8 @@ void Geom_VectorWithMagnitude::Subtract (const Handle(Vector)& Other) {
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Subtracted ( Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Subtracted (
const Handle(Vector)& Other) const { const Handle(Geom_Vector)& Other) const {
gp_Vec V (gpVec); gp_Vec V (gpVec);
V.Subtract (Other->Vec()); V.Subtract (Other->Vec());

View File

@ -19,7 +19,6 @@
typedef Geom2d_AxisPlacement AxisPlacement; typedef Geom2d_AxisPlacement AxisPlacement;
typedef Handle(Geom2d_AxisPlacement) Handle(AxisPlacement);
typedef gp_Dir2d Dir2d; typedef gp_Dir2d Dir2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
@ -30,7 +29,7 @@ typedef gp_Vec2d Vec2d;
Handle(Geom2d_Geometry) Geom2d_AxisPlacement::Copy() const { Handle(Geom2d_Geometry) Geom2d_AxisPlacement::Copy() const {
Handle(AxisPlacement) A; Handle(Geom2d_AxisPlacement) A;
A = new AxisPlacement (axis); A = new AxisPlacement (axis);
return A; return A;
} }
@ -56,11 +55,11 @@ Pnt2d Geom2d_AxisPlacement::Location () const { return axis.Location(); }
void Geom2d_AxisPlacement::Reverse() { axis.Reverse(); } void Geom2d_AxisPlacement::Reverse() { axis.Reverse(); }
Handle(AxisPlacement) Geom2d_AxisPlacement::Reversed() const { Handle(Geom2d_AxisPlacement) Geom2d_AxisPlacement::Reversed() const {
gp_Ax2d A = axis; gp_Ax2d A = axis;
A.Reverse(); A.Reverse();
Handle(AxisPlacement) Temp = new AxisPlacement (A); Handle(Geom2d_AxisPlacement) Temp = new AxisPlacement (A);
return Temp; return Temp;
} }
@ -76,7 +75,7 @@ void Geom2d_AxisPlacement::SetDirection (const Dir2d& V) {
axis.SetDirection(V); axis.SetDirection(V);
} }
Standard_Real Geom2d_AxisPlacement::Angle (const Handle(AxisPlacement)& Other) const { Standard_Real Geom2d_AxisPlacement::Angle (const Handle(Geom2d_AxisPlacement)& Other) const {
return axis.Angle (Other->Ax2d()); return axis.Angle (Other->Ax2d());
} }

View File

@ -17,7 +17,6 @@
#include <Geom2d_CartesianPoint.ixx> #include <Geom2d_CartesianPoint.ixx>
typedef Geom2d_CartesianPoint CartesianPoint; typedef Geom2d_CartesianPoint CartesianPoint;
typedef Handle(Geom2d_CartesianPoint) Handle(CartesianPoint);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Vec2d Vec2d; typedef gp_Vec2d Vec2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
@ -33,7 +32,7 @@ Geom2d_CartesianPoint::Geom2d_CartesianPoint (const Standard_Real X, const Stand
Handle(Geom2d_Geometry) Geom2d_CartesianPoint::Copy() const { Handle(Geom2d_Geometry) Geom2d_CartesianPoint::Copy() const {
Handle(CartesianPoint) P; Handle(Geom2d_CartesianPoint) P;
P = new CartesianPoint (gpPnt2d); P = new CartesianPoint (gpPnt2d);
return P; return P;
} }

View File

@ -22,7 +22,6 @@
typedef Geom2d_Circle Circle; typedef Geom2d_Circle Circle;
typedef Handle(Geom2d_Circle) Handle(Circle);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Dir2d Dir2d; typedef gp_Dir2d Dir2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
@ -30,13 +29,6 @@ typedef gp_Trsf2d Trsf2d;
typedef gp_Vec2d Vec2d; typedef gp_Vec2d Vec2d;
typedef gp_XY XY; typedef gp_XY XY;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -44,7 +36,7 @@ typedef gp_XY XY;
Handle(Geom2d_Geometry) Geom2d_Circle::Copy() const Handle(Geom2d_Geometry) Geom2d_Circle::Copy() const
{ {
Handle(Circle) C; Handle(Geom2d_Circle) C;
C = new Circle (pos, radius); C = new Circle (pos, radius);
return C; return C;
} }

View File

@ -19,7 +19,6 @@
typedef Geom2d_Curve Curve; typedef Geom2d_Curve Curve;
typedef Handle(Geom2d_Curve) Handle(Curve);
//======================================================================= //=======================================================================
@ -29,7 +28,7 @@ typedef Handle(Geom2d_Curve) Handle(Curve);
Handle(Geom2d_Curve) Geom2d_Curve::Reversed () const Handle(Geom2d_Curve) Geom2d_Curve::Reversed () const
{ {
Handle(Curve) C = Handle(Curve)::DownCast(Copy()); Handle(Geom2d_Curve) C = Handle(Geom2d_Curve)::DownCast(Copy());
C->Reverse(); C->Reverse();
return C; return C;
} }

View File

@ -19,8 +19,6 @@
#include <Standard_ConstructionError.hxx> #include <Standard_ConstructionError.hxx>
typedef Geom2d_Direction Direction; typedef Geom2d_Direction Direction;
typedef Handle(Geom2d_Direction) Handle(Direction);
typedef Handle(Geom2d_Vector) Handle(Vector);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
@ -31,7 +29,7 @@ typedef gp_Trsf2d Trsf2d;
Handle(Geom2d_Geometry) Geom2d_Direction::Copy() const { Handle(Geom2d_Geometry) Geom2d_Direction::Copy() const {
Handle(Direction) D; Handle(Geom2d_Direction) D;
D = new Direction (gpVec2d); D = new Direction (gpVec2d);
return D; return D;
} }
@ -88,7 +86,7 @@ Standard_Real Geom2d_Direction::Magnitude () const { return 1.0; }
Standard_Real Geom2d_Direction::SquareMagnitude () const { return 1.0; } Standard_Real Geom2d_Direction::SquareMagnitude () const { return 1.0; }
Standard_Real Geom2d_Direction::Crossed (const Handle(Vector)& Other) const { Standard_Real Geom2d_Direction::Crossed (const Handle(Geom2d_Vector)& Other) const {
return gpVec2d.Crossed (Other->Vec2d()); return gpVec2d.Crossed (Other->Vec2d());
} }

View File

@ -22,9 +22,7 @@
#include <Standard_RangeError.hxx> #include <Standard_RangeError.hxx>
#include <Standard_ConstructionError.hxx> #include <Standard_ConstructionError.hxx>
typedef Geom2d_Ellipse Ellipse; typedef Geom2d_Ellipse Ellipse;
typedef Handle(Geom2d_Ellipse) Handle(Ellipse);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Dir2d Dir2d; typedef gp_Dir2d Dir2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
@ -32,10 +30,6 @@ typedef gp_Vec2d Vec2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
typedef gp_XY XY; typedef gp_XY XY;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -43,7 +37,7 @@ typedef gp_XY XY;
Handle(Geom2d_Geometry) Geom2d_Ellipse::Copy() const Handle(Geom2d_Geometry) Geom2d_Ellipse::Copy() const
{ {
Handle(Ellipse) E; Handle(Geom2d_Ellipse) E;
E = new Ellipse (pos, majorRadius, minorRadius); E = new Ellipse (pos, majorRadius, minorRadius);
return E; return E;
} }

View File

@ -17,15 +17,12 @@
#include <Geom2d_Geometry.ixx> #include <Geom2d_Geometry.ixx>
#include <Standard_ConstructionError.hxx> #include <Standard_ConstructionError.hxx>
typedef Handle(Geom2d_Geometry) Handle(Geometry);
typedef Geom2d_Geometry Geometry; typedef Geom2d_Geometry Geometry;
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
typedef gp_Vec2d Vec2d; typedef gp_Vec2d Vec2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
void Geom2d_Geometry::Mirror (const gp_Pnt2d& P) { void Geom2d_Geometry::Mirror (const gp_Pnt2d& P) {
Trsf2d T; Trsf2d T;
@ -74,67 +71,57 @@ void Geom2d_Geometry::Translate (const gp_Pnt2d& P1, const gp_Pnt2d& P2) {
} }
Handle(Geometry) Geom2d_Geometry::Mirrored (const gp_Pnt2d& P) const { Handle(Geom2d_Geometry) Geom2d_Geometry::Mirrored (const gp_Pnt2d& P) const
{
Handle(Geometry) me = this; Handle(Geom2d_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Mirror (P); G->Mirror (P);
return G; return G;
} }
Handle(Geometry) Geom2d_Geometry::Mirrored (const gp_Ax2d& A) const { Handle(Geom2d_Geometry) Geom2d_Geometry::Mirrored (const gp_Ax2d& A) const
{
Handle(Geometry) me = this; Handle(Geom2d_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Mirror (A); G->Mirror (A);
return G; return G;
} }
Handle(Geometry) Geom2d_Geometry::Rotated ( Handle(Geom2d_Geometry) Geom2d_Geometry::Rotated (const gp_Pnt2d& P, const Standard_Real Ang) const
const gp_Pnt2d& P, const Standard_Real Ang) const { {
Handle(Geom2d_Geometry) G = Copy();
Handle(Geometry) me = this;
Handle(Geometry) G = me->Copy();
G->Rotate (P, Ang); G->Rotate (P, Ang);
return G; return G;
} }
Handle(Geometry) Geom2d_Geometry::Scaled ( Handle(Geom2d_Geometry) Geom2d_Geometry::Scaled (const gp_Pnt2d& P, const Standard_Real S) const
const gp_Pnt2d& P, const Standard_Real S) const { {
Handle(Geom2d_Geometry) G = Copy();
Handle(Geometry) me = this;
Handle(Geometry) G = me->Copy();
G->Scale (P, S); G->Scale (P, S);
return G; return G;
} }
Handle(Geometry) Geom2d_Geometry::Transformed (const gp_Trsf2d& T) const { Handle(Geom2d_Geometry) Geom2d_Geometry::Transformed (const gp_Trsf2d& T) const
{
Handle(Geometry) me = this; Handle(Geom2d_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Transform (T); G->Transform (T);
return G; return G;
} }
Handle(Geometry) Geom2d_Geometry::Translated (const gp_Vec2d& V) const { Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Vec2d& V) const
{
Handle(Geometry) me = this; Handle(Geom2d_Geometry) G = Copy();
Handle(Geometry) G = me->Copy();
G->Translate (V); G->Translate (V);
return G; return G;
} }
Handle(Geometry) Geom2d_Geometry::Translated ( Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Pnt2d& P1, const gp_Pnt2d& P2) const
const gp_Pnt2d& P1, const gp_Pnt2d& P2) const { {
Handle(Geom2d_Geometry) G = Copy();
Handle(Geometry) me = this;
Handle(Geometry) G = me->Copy();
G->Translate (P1, P2); G->Translate (P1, P2);
return G; return G;
} }

View File

@ -25,10 +25,7 @@
#include <Standard_DomainError.hxx> #include <Standard_DomainError.hxx>
#include <Standard_RangeError.hxx> #include <Standard_RangeError.hxx>
typedef Geom2d_Hyperbola Hyperbola; typedef Geom2d_Hyperbola Hyperbola;
typedef Handle(Geom2d_Hyperbola) Handle(Hyperbola);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Dir2d Dir2d; typedef gp_Dir2d Dir2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
@ -36,10 +33,6 @@ typedef gp_Vec2d Vec2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
typedef gp_XY XY; typedef gp_XY XY;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -47,7 +40,7 @@ typedef gp_XY XY;
Handle(Geom2d_Geometry) Geom2d_Hyperbola::Copy() const Handle(Geom2d_Geometry) Geom2d_Hyperbola::Copy() const
{ {
Handle(Hyperbola) H; Handle(Geom2d_Hyperbola) H;
H = new Hyperbola (pos, majorRadius, minorRadius); H = new Hyperbola (pos, majorRadius, minorRadius);
return H; return H;
} }

View File

@ -21,9 +21,7 @@
#include <gp_XY.hxx> #include <gp_XY.hxx>
#include <Standard_RangeError.hxx> #include <Standard_RangeError.hxx>
typedef Geom2d_Line Line; typedef Geom2d_Line Line;
typedef Handle(Geom2d_Line) Handle(Line);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Dir2d Dir2d; typedef gp_Dir2d Dir2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
@ -31,10 +29,6 @@ typedef gp_Vec2d Vec2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
typedef gp_XY XY; typedef gp_XY XY;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -42,7 +36,7 @@ typedef gp_XY XY;
Handle(Geom2d_Geometry) Geom2d_Line::Copy() const Handle(Geom2d_Geometry) Geom2d_Line::Copy() const
{ {
Handle(Line) L; Handle(Geom2d_Line) L;
L = new Line (pos); L = new Line (pos);
return L; return L;
} }

View File

@ -37,10 +37,7 @@
#include <gp_XY.hxx> #include <gp_XY.hxx>
#include <Precision.hxx> #include <Precision.hxx>
typedef Handle(Geom2d_OffsetCurve) Handle(OffsetCurve);
typedef Geom2d_OffsetCurve OffsetCurve; typedef Geom2d_OffsetCurve OffsetCurve;
typedef Handle(Geom2d_Geometry) Handle(Geometry);
typedef Handle(Geom2d_Curve) Handle(Curve);
typedef Geom2d_Curve Curve; typedef Geom2d_Curve Curve;
typedef gp_Dir2d Dir2d; typedef gp_Dir2d Dir2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
@ -70,7 +67,7 @@ static Standard_Boolean AdjustDerivative(const Handle(Geom2d_Curve)& theCurve, S
Handle(Geom2d_Geometry) Geom2d_OffsetCurve::Copy () const Handle(Geom2d_Geometry) Geom2d_OffsetCurve::Copy () const
{ {
Handle(OffsetCurve) C; Handle(Geom2d_OffsetCurve) C;
C = new OffsetCurve (basisCurve, offsetValue); C = new OffsetCurve (basisCurve, offsetValue);
return C; return C;
} }
@ -116,7 +113,7 @@ Standard_Real Geom2d_OffsetCurve::ReversedParameter( const Standard_Real U) cons
//purpose : //purpose :
//======================================================================= //=======================================================================
void Geom2d_OffsetCurve::SetBasisCurve (const Handle(Curve)& C, void Geom2d_OffsetCurve::SetBasisCurve (const Handle(Geom2d_Curve)& C,
const Standard_Boolean isNotCheckC0) const Standard_Boolean isNotCheckC0)
{ {
const Standard_Real aUf = C->FirstParameter(), const Standard_Real aUf = C->FirstParameter(),
@ -189,7 +186,7 @@ void Geom2d_OffsetCurve::SetOffsetValue (const Standard_Real D) { offsetValue =
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Curve) Geom2d_OffsetCurve::BasisCurve () const Handle(Geom2d_Curve) Geom2d_OffsetCurve::BasisCurve () const
{ {
return basisCurve; return basisCurve;
} }

View File

@ -24,7 +24,6 @@
#include <Standard_RangeError.hxx> #include <Standard_RangeError.hxx>
typedef Geom2d_Parabola Parabola; typedef Geom2d_Parabola Parabola;
typedef Handle(Geom2d_Parabola) Handle(Parabola);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Dir2d Dir2d; typedef gp_Dir2d Dir2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
@ -32,11 +31,6 @@ typedef gp_Vec2d Vec2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
typedef gp_XY XY; typedef gp_XY XY;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -44,7 +38,7 @@ typedef gp_XY XY;
Handle(Geom2d_Geometry) Geom2d_Parabola::Copy() const Handle(Geom2d_Geometry) Geom2d_Parabola::Copy() const
{ {
Handle(Parabola) Prb; Handle(Geom2d_Parabola) Prb;
Prb = new Parabola (pos, focalLength); Prb = new Parabola (pos, focalLength);
return Prb; return Prb;
} }

View File

@ -17,10 +17,8 @@
#include <Geom2d_Point.ixx> #include <Geom2d_Point.ixx>
typedef Geom2d_Point Point; typedef Geom2d_Point Point;
typedef Handle(Geom2d_Point) Handle(Point);
Standard_Real Geom2d_Point::Distance (const Handle(Geom2d_Point)& Other) const {
Standard_Real Geom2d_Point::Distance (const Handle(Point)& Other) const {
gp_Pnt2d P1 = this-> Pnt2d (); gp_Pnt2d P1 = this-> Pnt2d ();
gp_Pnt2d P2 = Other->Pnt2d (); gp_Pnt2d P2 = Other->Pnt2d ();
@ -28,7 +26,7 @@ Standard_Real Geom2d_Point::Distance (const Handle(Point)& Other) const {
} }
Standard_Real Geom2d_Point::SquareDistance (const Handle(Point)& Other) const { Standard_Real Geom2d_Point::SquareDistance (const Handle(Geom2d_Point)& Other) const {
gp_Pnt2d P1 = this-> Pnt2d (); gp_Pnt2d P1 = this-> Pnt2d ();
gp_Pnt2d P2 = Other->Pnt2d (); gp_Pnt2d P2 = Other->Pnt2d ();

View File

@ -18,23 +18,14 @@
typedef Geom2d_Transformation Transformation; typedef Geom2d_Transformation Transformation;
typedef Handle(Geom2d_Transformation) Handle(Transformation);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
typedef gp_TrsfForm TrsfForm; typedef gp_TrsfForm TrsfForm;
typedef gp_Vec2d Vec2d; typedef gp_Vec2d Vec2d;
Handle(Geom2d_Transformation) Geom2d_Transformation::Copy() const { Handle(Geom2d_Transformation) Geom2d_Transformation::Copy() const {
Handle(Transformation) T; Handle(Geom2d_Transformation) T;
T = new Transformation (gpTrsf2d); T = new Transformation (gpTrsf2d);
return T; return T;
} }
@ -49,21 +40,21 @@ Geom2d_Transformation::Geom2d_Transformation (const gp_Trsf2d& T)
: gpTrsf2d (T) { } : gpTrsf2d (T) { }
Handle(Transformation) Geom2d_Transformation::Inverted () const { Handle(Geom2d_Transformation) Geom2d_Transformation::Inverted () const {
return new Transformation (gpTrsf2d.Inverted()); return new Transformation (gpTrsf2d.Inverted());
} }
Handle(Transformation) Geom2d_Transformation::Multiplied ( Handle(Geom2d_Transformation) Geom2d_Transformation::Multiplied (
const Handle(Transformation)& Other) const { const Handle(Geom2d_Transformation)& Other) const {
return new Transformation (gpTrsf2d.Multiplied (Other->Trsf2d())); return new Transformation (gpTrsf2d.Multiplied (Other->Trsf2d()));
} }
Handle(Transformation) Geom2d_Transformation::Powered (const Standard_Integer N) const{ Handle(Geom2d_Transformation) Geom2d_Transformation::Powered (const Standard_Integer N) const{
gp_Trsf2d Temp = gpTrsf2d; gp_Trsf2d Temp = gpTrsf2d;
Temp.Power (N); Temp.Power (N);
@ -168,7 +159,7 @@ void Geom2d_Transformation::Power (const Standard_Integer N) { gpTrsf2d.Power (N
void Geom2d_Transformation::PreMultiply ( void Geom2d_Transformation::PreMultiply (
const Handle(Transformation)& Other) { const Handle(Geom2d_Transformation)& Other) {
gpTrsf2d.PreMultiply (Other->Trsf2d()); gpTrsf2d.PreMultiply (Other->Trsf2d());
} }

View File

@ -31,19 +31,12 @@
#include <Precision.hxx> #include <Precision.hxx>
typedef Handle(Geom2d_TrimmedCurve) Handle(TrimmedCurve);
typedef Geom2d_TrimmedCurve TrimmedCurve; typedef Geom2d_TrimmedCurve TrimmedCurve;
typedef Handle(Geom2d_Curve) Handle(Curve);
typedef Handle(Geom2d_Geometry) Handle(Geometry);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
typedef gp_Vec2d Vec2d; typedef gp_Vec2d Vec2d;
//======================================================================= //=======================================================================
//function : Copy //function : Copy
//purpose : //purpose :
@ -51,7 +44,7 @@ typedef gp_Vec2d Vec2d;
Handle(Geom2d_Geometry) Geom2d_TrimmedCurve::Copy () const Handle(Geom2d_Geometry) Geom2d_TrimmedCurve::Copy () const
{ {
Handle(TrimmedCurve) Tc; Handle(Geom2d_TrimmedCurve) Tc;
Tc = new TrimmedCurve (basisCurve, uTrim1, uTrim2); Tc = new TrimmedCurve (basisCurve, uTrim1, uTrim2);
return Tc; return Tc;
} }
@ -73,9 +66,9 @@ Geom2d_TrimmedCurve::Geom2d_TrimmedCurve (const Handle(Geom2d_Curve)& C,
// kill trimmed basis curves // kill trimmed basis curves
Handle(Geom2d_TrimmedCurve) T = Handle(Geom2d_TrimmedCurve)::DownCast(C); Handle(Geom2d_TrimmedCurve) T = Handle(Geom2d_TrimmedCurve)::DownCast(C);
if (!T.IsNull()) if (!T.IsNull())
basisCurve = Handle(Curve)::DownCast(T->BasisCurve()->Copy()); basisCurve = Handle(Geom2d_Curve)::DownCast(T->BasisCurve()->Copy());
else else
basisCurve = Handle(Curve)::DownCast(C->Copy()); basisCurve = Handle(Geom2d_Curve)::DownCast(C->Copy());
SetTrim(U1, U2, Sense, theAdjustPeriodic); SetTrim(U1, U2, Sense, theAdjustPeriodic);
} }
@ -160,7 +153,7 @@ void Geom2d_TrimmedCurve::SetTrim (const Standard_Real U1,
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(Curve) Geom2d_TrimmedCurve::BasisCurve () const Handle(Geom2d_Curve) Geom2d_TrimmedCurve::BasisCurve () const
{ {
return basisCurve; return basisCurve;
} }

View File

@ -17,12 +17,9 @@
#include <Geom2d_Vector.ixx> #include <Geom2d_Vector.ixx>
typedef Geom2d_Vector Vector; typedef Geom2d_Vector Vector;
typedef Handle(Geom2d_Vector) Handle(Vector);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
Standard_Real Geom2d_Vector::Angle ( Standard_Real Geom2d_Vector::Angle (
const Handle(Geom2d_Vector)& Other) const { const Handle(Geom2d_Vector)& Other) const {
@ -39,9 +36,9 @@ Standard_Real Geom2d_Vector::X () const { return gpVec2d.X(); }
Standard_Real Geom2d_Vector::Y () const { return gpVec2d.Y(); } Standard_Real Geom2d_Vector::Y () const { return gpVec2d.Y(); }
Handle(Vector) Geom2d_Vector::Reversed () const { Handle(Geom2d_Vector) Geom2d_Vector::Reversed () const {
Handle(Vector) V = Handle(Vector)::DownCast(Copy()); Handle(Geom2d_Vector) V = Handle(Geom2d_Vector)::DownCast(Copy());
V->Reverse(); V->Reverse();
return V; return V;
} }
@ -53,7 +50,7 @@ void Geom2d_Vector::Coord (Standard_Real& X, Standard_Real& Y) const {
} }
Standard_Real Geom2d_Vector::Dot (const Handle(Vector)& Other) const { Standard_Real Geom2d_Vector::Dot (const Handle(Geom2d_Vector)& Other) const {
return gpVec2d.Dot (Other->Vec2d()); return gpVec2d.Dot (Other->Vec2d());
} }

View File

@ -19,15 +19,10 @@
typedef Geom2d_Vector Vector; typedef Geom2d_Vector Vector;
typedef Geom2d_VectorWithMagnitude VectorWithMagnitude; typedef Geom2d_VectorWithMagnitude VectorWithMagnitude;
typedef Handle(Geom2d_VectorWithMagnitude) Handle(VectorWithMagnitude);
typedef Handle(Geom2d_Vector) Handle(Vector);
typedef gp_Ax2d Ax2d; typedef gp_Ax2d Ax2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
Geom2d_VectorWithMagnitude::Geom2d_VectorWithMagnitude (const gp_Vec2d& V) Geom2d_VectorWithMagnitude::Geom2d_VectorWithMagnitude (const gp_Vec2d& V)
{ gpVec2d = V; } { gpVec2d = V; }
@ -42,7 +37,7 @@ const Pnt2d& P1, const Pnt2d& P2) { gpVec2d = gp_Vec2d (P1, P2); }
Handle(Geom2d_Geometry) Geom2d_VectorWithMagnitude::Copy() const { Handle(Geom2d_Geometry) Geom2d_VectorWithMagnitude::Copy() const {
Handle(VectorWithMagnitude) V; Handle(Geom2d_VectorWithMagnitude) V;
V = new VectorWithMagnitude (gpVec2d); V = new VectorWithMagnitude (gpVec2d);
return V; return V;
} }
@ -74,15 +69,15 @@ Standard_Real Geom2d_VectorWithMagnitude::SquareMagnitude () const {
} }
void Geom2d_VectorWithMagnitude::Add (const Handle(Vector)& Other) { void Geom2d_VectorWithMagnitude::Add (const Handle(Geom2d_Vector)& Other) {
gpVec2d.Add (Other->Vec2d()); gpVec2d.Add (Other->Vec2d());
} }
Handle(VectorWithMagnitude) Geom2d_VectorWithMagnitude::Added ( Handle(Geom2d_VectorWithMagnitude) Geom2d_VectorWithMagnitude::Added (
const Handle(Vector)& Other) const { const Handle(Geom2d_Vector)& Other) const {
gp_Vec2d Temp = Other->Vec2d(); gp_Vec2d Temp = Other->Vec2d();
Temp.Add (gpVec2d); Temp.Add (gpVec2d);
@ -90,7 +85,7 @@ const Handle(Vector)& Other) const {
} }
Standard_Real Geom2d_VectorWithMagnitude::Crossed (const Handle(Vector)& Other) const{ Standard_Real Geom2d_VectorWithMagnitude::Crossed (const Handle(Geom2d_Vector)& Other) const{
return gpVec2d.Crossed (Other->Vec2d()); return gpVec2d.Crossed (Other->Vec2d());
} }
@ -102,7 +97,7 @@ void Geom2d_VectorWithMagnitude::Divide (const Standard_Real Scalar) {
} }
Handle(VectorWithMagnitude) Geom2d_VectorWithMagnitude::Divided ( Handle(Geom2d_VectorWithMagnitude) Geom2d_VectorWithMagnitude::Divided (
const Standard_Real Scalar) const { const Standard_Real Scalar) const {
gp_Vec2d V (gpVec2d); gp_Vec2d V (gpVec2d);
@ -111,7 +106,7 @@ const Standard_Real Scalar) const {
} }
Handle(VectorWithMagnitude) Geom2d_VectorWithMagnitude::Multiplied ( Handle(Geom2d_VectorWithMagnitude) Geom2d_VectorWithMagnitude::Multiplied (
const Standard_Real Scalar) const { const Standard_Real Scalar) const {
gp_Vec2d V(gpVec2d); gp_Vec2d V(gpVec2d);
@ -129,7 +124,7 @@ void Geom2d_VectorWithMagnitude::Multiply (const Standard_Real Scalar) {
void Geom2d_VectorWithMagnitude::Normalize () { gpVec2d.Normalize (); } void Geom2d_VectorWithMagnitude::Normalize () { gpVec2d.Normalize (); }
Handle(VectorWithMagnitude) Geom2d_VectorWithMagnitude::Normalized () const { Handle(Geom2d_VectorWithMagnitude) Geom2d_VectorWithMagnitude::Normalized () const {
gp_Vec2d V = gpVec2d; gp_Vec2d V = gpVec2d;
V.Normalized (); V.Normalized ();
@ -137,14 +132,14 @@ Handle(VectorWithMagnitude) Geom2d_VectorWithMagnitude::Normalized () const {
} }
void Geom2d_VectorWithMagnitude::Subtract (const Handle(Vector)& Other) { void Geom2d_VectorWithMagnitude::Subtract (const Handle(Geom2d_Vector)& Other) {
gpVec2d.Subtract (Other->Vec2d()); gpVec2d.Subtract (Other->Vec2d());
} }
Handle(VectorWithMagnitude) Geom2d_VectorWithMagnitude::Subtracted ( Handle(Geom2d_VectorWithMagnitude) Geom2d_VectorWithMagnitude::Subtracted (
const Handle(Vector)& Other) const { const Handle(Geom2d_Vector)& Other) const {
gp_Vec2d V = gpVec2d; gp_Vec2d V = gpVec2d;
V.Subtract (Other->Vec2d()); V.Subtract (Other->Vec2d());

View File

@ -78,39 +78,24 @@ typedef gp_Hypr2d Hypr2d;
typedef gp_Parab2d Parab2d; typedef gp_Parab2d Parab2d;
typedef gp_Pnt2d Pnt2d; typedef gp_Pnt2d Pnt2d;
typedef gp_Trsf2d Trsf2d; typedef gp_Trsf2d Trsf2d;
typedef Geom2d_Curve Curve; typedef Geom2d_Curve Curve;
typedef Geom2d_BSplineCurve BSplineCurve; typedef Geom2d_BSplineCurve BSplineCurve;
typedef Handle(Geom2d_Curve) Handle(Curve);
typedef Handle(Geom2d_Conic) Handle(Conic);
typedef Handle(Geom2d_Circle) Handle(Circle);
typedef Handle(Geom2d_Ellipse) Handle(Ellipse);
typedef Handle(Geom2d_Hyperbola) Handle(Hyperbola);
typedef Handle(Geom2d_Parabola) Handle(Parabola);
typedef Handle(Geom2d_Geometry) Handle(Geometry);
typedef Handle(Geom2d_BezierCurve) Handle(BezierCurve);
typedef Handle(Geom2d_TrimmedCurve) Handle(TrimmedCurve);
typedef Handle(Geom2d_BSplineCurve) Handle(BSplineCurve);
typedef TColStd_Array1OfReal Array1OfReal; typedef TColStd_Array1OfReal Array1OfReal;
typedef TColStd_Array1OfInteger Array1OfInteger; typedef TColStd_Array1OfInteger Array1OfInteger;
typedef TColgp_Array1OfPnt2d Array1OfPnt2d; typedef TColgp_Array1OfPnt2d Array1OfPnt2d;
//======================================================================= //=======================================================================
//function : BSplineCurveBuilder //function : BSplineCurveBuilder
//purpose : //purpose :
//======================================================================= //=======================================================================
static Handle(BSplineCurve) BSplineCurveBuilder ( static Handle(Geom2d_BSplineCurve) BSplineCurveBuilder (
const Handle(Conic)& TheConic, const Handle(Geom2d_Conic)& TheConic,
const Convert_ConicToBSplineCurve& Convert const Convert_ConicToBSplineCurve& Convert
) { ) {
Handle(BSplineCurve) TheCurve; Handle(Geom2d_BSplineCurve) TheCurve;
Standard_Integer NbPoles = Convert.NbPoles(); Standard_Integer NbPoles = Convert.NbPoles();
Standard_Integer NbKnots = Convert.NbKnots(); Standard_Integer NbKnots = Convert.NbKnots();
Array1OfPnt2d Poles (1, NbPoles); Array1OfPnt2d Poles (1, NbPoles);
@ -140,8 +125,8 @@ const Convert_ConicToBSplineCurve& Convert
Trsf2d T; Trsf2d T;
T.SetTransformation (TheConic->XAxis(), gp::OX2d()); T.SetTransformation (TheConic->XAxis(), gp::OX2d());
Handle(BSplineCurve) Cres = Handle(Geom2d_BSplineCurve) Cres =
Handle(BSplineCurve)::DownCast(TheCurve->Transformed (T)); Handle(Geom2d_BSplineCurve)::DownCast(TheCurve->Transformed (T));
return Cres; return Cres;
} }
@ -151,9 +136,9 @@ const Convert_ConicToBSplineCurve& Convert
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(BSplineCurve) Geom2dConvert::SplitBSplineCurve ( Handle(Geom2d_BSplineCurve) Geom2dConvert::SplitBSplineCurve (
const Handle(BSplineCurve)& C, const Handle(Geom2d_BSplineCurve)& C,
const Standard_Integer FromK1, const Standard_Integer FromK1,
const Standard_Integer ToK2, const Standard_Integer ToK2,
const Standard_Boolean SameOrientation const Standard_Boolean SameOrientation
@ -166,7 +151,7 @@ const Standard_Boolean SameOrientation
Standard_Integer LastK = Max (FromK1, ToK2); Standard_Integer LastK = Max (FromK1, ToK2);
if (FirstK < TheFirst || LastK > TheLast) Standard_OutOfRange::Raise(); if (FirstK < TheFirst || LastK > TheLast) Standard_OutOfRange::Raise();
Handle(BSplineCurve) NewCurve = Handle(BSplineCurve)::DownCast(C->Copy()); Handle(Geom2d_BSplineCurve) NewCurve = Handle(Geom2d_BSplineCurve)::DownCast(C->Copy());
NewCurve->Segment(C->Knot(FirstK),C->Knot(LastK)); NewCurve->Segment(C->Knot(FirstK),C->Knot(LastK));
@ -185,9 +170,9 @@ const Standard_Boolean SameOrientation
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(BSplineCurve) Geom2dConvert::SplitBSplineCurve ( Handle(Geom2d_BSplineCurve) Geom2dConvert::SplitBSplineCurve (
const Handle(BSplineCurve)& C, const Handle(Geom2d_BSplineCurve)& C,
const Standard_Real FromU1, const Standard_Real FromU1,
const Standard_Real ToU2, const Standard_Real ToU2,
const Standard_Real, // ParametricTolerance, const Standard_Real, // ParametricTolerance,
@ -218,9 +203,9 @@ const Standard_Boolean SameOrientation
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(BSplineCurve) Geom2dConvert::CurveToBSplineCurve ( Handle(Geom2d_BSplineCurve) Geom2dConvert::CurveToBSplineCurve (
const Handle(Curve)& C, const Handle(Geom2d_Curve)& C,
const Convert_ParameterisationType Parameterisation) const Convert_ParameterisationType Parameterisation)
{ {
@ -228,7 +213,7 @@ const Convert_ParameterisationType Parameterisation)
if (C->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) { if (C->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
Handle (Curve) Curv; Handle (Curve) Curv;
Handle(TrimmedCurve) Ctrim = Handle(TrimmedCurve)::DownCast(C); Handle(Geom2d_TrimmedCurve) Ctrim = Handle(Geom2d_TrimmedCurve)::DownCast(C);
Curv = Ctrim->BasisCurve(); Curv = Ctrim->BasisCurve();
Standard_Real U1 = Ctrim->FirstParameter(); Standard_Real U1 = Ctrim->FirstParameter();
Standard_Real U2 = Ctrim->LastParameter(); Standard_Real U2 = Ctrim->LastParameter();
@ -259,7 +244,7 @@ const Convert_ParameterisationType Parameterisation)
} }
else if (Curv->IsKind(STANDARD_TYPE(Geom2d_Circle))) { else if (Curv->IsKind(STANDARD_TYPE(Geom2d_Circle))) {
Handle(Circle) TheConic= Handle(Circle)::DownCast(Curv); Handle(Geom2d_Circle) TheConic= Handle(Geom2d_Circle)::DownCast(Curv);
Circ2d C2d (gp::OX2d(), TheConic->Radius()); Circ2d C2d (gp::OX2d(), TheConic->Radius());
if(Parameterisation != Convert_RationalC1) { if(Parameterisation != Convert_RationalC1) {
Convert_CircleToBSplineCurve Convert (C2d, Convert_CircleToBSplineCurve Convert (C2d,
@ -306,7 +291,7 @@ const Convert_ParameterisationType Parameterisation)
} }
else if (Curv->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) { else if (Curv->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) {
Handle(Ellipse) TheConic = Handle(Ellipse)::DownCast(Curv); Handle(Geom2d_Ellipse) TheConic = Handle(Geom2d_Ellipse)::DownCast(Curv);
Elips2d E2d (gp::OX2d(), Elips2d E2d (gp::OX2d(),
TheConic->MajorRadius(), TheConic->MajorRadius(),
@ -356,7 +341,7 @@ const Convert_ParameterisationType Parameterisation)
} }
else if (Curv->IsKind(STANDARD_TYPE(Geom2d_Hyperbola))) { else if (Curv->IsKind(STANDARD_TYPE(Geom2d_Hyperbola))) {
Handle(Hyperbola) TheConic = Handle(Hyperbola)::DownCast(Curv); Handle(Geom2d_Hyperbola) TheConic = Handle(Geom2d_Hyperbola)::DownCast(Curv);
Hypr2d H2d (gp::OX2d(), Hypr2d H2d (gp::OX2d(),
TheConic->MajorRadius(), TheConic->MinorRadius()); TheConic->MajorRadius(), TheConic->MinorRadius());
@ -365,7 +350,7 @@ const Convert_ParameterisationType Parameterisation)
} }
else if (Curv->IsKind(STANDARD_TYPE(Geom2d_Parabola))) { else if (Curv->IsKind(STANDARD_TYPE(Geom2d_Parabola))) {
Handle(Parabola) TheConic = Handle(Parabola)::DownCast(Curv); Handle(Geom2d_Parabola) TheConic = Handle(Geom2d_Parabola)::DownCast(Curv);
Parab2d Prb2d (gp::OX2d(), TheConic->Focal()); Parab2d Prb2d (gp::OX2d(), TheConic->Focal());
Convert_ParabolaToBSplineCurve Convert (Prb2d, U1, U2); Convert_ParabolaToBSplineCurve Convert (Prb2d, U1, U2);
@ -374,7 +359,7 @@ const Convert_ParameterisationType Parameterisation)
else if (Curv->IsKind (STANDARD_TYPE(Geom2d_BezierCurve))) { else if (Curv->IsKind (STANDARD_TYPE(Geom2d_BezierCurve))) {
Handle(BezierCurve) CBez = Handle(BezierCurve)::DownCast(Curv->Copy()); Handle(Geom2d_BezierCurve) CBez = Handle(Geom2d_BezierCurve)::DownCast(Curv->Copy());
CBez->Segment (U1, U2); CBez->Segment (U1, U2);
Standard_Integer NbPoles = CBez->NbPoles(); Standard_Integer NbPoles = CBez->NbPoles();
@ -422,7 +407,7 @@ const Convert_ParameterisationType Parameterisation)
else { else {
if (C->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) { if (C->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) {
Handle(Ellipse) TheConic = Handle(Ellipse)::DownCast(C); Handle(Geom2d_Ellipse) TheConic = Handle(Geom2d_Ellipse)::DownCast(C);
Elips2d E2d (gp::OX2d(), Elips2d E2d (gp::OX2d(),
TheConic->MajorRadius(), TheConic->MinorRadius()); TheConic->MajorRadius(), TheConic->MinorRadius());
@ -433,7 +418,7 @@ const Convert_ParameterisationType Parameterisation)
} }
else if (C->IsKind(STANDARD_TYPE(Geom2d_Circle))) { else if (C->IsKind(STANDARD_TYPE(Geom2d_Circle))) {
Handle(Circle) TheConic = Handle(Circle)::DownCast(C); Handle(Geom2d_Circle) TheConic = Handle(Geom2d_Circle)::DownCast(C);
Circ2d C2d (gp::OX2d(), TheConic->Radius()); Circ2d C2d (gp::OX2d(), TheConic->Radius());
Convert_CircleToBSplineCurve Convert (C2d, Convert_CircleToBSplineCurve Convert (C2d,
@ -443,7 +428,7 @@ const Convert_ParameterisationType Parameterisation)
} }
else if (C->IsKind (STANDARD_TYPE(Geom2d_BezierCurve))) { else if (C->IsKind (STANDARD_TYPE(Geom2d_BezierCurve))) {
Handle(BezierCurve) CBez = Handle(BezierCurve)::DownCast(C); Handle(Geom2d_BezierCurve) CBez = Handle(Geom2d_BezierCurve)::DownCast(C);
Standard_Integer NbPoles = CBez->NbPoles(); Standard_Integer NbPoles = CBez->NbPoles();
Standard_Integer Degree = CBez->Degree(); Standard_Integer Degree = CBez->Degree();
@ -1477,7 +1462,7 @@ void Geom2dConvert::C0BSplineToC1BSplineCurve(Handle(Geom2d_BSplineCurve)& BS,
U2=BSKnots(j); U2=BSKnots(j);
j++; j++;
Handle(Geom2d_BSplineCurve) BSbis=Handle(Geom2d_BSplineCurve::DownCast(BS->Copy())); Handle(Geom2d_BSplineCurve) BSbis=Handle(Geom2d_BSplineCurve)::DownCast(BS->Copy());
BSbis->Segment(U1,U2); BSbis->Segment(U1,U2);
ArrayOfCurves(i)=BSbis; ArrayOfCurves(i)=BSbis;
} }
@ -1566,7 +1551,7 @@ void Geom2dConvert::C0BSplineToArrayOfC1BSplineCurve(const Handle(Geom2d_BSpline
j++; j++;
U2=BSKnots(j); U2=BSKnots(j);
j++; j++;
Handle(Geom2d_BSplineCurve) BSbis=Handle(Geom2d_BSplineCurve::DownCast(BS->Copy())); Handle(Geom2d_BSplineCurve) BSbis=Handle(Geom2d_BSplineCurve)::DownCast(BS->Copy());
BSbis->Segment(U1,U2); BSbis->Segment(U1,U2);
ArrayOfCurves(i)=BSbis; ArrayOfCurves(i)=BSbis;
} }

View File

@ -20,17 +20,13 @@
#include <BSplCLib.hxx> #include <BSplCLib.hxx>
typedef Handle(Geom2d_BSplineCurve) Handle(BSplineCurve);
typedef TColStd_Array1OfInteger Array1OfInteger; typedef TColStd_Array1OfInteger Array1OfInteger;
typedef TColStd_HArray1OfInteger HArray1OfInteger; typedef TColStd_HArray1OfInteger HArray1OfInteger;
Geom2dConvert_BSplineCurveKnotSplitting:: Geom2dConvert_BSplineCurveKnotSplitting::
Geom2dConvert_BSplineCurveKnotSplitting ( Geom2dConvert_BSplineCurveKnotSplitting (
const Handle(BSplineCurve)& BasisCurve, const Handle(Geom2d_BSplineCurve)& BasisCurve,
const Standard_Integer ContinuityRange const Standard_Integer ContinuityRange
) { ) {

View File

@ -22,13 +22,14 @@
#include <GccEnt_BadQualifier.hxx> #include <GccEnt_BadQualifier.hxx>
#include <Geom2d_Circle.hxx> #include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx> #include <Geom2d_Line.hxx>
#include <Geom2d_Point.hxx>
#include <GccEnt_QualifiedCirc.hxx> #include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx> #include <GccEnt_QualifiedLin.hxx>
#include <StdFail_NotDone.hxx> #include <StdFail_NotDone.hxx>
Geom2dGcc_Circ2dTanCen:: Geom2dGcc_Circ2dTanCen::
Geom2dGcc_Circ2dTanCen (const Geom2dGcc_QualifiedCurve& Qualified1 , Geom2dGcc_Circ2dTanCen (const Geom2dGcc_QualifiedCurve& Qualified1 ,
const Handle(Geom2d_Point&) PCenter , const Handle(Geom2d_Point)& PCenter ,
const Standard_Real Tolerance ): const Standard_Real Tolerance ):
cirsol(1,2) , cirsol(1,2) ,
qualifier1(1,2), qualifier1(1,2),

View File

@ -140,7 +140,7 @@ Geom2dGcc_Circ2dTanOnRad::
} }
Geom2dGcc_Circ2dTanOnRad:: Geom2dGcc_Circ2dTanOnRad::
Geom2dGcc_Circ2dTanOnRad (const Handle(Geom2d_Point&) Point1 , Geom2dGcc_Circ2dTanOnRad (const Handle(Geom2d_Point)& Point1 ,
const Geom2dAdaptor_Curve& OnCurve , const Geom2dAdaptor_Curve& OnCurve ,
const Standard_Real Radius , const Standard_Real Radius ,
const Standard_Real Tolerance ): const Standard_Real Tolerance ):

View File

@ -1331,7 +1331,7 @@ void GeomConvert::C0BSplineToArrayOfC1BSplineCurve(
U2=BSKnots(j); U2=BSKnots(j);
j++; j++;
Handle(Geom_BSplineCurve) Handle(Geom_BSplineCurve)
BSbis=Handle(Geom_BSplineCurve::DownCast(BS->Copy())); BSbis=Handle(Geom_BSplineCurve)::DownCast(BS->Copy());
BSbis->Segment(U1,U2); BSbis->Segment(U1,U2);
ArrayOfCurves(i)=BSbis; ArrayOfCurves(i)=BSbis;
} }

View File

@ -68,47 +68,25 @@
#include <gp_Trsf.hxx> #include <gp_Trsf.hxx>
#include <gp_GTrsf.hxx> #include <gp_GTrsf.hxx>
typedef Geom_Surface Surface; typedef Geom_Surface Surface;
typedef Geom_BSplineSurface BSplineSurface; typedef Geom_BSplineSurface BSplineSurface;
typedef Handle(Geom_Curve) Handle(Curve);
typedef Handle(Geom_BSplineCurve) Handle(BSplineCurve);
typedef Handle(Geom_BezierSurface) Handle(BezierSurface);
typedef Handle(Geom_Geometry) Handle(Geometry);
typedef Handle(Geom_Surface) Handle(Surface);
typedef Handle(Geom_Plane) Handle(Plane);
typedef Handle(Geom_CylindricalSurface) Handle(CylindricalSurface);
typedef Handle(Geom_ConicalSurface) Handle(ConicalSurface);
typedef Handle(Geom_SphericalSurface) Handle(SphericalSurface);
typedef Handle(Geom_ToroidalSurface) Handle(ToroidalSurface);
typedef Handle(Geom_BSplineSurface) Handle(BSplineSurface);
typedef Handle(Geom_SurfaceOfRevolution) Handle(SurfaceOfRevolution);
typedef Handle(Geom_SurfaceOfLinearExtrusion) Handle(SurfaceOfLinearExtrusion);
typedef Handle(Geom_RectangularTrimmedSurface)
Handle(RectangularTrimmedSurface);
typedef TColStd_Array1OfReal Array1OfReal; typedef TColStd_Array1OfReal Array1OfReal;
typedef TColStd_Array2OfReal Array2OfReal; typedef TColStd_Array2OfReal Array2OfReal;
typedef TColStd_Array1OfInteger Array1OfInteger; typedef TColStd_Array1OfInteger Array1OfInteger;
typedef TColStd_Array2OfInteger Array2OfInteger; typedef TColStd_Array2OfInteger Array2OfInteger;
typedef TColgp_Array2OfPnt Array2OfPnt; typedef TColgp_Array2OfPnt Array2OfPnt;
typedef TColgp_Array1OfPnt Array1OfPnt; typedef TColgp_Array1OfPnt Array1OfPnt;
typedef gp_Pnt Pnt; typedef gp_Pnt Pnt;
//======================================================================= //=======================================================================
//function : BSplineSurfaceBuilder //function : BSplineSurfaceBuilder
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(BSplineSurface) BSplineSurfaceBuilder Handle(Geom_BSplineSurface) BSplineSurfaceBuilder
(const Convert_ElementarySurfaceToBSplineSurface& Convert) (const Convert_ElementarySurfaceToBSplineSurface& Convert)
{ {
Handle(BSplineSurface) TheSurface; Handle(Geom_BSplineSurface) TheSurface;
Standard_Integer UDegree = Convert.UDegree (); Standard_Integer UDegree = Convert.UDegree ();
Standard_Integer VDegree = Convert.VDegree (); Standard_Integer VDegree = Convert.VDegree ();
Standard_Integer NbUPoles = Convert.NbUPoles(); Standard_Integer NbUPoles = Convert.NbUPoles();
@ -148,8 +126,8 @@ Handle(BSplineSurface) BSplineSurfaceBuilder
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(BSplineSurface) GeomConvert::SplitBSplineSurface Handle(Geom_BSplineSurface) GeomConvert::SplitBSplineSurface
(const Handle(BSplineSurface)& S, (const Handle(Geom_BSplineSurface)& S,
const Standard_Integer FromUK1, const Standard_Integer FromUK1,
const Standard_Integer ToUK2, const Standard_Integer ToUK2,
const Standard_Integer FromVK1, const Standard_Integer FromVK1,
@ -169,7 +147,7 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
if (FirstUK < FirstU || LastUK > LastU || if (FirstUK < FirstU || LastUK > LastU ||
FirstVK < FirstV || LastVK > LastV) { Standard_DomainError::Raise(); } FirstVK < FirstV || LastVK > LastV) { Standard_DomainError::Raise(); }
Handle(BSplineSurface) S1= Handle(BSplineSurface)::DownCast(S->Copy()); Handle(Geom_BSplineSurface) S1= Handle(Geom_BSplineSurface)::DownCast(S->Copy());
S1->Segment(S1->UKnot(FirstUK),S1->UKnot(LastUK), S1->Segment(S1->UKnot(FirstUK),S1->UKnot(LastUK),
S1->VKnot(FirstVK),S1->VKnot(LastVK)); S1->VKnot(FirstVK),S1->VKnot(LastVK));
@ -195,8 +173,8 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(BSplineSurface) GeomConvert::SplitBSplineSurface Handle(Geom_BSplineSurface) GeomConvert::SplitBSplineSurface
(const Handle(BSplineSurface)& S, (const Handle(Geom_BSplineSurface)& S,
const Standard_Integer FromK1, const Standard_Integer FromK1,
const Standard_Integer ToK2, const Standard_Integer ToK2,
const Standard_Boolean USplit, const Standard_Boolean USplit,
@ -205,7 +183,7 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
if (FromK1 == ToK2) Standard_DomainError::Raise(); if (FromK1 == ToK2) Standard_DomainError::Raise();
Handle(BSplineSurface) S1 = Handle(BSplineSurface)::DownCast(S->Copy()); Handle(Geom_BSplineSurface) S1 = Handle(Geom_BSplineSurface)::DownCast(S->Copy());
if (USplit) { if (USplit) {
@ -258,8 +236,8 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(BSplineSurface) GeomConvert::SplitBSplineSurface Handle(Geom_BSplineSurface) GeomConvert::SplitBSplineSurface
(const Handle(BSplineSurface)& S, (const Handle(Geom_BSplineSurface)& S,
const Standard_Real FromU1, const Standard_Real FromU1,
const Standard_Real ToU2, const Standard_Real ToU2,
const Standard_Real FromV1, const Standard_Real FromV1,
@ -300,8 +278,8 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(BSplineSurface) GeomConvert::SplitBSplineSurface Handle(Geom_BSplineSurface) GeomConvert::SplitBSplineSurface
(const Handle(BSplineSurface)& S, (const Handle(Geom_BSplineSurface)& S,
const Standard_Real FromParam1, const Standard_Real FromParam1,
const Standard_Real ToParam2, const Standard_Real ToParam2,
const Standard_Boolean USplit, const Standard_Boolean USplit,
@ -311,7 +289,7 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
if (Abs (FromParam1 - ToParam2) <= Abs(ParametricTolerance)) { if (Abs (FromParam1 - ToParam2) <= Abs(ParametricTolerance)) {
Standard_DomainError::Raise(); Standard_DomainError::Raise();
} }
Handle(BSplineSurface) NewSurface Handle(Geom_BSplineSurface) NewSurface
= Handle(Geom_BSplineSurface)::DownCast(S->Copy()); = Handle(Geom_BSplineSurface)::DownCast(S->Copy());
if (USplit) { if (USplit) {
@ -356,7 +334,7 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
//======================================================================= //=======================================================================
Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
(const Handle(Surface)& Sr) (const Handle(Geom_Surface)& Sr)
{ {
Standard_Real U1, U2, V1, V2; Standard_Real U1, U2, V1, V2;
Sr->Bounds (U1, U2, V1, V2); Sr->Bounds (U1, U2, V1, V2);
@ -374,7 +352,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
} }
Handle(Geom_BSplineSurface) TheSurface; Handle(Geom_BSplineSurface) TheSurface;
Handle(Surface) S; Handle(Geom_Surface) S;
Handle(Geom_OffsetSurface) OffsetSur; Handle(Geom_OffsetSurface) OffsetSur;
if (Sr->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) { if (Sr->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) {
OffsetSur = *((Handle(Geom_OffsetSurface)*)& Sr); OffsetSur = *((Handle(Geom_OffsetSurface)*)& Sr);

Some files were not shown because too many files have changed in this diff Show More