mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +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:
@@ -19,7 +19,6 @@
|
||||
|
||||
|
||||
typedef Geom2d_AxisPlacement AxisPlacement;
|
||||
typedef Handle(Geom2d_AxisPlacement) Handle(AxisPlacement);
|
||||
typedef gp_Dir2d Dir2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
typedef gp_Trsf2d Trsf2d;
|
||||
@@ -30,7 +29,7 @@ typedef gp_Vec2d Vec2d;
|
||||
|
||||
Handle(Geom2d_Geometry) Geom2d_AxisPlacement::Copy() const {
|
||||
|
||||
Handle(AxisPlacement) A;
|
||||
Handle(Geom2d_AxisPlacement) A;
|
||||
A = new AxisPlacement (axis);
|
||||
return A;
|
||||
}
|
||||
@@ -56,11 +55,11 @@ Pnt2d Geom2d_AxisPlacement::Location () const { return axis.Location(); }
|
||||
|
||||
void Geom2d_AxisPlacement::Reverse() { axis.Reverse(); }
|
||||
|
||||
Handle(AxisPlacement) Geom2d_AxisPlacement::Reversed() const {
|
||||
Handle(Geom2d_AxisPlacement) Geom2d_AxisPlacement::Reversed() const {
|
||||
|
||||
gp_Ax2d A = axis;
|
||||
A.Reverse();
|
||||
Handle(AxisPlacement) Temp = new AxisPlacement (A);
|
||||
Handle(Geom2d_AxisPlacement) Temp = new AxisPlacement (A);
|
||||
return Temp;
|
||||
}
|
||||
|
||||
@@ -76,7 +75,7 @@ void Geom2d_AxisPlacement::SetDirection (const Dir2d& 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());
|
||||
}
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#include <Geom2d_CartesianPoint.ixx>
|
||||
|
||||
typedef Geom2d_CartesianPoint CartesianPoint;
|
||||
typedef Handle(Geom2d_CartesianPoint) Handle(CartesianPoint);
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Vec2d Vec2d;
|
||||
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(CartesianPoint) P;
|
||||
Handle(Geom2d_CartesianPoint) P;
|
||||
P = new CartesianPoint (gpPnt2d);
|
||||
return P;
|
||||
}
|
||||
|
@@ -22,7 +22,6 @@
|
||||
|
||||
|
||||
typedef Geom2d_Circle Circle;
|
||||
typedef Handle(Geom2d_Circle) Handle(Circle);
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Dir2d Dir2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
@@ -30,13 +29,6 @@ typedef gp_Trsf2d Trsf2d;
|
||||
typedef gp_Vec2d Vec2d;
|
||||
typedef gp_XY XY;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -44,7 +36,7 @@ typedef gp_XY XY;
|
||||
|
||||
Handle(Geom2d_Geometry) Geom2d_Circle::Copy() const
|
||||
{
|
||||
Handle(Circle) C;
|
||||
Handle(Geom2d_Circle) C;
|
||||
C = new Circle (pos, radius);
|
||||
return C;
|
||||
}
|
||||
|
@@ -19,7 +19,6 @@
|
||||
|
||||
|
||||
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(Curve) C = Handle(Curve)::DownCast(Copy());
|
||||
Handle(Geom2d_Curve) C = Handle(Geom2d_Curve)::DownCast(Copy());
|
||||
C->Reverse();
|
||||
return C;
|
||||
}
|
||||
|
@@ -19,8 +19,6 @@
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
typedef Geom2d_Direction Direction;
|
||||
typedef Handle(Geom2d_Direction) Handle(Direction);
|
||||
typedef Handle(Geom2d_Vector) Handle(Vector);
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
typedef gp_Trsf2d Trsf2d;
|
||||
@@ -31,7 +29,7 @@ typedef gp_Trsf2d Trsf2d;
|
||||
|
||||
Handle(Geom2d_Geometry) Geom2d_Direction::Copy() const {
|
||||
|
||||
Handle(Direction) D;
|
||||
Handle(Geom2d_Direction) D;
|
||||
D = new Direction (gpVec2d);
|
||||
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::Crossed (const Handle(Vector)& Other) const {
|
||||
Standard_Real Geom2d_Direction::Crossed (const Handle(Geom2d_Vector)& Other) const {
|
||||
|
||||
return gpVec2d.Crossed (Other->Vec2d());
|
||||
}
|
||||
|
@@ -22,9 +22,7 @@
|
||||
#include <Standard_RangeError.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
|
||||
typedef Geom2d_Ellipse Ellipse;
|
||||
typedef Handle(Geom2d_Ellipse) Handle(Ellipse);
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Dir2d Dir2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
@@ -32,10 +30,6 @@ typedef gp_Vec2d Vec2d;
|
||||
typedef gp_Trsf2d Trsf2d;
|
||||
typedef gp_XY XY;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -43,7 +37,7 @@ typedef gp_XY XY;
|
||||
|
||||
Handle(Geom2d_Geometry) Geom2d_Ellipse::Copy() const
|
||||
{
|
||||
Handle(Ellipse) E;
|
||||
Handle(Geom2d_Ellipse) E;
|
||||
E = new Ellipse (pos, majorRadius, minorRadius);
|
||||
return E;
|
||||
}
|
||||
|
@@ -17,15 +17,12 @@
|
||||
#include <Geom2d_Geometry.ixx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
typedef Handle(Geom2d_Geometry) Handle(Geometry);
|
||||
typedef Geom2d_Geometry Geometry;
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
typedef gp_Vec2d Vec2d;
|
||||
typedef gp_Trsf2d Trsf2d;
|
||||
|
||||
|
||||
|
||||
void Geom2d_Geometry::Mirror (const gp_Pnt2d& P) {
|
||||
|
||||
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(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom2d_Geometry) Geom2d_Geometry::Mirrored (const gp_Pnt2d& P) const
|
||||
{
|
||||
Handle(Geom2d_Geometry) G = Copy();
|
||||
G->Mirror (P);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
Handle(Geometry) Geom2d_Geometry::Mirrored (const gp_Ax2d& A) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom2d_Geometry) Geom2d_Geometry::Mirrored (const gp_Ax2d& A) const
|
||||
{
|
||||
Handle(Geom2d_Geometry) G = Copy();
|
||||
G->Mirror (A);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
Handle(Geometry) Geom2d_Geometry::Rotated (
|
||||
const gp_Pnt2d& P, const Standard_Real Ang) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom2d_Geometry) Geom2d_Geometry::Rotated (const gp_Pnt2d& P, const Standard_Real Ang) const
|
||||
{
|
||||
Handle(Geom2d_Geometry) G = Copy();
|
||||
G->Rotate (P, Ang);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
Handle(Geometry) Geom2d_Geometry::Scaled (
|
||||
const gp_Pnt2d& P, const Standard_Real S) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom2d_Geometry) Geom2d_Geometry::Scaled (const gp_Pnt2d& P, const Standard_Real S) const
|
||||
{
|
||||
Handle(Geom2d_Geometry) G = Copy();
|
||||
G->Scale (P, S);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
Handle(Geometry) Geom2d_Geometry::Transformed (const gp_Trsf2d& T) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom2d_Geometry) Geom2d_Geometry::Transformed (const gp_Trsf2d& T) const
|
||||
{
|
||||
Handle(Geom2d_Geometry) G = Copy();
|
||||
G->Transform (T);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
Handle(Geometry) Geom2d_Geometry::Translated (const gp_Vec2d& V) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Vec2d& V) const
|
||||
{
|
||||
Handle(Geom2d_Geometry) G = Copy();
|
||||
G->Translate (V);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
Handle(Geometry) Geom2d_Geometry::Translated (
|
||||
const gp_Pnt2d& P1, const gp_Pnt2d& P2) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Pnt2d& P1, const gp_Pnt2d& P2) const
|
||||
{
|
||||
Handle(Geom2d_Geometry) G = Copy();
|
||||
G->Translate (P1, P2);
|
||||
return G;
|
||||
}
|
||||
|
@@ -25,10 +25,7 @@
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_RangeError.hxx>
|
||||
|
||||
|
||||
|
||||
typedef Geom2d_Hyperbola Hyperbola;
|
||||
typedef Handle(Geom2d_Hyperbola) Handle(Hyperbola);
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Dir2d Dir2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
@@ -36,10 +33,6 @@ typedef gp_Vec2d Vec2d;
|
||||
typedef gp_Trsf2d Trsf2d;
|
||||
typedef gp_XY XY;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -47,7 +40,7 @@ typedef gp_XY XY;
|
||||
|
||||
Handle(Geom2d_Geometry) Geom2d_Hyperbola::Copy() const
|
||||
{
|
||||
Handle(Hyperbola) H;
|
||||
Handle(Geom2d_Hyperbola) H;
|
||||
H = new Hyperbola (pos, majorRadius, minorRadius);
|
||||
return H;
|
||||
}
|
||||
|
@@ -21,9 +21,7 @@
|
||||
#include <gp_XY.hxx>
|
||||
#include <Standard_RangeError.hxx>
|
||||
|
||||
|
||||
typedef Geom2d_Line Line;
|
||||
typedef Handle(Geom2d_Line) Handle(Line);
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Dir2d Dir2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
@@ -31,10 +29,6 @@ typedef gp_Vec2d Vec2d;
|
||||
typedef gp_Trsf2d Trsf2d;
|
||||
typedef gp_XY XY;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -42,7 +36,7 @@ typedef gp_XY XY;
|
||||
|
||||
Handle(Geom2d_Geometry) Geom2d_Line::Copy() const
|
||||
{
|
||||
Handle(Line) L;
|
||||
Handle(Geom2d_Line) L;
|
||||
L = new Line (pos);
|
||||
return L;
|
||||
}
|
||||
|
@@ -37,10 +37,7 @@
|
||||
#include <gp_XY.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
typedef Handle(Geom2d_OffsetCurve) Handle(OffsetCurve);
|
||||
typedef Geom2d_OffsetCurve OffsetCurve;
|
||||
typedef Handle(Geom2d_Geometry) Handle(Geometry);
|
||||
typedef Handle(Geom2d_Curve) Handle(Curve);
|
||||
typedef Geom2d_Curve Curve;
|
||||
typedef gp_Dir2d Dir2d;
|
||||
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(OffsetCurve) C;
|
||||
Handle(Geom2d_OffsetCurve) C;
|
||||
C = new OffsetCurve (basisCurve, offsetValue);
|
||||
return C;
|
||||
}
|
||||
@@ -116,7 +113,7 @@ Standard_Real Geom2d_OffsetCurve::ReversedParameter( const Standard_Real U) cons
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom2d_OffsetCurve::SetBasisCurve (const Handle(Curve)& C,
|
||||
void Geom2d_OffsetCurve::SetBasisCurve (const Handle(Geom2d_Curve)& C,
|
||||
const Standard_Boolean isNotCheckC0)
|
||||
{
|
||||
const Standard_Real aUf = C->FirstParameter(),
|
||||
@@ -189,7 +186,7 @@ void Geom2d_OffsetCurve::SetOffsetValue (const Standard_Real D) { offsetValue =
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Curve) Geom2d_OffsetCurve::BasisCurve () const
|
||||
Handle(Geom2d_Curve) Geom2d_OffsetCurve::BasisCurve () const
|
||||
{
|
||||
return basisCurve;
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include <Standard_RangeError.hxx>
|
||||
|
||||
typedef Geom2d_Parabola Parabola;
|
||||
typedef Handle(Geom2d_Parabola) Handle(Parabola);
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Dir2d Dir2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
@@ -32,11 +31,6 @@ typedef gp_Vec2d Vec2d;
|
||||
typedef gp_Trsf2d Trsf2d;
|
||||
typedef gp_XY XY;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -44,7 +38,7 @@ typedef gp_XY XY;
|
||||
|
||||
Handle(Geom2d_Geometry) Geom2d_Parabola::Copy() const
|
||||
{
|
||||
Handle(Parabola) Prb;
|
||||
Handle(Geom2d_Parabola) Prb;
|
||||
Prb = new Parabola (pos, focalLength);
|
||||
return Prb;
|
||||
}
|
||||
|
@@ -17,10 +17,8 @@
|
||||
#include <Geom2d_Point.ixx>
|
||||
|
||||
typedef Geom2d_Point Point;
|
||||
typedef Handle(Geom2d_Point) Handle(Point);
|
||||
|
||||
|
||||
Standard_Real Geom2d_Point::Distance (const Handle(Point)& Other) const {
|
||||
Standard_Real Geom2d_Point::Distance (const Handle(Geom2d_Point)& Other) const {
|
||||
|
||||
gp_Pnt2d P1 = this-> 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 P2 = Other->Pnt2d ();
|
||||
|
@@ -18,23 +18,14 @@
|
||||
|
||||
|
||||
typedef Geom2d_Transformation Transformation;
|
||||
typedef Handle(Geom2d_Transformation) Handle(Transformation);
|
||||
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
typedef gp_TrsfForm TrsfForm;
|
||||
typedef gp_Vec2d Vec2d;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_Transformation) Geom2d_Transformation::Copy() const {
|
||||
|
||||
Handle(Transformation) T;
|
||||
Handle(Geom2d_Transformation) T;
|
||||
T = new Transformation (gpTrsf2d);
|
||||
return T;
|
||||
}
|
||||
@@ -49,21 +40,21 @@ Geom2d_Transformation::Geom2d_Transformation (const gp_Trsf2d& T)
|
||||
: gpTrsf2d (T) { }
|
||||
|
||||
|
||||
Handle(Transformation) Geom2d_Transformation::Inverted () const {
|
||||
Handle(Geom2d_Transformation) Geom2d_Transformation::Inverted () const {
|
||||
|
||||
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()));
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
Temp.Power (N);
|
||||
@@ -168,7 +159,7 @@ void Geom2d_Transformation::Power (const Standard_Integer N) { gpTrsf2d.Power (N
|
||||
|
||||
|
||||
void Geom2d_Transformation::PreMultiply (
|
||||
const Handle(Transformation)& Other) {
|
||||
const Handle(Geom2d_Transformation)& Other) {
|
||||
|
||||
gpTrsf2d.PreMultiply (Other->Trsf2d());
|
||||
}
|
||||
|
@@ -31,19 +31,12 @@
|
||||
#include <Precision.hxx>
|
||||
|
||||
|
||||
typedef Handle(Geom2d_TrimmedCurve) Handle(TrimmedCurve);
|
||||
typedef Geom2d_TrimmedCurve TrimmedCurve;
|
||||
typedef Handle(Geom2d_Curve) Handle(Curve);
|
||||
typedef Handle(Geom2d_Geometry) Handle(Geometry);
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
typedef gp_Trsf2d Trsf2d;
|
||||
typedef gp_Vec2d Vec2d;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -51,7 +44,7 @@ typedef gp_Vec2d Vec2d;
|
||||
|
||||
Handle(Geom2d_Geometry) Geom2d_TrimmedCurve::Copy () const
|
||||
{
|
||||
Handle(TrimmedCurve) Tc;
|
||||
Handle(Geom2d_TrimmedCurve) Tc;
|
||||
Tc = new TrimmedCurve (basisCurve, uTrim1, uTrim2);
|
||||
return Tc;
|
||||
}
|
||||
@@ -73,9 +66,9 @@ Geom2d_TrimmedCurve::Geom2d_TrimmedCurve (const Handle(Geom2d_Curve)& C,
|
||||
// kill trimmed basis curves
|
||||
Handle(Geom2d_TrimmedCurve) T = Handle(Geom2d_TrimmedCurve)::DownCast(C);
|
||||
if (!T.IsNull())
|
||||
basisCurve = Handle(Curve)::DownCast(T->BasisCurve()->Copy());
|
||||
basisCurve = Handle(Geom2d_Curve)::DownCast(T->BasisCurve()->Copy());
|
||||
else
|
||||
basisCurve = Handle(Curve)::DownCast(C->Copy());
|
||||
basisCurve = Handle(Geom2d_Curve)::DownCast(C->Copy());
|
||||
|
||||
SetTrim(U1, U2, Sense, theAdjustPeriodic);
|
||||
}
|
||||
@@ -160,7 +153,7 @@ void Geom2d_TrimmedCurve::SetTrim (const Standard_Real U1,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Curve) Geom2d_TrimmedCurve::BasisCurve () const
|
||||
Handle(Geom2d_Curve) Geom2d_TrimmedCurve::BasisCurve () const
|
||||
{
|
||||
return basisCurve;
|
||||
}
|
||||
|
@@ -17,12 +17,9 @@
|
||||
#include <Geom2d_Vector.ixx>
|
||||
|
||||
typedef Geom2d_Vector Vector;
|
||||
typedef Handle(Geom2d_Vector) Handle(Vector);
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
|
||||
|
||||
|
||||
Standard_Real Geom2d_Vector::Angle (
|
||||
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(); }
|
||||
|
||||
|
||||
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();
|
||||
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());
|
||||
}
|
||||
|
@@ -19,15 +19,10 @@
|
||||
|
||||
typedef Geom2d_Vector Vector;
|
||||
typedef Geom2d_VectorWithMagnitude VectorWithMagnitude;
|
||||
typedef Handle(Geom2d_VectorWithMagnitude) Handle(VectorWithMagnitude);
|
||||
typedef Handle(Geom2d_Vector) Handle(Vector);
|
||||
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
typedef gp_Trsf2d Trsf2d;
|
||||
|
||||
|
||||
|
||||
Geom2d_VectorWithMagnitude::Geom2d_VectorWithMagnitude (const gp_Vec2d& 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(VectorWithMagnitude) V;
|
||||
Handle(Geom2d_VectorWithMagnitude) V;
|
||||
V = new VectorWithMagnitude (gpVec2d);
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
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();
|
||||
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());
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
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 {
|
||||
|
||||
gp_Vec2d V(gpVec2d);
|
||||
@@ -129,7 +124,7 @@ void Geom2d_VectorWithMagnitude::Multiply (const Standard_Real Scalar) {
|
||||
void Geom2d_VectorWithMagnitude::Normalize () { gpVec2d.Normalize (); }
|
||||
|
||||
|
||||
Handle(VectorWithMagnitude) Geom2d_VectorWithMagnitude::Normalized () const {
|
||||
Handle(Geom2d_VectorWithMagnitude) Geom2d_VectorWithMagnitude::Normalized () const {
|
||||
|
||||
gp_Vec2d V = gpVec2d;
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
Handle(VectorWithMagnitude) Geom2d_VectorWithMagnitude::Subtracted (
|
||||
const Handle(Vector)& Other) const {
|
||||
Handle(Geom2d_VectorWithMagnitude) Geom2d_VectorWithMagnitude::Subtracted (
|
||||
const Handle(Geom2d_Vector)& Other) const {
|
||||
|
||||
gp_Vec2d V = gpVec2d;
|
||||
V.Subtract (Other->Vec2d());
|
||||
|
Reference in New Issue
Block a user