mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -17,7 +17,6 @@
|
||||
#include <Geom_Axis1Placement.ixx>
|
||||
|
||||
typedef Geom_Axis1Placement Axis1Placement;
|
||||
typedef Handle(Geom_Axis1Placement) Handle(Axis1Placement);
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Dir Dir;
|
||||
typedef gp_Pnt Pnt;
|
||||
@@ -31,7 +30,7 @@ typedef gp_Vec Vec;
|
||||
|
||||
Handle(Geom_Geometry) Geom_Axis1Placement::Copy() const {
|
||||
|
||||
Handle(Axis1Placement) A1;
|
||||
Handle(Geom_Axis1Placement) A1;
|
||||
A1 = new Axis1Placement (axis);
|
||||
return A1;
|
||||
}
|
||||
@@ -66,7 +65,7 @@ void Geom_Axis1Placement::Reverse() { axis.Reverse(); }
|
||||
|
||||
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;
|
||||
A1.Reverse();
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <Geom_Axis2Placement.ixx>
|
||||
|
||||
typedef Handle(Geom_Axis2Placement) Handle(Axis2Placement);
|
||||
typedef Geom_Axis2Placement Axis2Placement;
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Dir Dir;
|
||||
@@ -32,7 +31,7 @@ typedef gp_Vec Vec;
|
||||
|
||||
Handle(Geom_Geometry) Geom_Axis2Placement::Copy() const {
|
||||
|
||||
Handle(Axis2Placement) A2;
|
||||
Handle(Geom_Axis2Placement) A2;
|
||||
A2 = new Axis2Placement (axis.Location(), axis.Direction(), vxdir, vydir);
|
||||
return A2;
|
||||
}
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <Geom_AxisPlacement.ixx>
|
||||
|
||||
typedef Handle(Geom_AxisPlacement) Handle(AxisPlacement);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Dir Dir;
|
||||
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);}
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
@@ -17,14 +17,11 @@
|
||||
#include <Geom_CartesianPoint.ixx>
|
||||
|
||||
typedef Geom_CartesianPoint CartesianPoint;
|
||||
typedef Handle(Geom_CartesianPoint) Handle(CartesianPoint);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Vec Vec;
|
||||
typedef gp_Trsf Trsf;
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Geom_CartesianPoint
|
||||
//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(CartesianPoint) P;
|
||||
Handle(Geom_CartesianPoint) P;
|
||||
P = new CartesianPoint (gpPnt);
|
||||
return P;
|
||||
}
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
typedef Geom_Circle Circle;
|
||||
typedef Handle(Geom_Circle) Handle(Circle);
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Trsf Trsf;
|
||||
@@ -38,7 +37,7 @@ typedef gp_XYZ XYZ;
|
||||
|
||||
Handle(Geom_Geometry) Geom_Circle::Copy() const {
|
||||
|
||||
Handle(Circle) C;
|
||||
Handle(Geom_Circle) C;
|
||||
C = new Circle (pos, radius);
|
||||
return C;
|
||||
}
|
||||
|
@@ -32,7 +32,6 @@
|
||||
#include <Geom_Circle.hxx>
|
||||
|
||||
typedef Geom_ConicalSurface ConicalSurface;
|
||||
typedef Handle(Geom_ConicalSurface) Handle(ConicalSurface);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Ax3 Ax3;
|
||||
@@ -44,9 +43,6 @@ typedef gp_Trsf Trsf;
|
||||
typedef gp_Vec Vec;
|
||||
typedef gp_XYZ XYZ;
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -54,7 +50,7 @@ typedef gp_XYZ XYZ;
|
||||
|
||||
Handle(Geom_Geometry) Geom_ConicalSurface::Copy () const {
|
||||
|
||||
Handle(ConicalSurface) Cs;
|
||||
Handle(Geom_ConicalSurface) Cs;
|
||||
Cs = new ConicalSurface (pos, semiAngle, radius);
|
||||
return Cs;
|
||||
}
|
||||
|
@@ -17,17 +17,15 @@
|
||||
#include <Geom_Curve.ixx>
|
||||
|
||||
typedef Geom_Curve Curve;
|
||||
typedef Handle(Geom_Curve) Handle(Curve);
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Reversed
|
||||
//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();
|
||||
return C;
|
||||
}
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#include <ElSLib.hxx>
|
||||
|
||||
typedef Geom_CylindricalSurface CylindricalSurface;
|
||||
typedef Handle(Geom_CylindricalSurface) Handle(CylindricalSurface);
|
||||
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
@@ -53,7 +52,7 @@ typedef gp_XYZ XYZ;
|
||||
|
||||
Handle(Geom_Geometry) Geom_CylindricalSurface::Copy () const {
|
||||
|
||||
Handle(CylindricalSurface) Cs;
|
||||
Handle(Geom_CylindricalSurface) Cs;
|
||||
Cs = new CylindricalSurface (pos, radius);
|
||||
return Cs;
|
||||
}
|
||||
|
@@ -19,9 +19,7 @@
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
typedef Geom_Direction Direction;
|
||||
typedef Handle(Geom_Direction) Handle(Direction);
|
||||
typedef Geom_Vector Vector;
|
||||
typedef Handle(Geom_Vector) Handle(Vector);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
@@ -36,7 +34,7 @@ typedef gp_Trsf Trsf;
|
||||
|
||||
Handle(Geom_Geometry) Geom_Direction::Copy() const {
|
||||
|
||||
Handle(Direction) D;
|
||||
Handle(Geom_Direction) D;
|
||||
D = new Direction (gpVec);
|
||||
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()));
|
||||
gpVec = V;
|
||||
@@ -103,14 +101,14 @@ void Geom_Direction::Cross (const Handle(Vector)& Other) {
|
||||
|
||||
|
||||
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()));
|
||||
gpVec = V;
|
||||
}
|
||||
|
||||
|
||||
Handle(Vector) Geom_Direction::Crossed (const Handle(Vector)& Other)
|
||||
Handle(Geom_Vector) Geom_Direction::Crossed (const Handle(Geom_Vector)& Other)
|
||||
const {
|
||||
|
||||
gp_Dir V (gpVec.Crossed (Other->Vec()));
|
||||
@@ -118,8 +116,8 @@ const {
|
||||
}
|
||||
|
||||
|
||||
Handle(Vector) Geom_Direction::CrossCrossed (
|
||||
const Handle(Vector)& V1, const Handle(Vector)& V2) const {
|
||||
Handle(Geom_Vector) Geom_Direction::CrossCrossed (
|
||||
const Handle(Geom_Vector)& V1, const Handle(Geom_Vector)& V2) const {
|
||||
|
||||
gp_Dir V (gpVec.CrossCrossed (V1->Vec(), V2->Vec()));
|
||||
return new Direction (V);
|
||||
|
@@ -16,12 +16,7 @@
|
||||
|
||||
#include <Geom_ElementarySurface.ixx>
|
||||
|
||||
|
||||
|
||||
typedef Geom_ElementarySurface ElementarySurface;
|
||||
typedef Handle(Geom_ElementarySurface) Handle(ElementarySurface);
|
||||
typedef Handle(Geom_Surface) Handle(Surface);
|
||||
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Ax3 Ax3;
|
||||
@@ -29,9 +24,6 @@ typedef gp_Dir Dir;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Vec Vec;
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Continuity
|
||||
//purpose :
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <Standard_RangeError.hxx>
|
||||
|
||||
typedef Geom_Ellipse Ellipse;
|
||||
typedef Handle(Geom_Ellipse) Handle(Ellipse);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
@@ -29,10 +28,6 @@ typedef gp_Vec Vec;
|
||||
typedef gp_Trsf Trsf;
|
||||
typedef gp_XYZ XYZ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -40,7 +35,7 @@ typedef gp_XYZ XYZ;
|
||||
|
||||
Handle(Geom_Geometry) Geom_Ellipse::Copy() const
|
||||
{
|
||||
Handle(Ellipse) E;
|
||||
Handle(Geom_Ellipse) E;
|
||||
E = new Ellipse (pos, majorRadius, minorRadius);
|
||||
return E;
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include <Geom_Geometry.ixx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
typedef Handle(Geom_Geometry) Handle(Geometry);
|
||||
typedef Geom_Geometry Geometry;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Vec Vec;
|
||||
@@ -28,8 +27,6 @@ typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Trsf Trsf;
|
||||
|
||||
|
||||
|
||||
Handle(Geom_Geometry) Geom_Geometry::Copy() const {
|
||||
|
||||
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(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom_Geometry) Geom_Geometry::Mirrored (const gp_Pnt& P) const
|
||||
{
|
||||
Handle(Geom_Geometry) G = Copy();
|
||||
G->Mirror (P);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
Handle(Geometry) Geom_Geometry::Mirrored (const gp_Ax1& A1) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom_Geometry) Geom_Geometry::Mirrored (const gp_Ax1& A1) const
|
||||
{
|
||||
Handle(Geom_Geometry) G = Copy();
|
||||
G->Mirror (A1);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
Handle(Geometry) Geom_Geometry::Mirrored (const gp_Ax2& A2) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom_Geometry) Geom_Geometry::Mirrored (const gp_Ax2& A2) const
|
||||
{
|
||||
Handle(Geom_Geometry) G = Copy();
|
||||
G->Mirror (A2);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Handle(Geometry) Geom_Geometry::Rotated (
|
||||
|
||||
const gp_Ax1& A1,
|
||||
const Standard_Real Ang
|
||||
) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom_Geometry) Geom_Geometry::Rotated (const gp_Ax1& A1, const Standard_Real Ang) const
|
||||
{
|
||||
Handle(Geom_Geometry) G = Copy();
|
||||
G->Rotate (A1, Ang);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Handle(Geometry) Geom_Geometry::Scaled (const gp_Pnt& P, const Standard_Real S) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom_Geometry) Geom_Geometry::Scaled (const gp_Pnt& P, const Standard_Real S) const
|
||||
{
|
||||
Handle(Geom_Geometry) G = Copy();
|
||||
G->Scale (P, S);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Handle(Geometry) Geom_Geometry::Transformed (const gp_Trsf& T) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom_Geometry) Geom_Geometry::Transformed (const gp_Trsf& T) const
|
||||
{
|
||||
Handle(Geom_Geometry) G = Copy();
|
||||
G->Transform (T);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Handle(Geometry) Geom_Geometry::Translated (const gp_Vec& V) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom_Geometry) Geom_Geometry::Translated (const gp_Vec& V) const
|
||||
{
|
||||
Handle(Geom_Geometry) G = Copy();
|
||||
G->Translate (V);
|
||||
return G;
|
||||
}
|
||||
|
||||
|
||||
Handle(Geometry) Geom_Geometry::Translated (
|
||||
|
||||
const gp_Pnt& P1,
|
||||
const gp_Pnt& P2
|
||||
) const {
|
||||
|
||||
Handle(Geometry) me = this;
|
||||
Handle(Geometry) G = me->Copy();
|
||||
Handle(Geom_Geometry) Geom_Geometry::Translated (const gp_Pnt& P1, const gp_Pnt& P2) const
|
||||
{
|
||||
Handle(Geom_Geometry) G = Copy();
|
||||
G->Translate (P1, P2);
|
||||
return G;
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
|
||||
typedef Geom_Hyperbola Hyperbola;
|
||||
typedef Handle(Geom_Hyperbola) Handle(Hyperbola);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
@@ -32,10 +31,6 @@ typedef gp_Vec Vec;
|
||||
typedef gp_Trsf Trsf;
|
||||
typedef gp_XYZ XYZ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -43,7 +38,7 @@ typedef gp_XYZ XYZ;
|
||||
|
||||
Handle(Geom_Geometry) Geom_Hyperbola::Copy() const {
|
||||
|
||||
Handle(Hyperbola) H;
|
||||
Handle(Geom_Hyperbola) H;
|
||||
H = new Hyperbola (pos, majorRadius, minorRadius);
|
||||
return H;
|
||||
}
|
||||
|
@@ -42,20 +42,13 @@
|
||||
#include <CSLib_Offset.hxx>
|
||||
|
||||
typedef Geom_OffsetCurve OffsetCurve;
|
||||
typedef Handle(Geom_OffsetCurve) Handle(OffsetCurve);
|
||||
typedef Geom_Curve Curve;
|
||||
typedef Handle(Geom_Curve) Handle(Curve);
|
||||
typedef Handle(Geom_Geometry) Handle(Geometry);
|
||||
|
||||
typedef gp_Dir Dir;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Trsf Trsf;
|
||||
typedef gp_Vec Vec;
|
||||
typedef gp_XYZ XYZ;
|
||||
|
||||
|
||||
|
||||
|
||||
//ordre de derivation maximum pour la recherche de la premiere
|
||||
//derivee non nulle
|
||||
static const int maxDerivOrder = 3;
|
||||
@@ -79,7 +72,7 @@ static Standard_Boolean AdjustDerivative(
|
||||
|
||||
Handle(Geom_Geometry) Geom_OffsetCurve::Copy () const {
|
||||
|
||||
Handle(OffsetCurve) C;
|
||||
Handle(Geom_OffsetCurve) C;
|
||||
C = new OffsetCurve (basisCurve, offsetValue, direction);
|
||||
return C;
|
||||
}
|
||||
@@ -174,12 +167,12 @@ Standard_Real Geom_OffsetCurve::Period () const
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_OffsetCurve::SetBasisCurve (const Handle(Curve)& C,
|
||||
void Geom_OffsetCurve::SetBasisCurve (const Handle(Geom_Curve)& C,
|
||||
const Standard_Boolean isNotCheckC0)
|
||||
{
|
||||
const Standard_Real aUf = C->FirstParameter(),
|
||||
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;
|
||||
|
||||
while(aCheckingCurve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)) ||
|
||||
@@ -255,7 +248,7 @@ void Geom_OffsetCurve::SetBasisCurve (const Handle(Curve)& C,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Curve) Geom_OffsetCurve::BasisCurve () const
|
||||
Handle(Geom_Curve) Geom_OffsetCurve::BasisCurve () const
|
||||
{
|
||||
return basisCurve;
|
||||
}
|
||||
|
@@ -71,13 +71,8 @@
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
|
||||
typedef Handle(Geom_OffsetCurve) Handle(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 Handle(Geom_Geometry) Handle(Geometry);
|
||||
typedef gp_Dir Dir;
|
||||
typedef gp_Vec Vec;
|
||||
typedef gp_Pnt Pnt;
|
||||
@@ -210,7 +205,7 @@ static void derivatives(Standard_Integer MaxOrder,
|
||||
|
||||
Handle(Geom_Geometry) Geom_OffsetSurface::Copy () const {
|
||||
|
||||
Handle(OffsetSurface) S;
|
||||
Handle(Geom_OffsetSurface) S;
|
||||
S = new OffsetSurface (basisSurf, offsetValue);
|
||||
return S;
|
||||
}
|
||||
@@ -240,13 +235,13 @@ Geom_OffsetSurface::Geom_OffsetSurface (const Handle(Geom_Surface)& theSurf,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_OffsetSurface::SetBasisSurface (const Handle(Surface)& S,
|
||||
void Geom_OffsetSurface::SetBasisSurface (const Handle(Geom_Surface)& S,
|
||||
const Standard_Boolean isNotCheckC0)
|
||||
{
|
||||
Standard_Real 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;
|
||||
|
||||
while(aCheckingSurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)) ||
|
||||
@@ -429,7 +424,7 @@ Standard_Real Geom_OffsetSurface::VReversedParameter( const Standard_Real V) con
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Surface) Geom_OffsetSurface::BasisSurface () const
|
||||
Handle(Geom_Surface) Geom_OffsetSurface::BasisSurface () const
|
||||
{
|
||||
return basisSurf;
|
||||
}
|
||||
@@ -1280,7 +1275,8 @@ Handle(Geom_Curve) Geom_OffsetSurface::UIso (const Standard_Real UU) const
|
||||
GeomAbs_Shape Cont = GeomAbs_C1;
|
||||
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,
|
||||
V1, V2, Cont,
|
||||
MaxDeg,MaxSeg, ev);
|
||||
@@ -1347,7 +1343,8 @@ Handle(Geom_Curve) Geom_OffsetSurface::VIso (const Standard_Real VV) const
|
||||
GeomAbs_Shape Cont = GeomAbs_C1;
|
||||
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,
|
||||
U1, U2, Cont, MaxDeg, MaxSeg, ev);
|
||||
|
||||
@@ -1447,13 +1444,13 @@ Standard_Real Geom_OffsetSurface::VPeriod() const
|
||||
Standard_Boolean Geom_OffsetSurface::IsUClosed () const {
|
||||
|
||||
Standard_Boolean UClosed;
|
||||
Handle(Surface) SBasis = BasisSurface();
|
||||
Handle(Geom_Surface) SBasis = BasisSurface();
|
||||
|
||||
if (SBasis->IsKind (STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
|
||||
Handle(Geom_RectangularTrimmedSurface) St =
|
||||
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))) {
|
||||
UClosed = SBasis->IsUClosed();
|
||||
}
|
||||
@@ -1461,7 +1458,7 @@ Standard_Boolean Geom_OffsetSurface::IsUClosed () const {
|
||||
Handle(Geom_SurfaceOfLinearExtrusion) Extru =
|
||||
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))) {
|
||||
UClosed = SBasis->IsUClosed();
|
||||
}
|
||||
@@ -1480,7 +1477,7 @@ Standard_Boolean Geom_OffsetSurface::IsUClosed () const {
|
||||
Handle(Geom_SurfaceOfLinearExtrusion) Extru =
|
||||
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)));
|
||||
}
|
||||
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 VClosed;
|
||||
Handle(Surface) SBasis = BasisSurface();
|
||||
Handle(Geom_Surface) SBasis = BasisSurface();
|
||||
|
||||
if (SBasis->IsKind (STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
|
||||
Handle(Geom_RectangularTrimmedSurface) St =
|
||||
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))) {
|
||||
VClosed = SBasis->IsVClosed();
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <Standard_RangeError.hxx>
|
||||
|
||||
typedef Geom_Parabola Parabola;
|
||||
typedef Handle(Geom_Parabola) Handle(Parabola);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
@@ -31,11 +30,6 @@ typedef gp_Trsf Trsf;
|
||||
typedef gp_Vec Vec;
|
||||
typedef gp_XYZ XYZ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -43,7 +37,7 @@ typedef gp_XYZ XYZ;
|
||||
|
||||
Handle(Geom_Geometry) Geom_Parabola::Copy() const {
|
||||
|
||||
Handle(Parabola) Prb;
|
||||
Handle(Geom_Parabola) Prb;
|
||||
Prb = new Parabola (pos, focalLength);
|
||||
return Prb;
|
||||
}
|
||||
|
@@ -28,9 +28,6 @@
|
||||
#include <GeomAbs_UVSense.hxx>
|
||||
|
||||
typedef Geom_Plane Plane;
|
||||
typedef Handle(Geom_Plane) Handle(Plane);
|
||||
typedef Handle(Geom_Line) Handle(Line);
|
||||
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Ax3 Ax3;
|
||||
@@ -42,8 +39,6 @@ typedef gp_Trsf Trsf;
|
||||
typedef gp_Vec Vec;
|
||||
typedef gp_XYZ XYZ;
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -51,7 +46,7 @@ typedef gp_XYZ XYZ;
|
||||
|
||||
Handle(Geom_Geometry) Geom_Plane::Copy () const {
|
||||
|
||||
Handle(Plane) Pl = new Plane ( pos);
|
||||
Handle(Geom_Plane) Pl = new Plane ( pos);
|
||||
return Pl;
|
||||
}
|
||||
|
||||
|
@@ -16,12 +16,9 @@
|
||||
|
||||
#include <Geom_Point.ixx>
|
||||
|
||||
|
||||
typedef Handle(Geom_Point) Handle(Point);
|
||||
typedef Geom_Point Point;
|
||||
|
||||
|
||||
Standard_Real Geom_Point::Distance (const Handle(Point)& Other) const {
|
||||
Standard_Real Geom_Point::Distance (const Handle(Geom_Point)& Other) const {
|
||||
|
||||
gp_Pnt P1 = this->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 P2 = Other->Pnt ();
|
||||
|
@@ -42,21 +42,13 @@
|
||||
#include <Precision.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
|
||||
typedef Handle(Geom_Surface) Handle(Surface);
|
||||
typedef Handle(Geom_Geometry) Handle(Geometry);
|
||||
typedef Geom_RectangularTrimmedSurface RectangularTrimmedSurface;
|
||||
typedef Handle(Geom_RectangularTrimmedSurface) Handle(RectangularTrimmedSurface);
|
||||
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Trsf Trsf;
|
||||
typedef gp_Vec Vec;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -64,7 +56,7 @@ typedef gp_Vec Vec;
|
||||
|
||||
Handle(Geom_Geometry) Geom_RectangularTrimmedSurface::Copy () const {
|
||||
|
||||
Handle(RectangularTrimmedSurface) S;
|
||||
Handle(Geom_RectangularTrimmedSurface) S;
|
||||
|
||||
if ( isutrimmed && isvtrimmed )
|
||||
S = new RectangularTrimmedSurface (basisSurf,
|
||||
@@ -91,7 +83,7 @@ Handle(Geom_Geometry) Geom_RectangularTrimmedSurface::Copy () const {
|
||||
|
||||
Geom_RectangularTrimmedSurface::Geom_RectangularTrimmedSurface (
|
||||
|
||||
const Handle(Surface)& S,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V1,
|
||||
@@ -111,9 +103,9 @@ const Standard_Boolean VSense)
|
||||
Handle(Geom_RectangularTrimmedSurface) T =
|
||||
Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
|
||||
if (!T.IsNull())
|
||||
basisSurf = Handle(Surface)::DownCast(T->BasisSurface()->Copy());
|
||||
basisSurf = Handle(Geom_Surface)::DownCast(T->BasisSurface()->Copy());
|
||||
else
|
||||
basisSurf = Handle(Surface)::DownCast(S->Copy());
|
||||
basisSurf = Handle(Geom_Surface)::DownCast(S->Copy());
|
||||
|
||||
Handle(Geom_OffsetSurface) O =
|
||||
Handle(Geom_OffsetSurface)::DownCast(basisSurf);
|
||||
@@ -122,7 +114,7 @@ const Standard_Boolean VSense)
|
||||
Handle(Geom_RectangularTrimmedSurface) S2 =
|
||||
new Geom_RectangularTrimmedSurface( O->BasisSurface(),U1,U2, V1, V2, USense, VSense);
|
||||
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);
|
||||
@@ -147,9 +139,9 @@ Geom_RectangularTrimmedSurface::Geom_RectangularTrimmedSurface (
|
||||
Handle(Geom_RectangularTrimmedSurface) T =
|
||||
Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
|
||||
if (!T.IsNull())
|
||||
basisSurf = Handle(Surface)::DownCast(T->BasisSurface()->Copy());
|
||||
basisSurf = Handle(Geom_Surface)::DownCast(T->BasisSurface()->Copy());
|
||||
else
|
||||
basisSurf = Handle(Surface)::DownCast(S->Copy());
|
||||
basisSurf = Handle(Geom_Surface)::DownCast(S->Copy());
|
||||
|
||||
Handle(Geom_OffsetSurface) O =
|
||||
Handle(Geom_OffsetSurface)::DownCast(basisSurf);
|
||||
@@ -158,7 +150,7 @@ Geom_RectangularTrimmedSurface::Geom_RectangularTrimmedSurface (
|
||||
Handle(Geom_RectangularTrimmedSurface) S2 =
|
||||
new Geom_RectangularTrimmedSurface( O->BasisSurface(),Param1,Param2, UTrim, Sense);
|
||||
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);
|
||||
@@ -380,7 +372,7 @@ Standard_Real Geom_RectangularTrimmedSurface::VReversedParameter( const Standard
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Surface) Geom_RectangularTrimmedSurface::BasisSurface () const
|
||||
Handle(Geom_Surface) Geom_RectangularTrimmedSurface::BasisSurface () const
|
||||
{
|
||||
return basisSurf;
|
||||
}
|
||||
|
@@ -26,9 +26,6 @@
|
||||
|
||||
typedef Geom_Circle Circle;
|
||||
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_Ax3 Ax3;
|
||||
typedef gp_Circ Circ;
|
||||
@@ -38,9 +35,6 @@ typedef gp_Trsf Trsf;
|
||||
typedef gp_XYZ XYZ;
|
||||
typedef gp_Vec Vec;
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Copy
|
||||
//purpose :
|
||||
@@ -48,7 +42,7 @@ typedef gp_Vec Vec;
|
||||
|
||||
Handle(Geom_Geometry) Geom_SphericalSurface::Copy () const {
|
||||
|
||||
Handle(SphericalSurface) Cs;
|
||||
Handle(Geom_SphericalSurface) Cs;
|
||||
Cs = new SphericalSurface (pos, radius);
|
||||
return Cs;
|
||||
}
|
||||
@@ -313,7 +307,7 @@ gp_Sphere Geom_SphericalSurface::Sphere () const {
|
||||
//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_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 :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Curve) Geom_SphericalSurface::VIso (const Standard_Real V) const
|
||||
Handle(Geom_Curve) Geom_SphericalSurface::VIso (const Standard_Real V) const
|
||||
{
|
||||
Handle(Geom_Circle)
|
||||
GC = new Geom_Circle(ElSLib::SphereVIso(pos,radius,V));
|
||||
|
@@ -17,17 +17,15 @@
|
||||
#include <Geom_Surface.ixx>
|
||||
|
||||
typedef Geom_Surface Surface;
|
||||
typedef Handle(Geom_Surface) Handle(Surface);
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : UReversed
|
||||
//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();
|
||||
return S;
|
||||
}
|
||||
@@ -38,9 +36,9 @@ Handle(Surface) Geom_Surface::UReversed () const
|
||||
//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();
|
||||
return S;
|
||||
}
|
||||
|
@@ -44,9 +44,7 @@
|
||||
#define FMULTS (BSplCLib::NoMults())
|
||||
|
||||
typedef Geom_SurfaceOfLinearExtrusion SurfaceOfLinearExtrusion;
|
||||
typedef Handle(Geom_SurfaceOfLinearExtrusion) Handle(SurfaceOfLinearExtrusion);
|
||||
typedef Geom_Curve Curve;
|
||||
typedef Handle(Geom_Curve) Handle(Curve);
|
||||
typedef gp_Dir Dir;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Trsf Trsf;
|
||||
@@ -131,10 +129,10 @@ Handle(Geom_Geometry) Geom_SurfaceOfLinearExtrusion::Copy () const
|
||||
//=======================================================================
|
||||
|
||||
Geom_SurfaceOfLinearExtrusion::Geom_SurfaceOfLinearExtrusion
|
||||
( const Handle(Curve)& C,
|
||||
( const Handle(Geom_Curve)& C,
|
||||
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;
|
||||
smooth = C->Continuity();
|
||||
}
|
||||
@@ -202,10 +200,10 @@ void Geom_SurfaceOfLinearExtrusion::SetDirection (const Dir& V) {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_SurfaceOfLinearExtrusion::SetBasisCurve (const Handle(Curve)& C) {
|
||||
void Geom_SurfaceOfLinearExtrusion::SetBasisCurve (const Handle(Geom_Curve)& C) {
|
||||
|
||||
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 :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Curve) Geom_SurfaceOfLinearExtrusion::VIso (const Standard_Real V) const {
|
||||
Handle(Geom_Curve) Geom_SurfaceOfLinearExtrusion::VIso (const Standard_Real V) const {
|
||||
|
||||
Vec Vdir (direction);
|
||||
Vdir.Multiply (V);
|
||||
Handle(Curve) C;
|
||||
Handle(Geom_Curve) C;
|
||||
C = Handle(Geom_Curve)::DownCast(basisCurve->Translated(Vdir));
|
||||
return C;
|
||||
}
|
||||
|
@@ -38,10 +38,7 @@
|
||||
#define FMULTS (BSplCLib::NoMults())
|
||||
|
||||
typedef Geom_SurfaceOfRevolution SurfaceOfRevolution;
|
||||
typedef Handle(Geom_SurfaceOfRevolution) Handle(SurfaceOfRevolution);
|
||||
typedef Handle(Geom_Geometry) Handle(Geometry);
|
||||
typedef Geom_Curve Curve;
|
||||
typedef Handle(Geom_Curve) Handle(Curve);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Dir Dir;
|
||||
@@ -50,6 +47,7 @@ typedef gp_Pnt Pnt;
|
||||
typedef gp_Trsf Trsf;
|
||||
typedef gp_Vec Vec;
|
||||
typedef gp_XYZ XYZ;
|
||||
|
||||
//=======================================================================
|
||||
//function : LocateSide
|
||||
//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
|
||||
(const Handle(Curve)& C ,
|
||||
(const Handle(Geom_Curve)& C ,
|
||||
const Ax1& A1 ) : loc (A1.Location()) {
|
||||
|
||||
basisCurve = Handle(Curve)::DownCast(C->Copy());
|
||||
basisCurve = Handle(Geom_Curve)::DownCast(C->Copy());
|
||||
direction = A1.Direction();
|
||||
smooth = C->Continuity();
|
||||
}
|
||||
@@ -300,9 +298,9 @@ void Geom_SurfaceOfRevolution::SetDirection (const Dir& V) {
|
||||
//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();
|
||||
}
|
||||
|
||||
@@ -1111,9 +1109,9 @@ Ax2 Geom_SurfaceOfRevolution::ReferencePlane() const {
|
||||
//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);
|
||||
C->Rotate (RotAxis, U);
|
||||
return C;
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <Standard_RangeError.hxx>
|
||||
|
||||
typedef Geom_ToroidalSurface ToroidalSurface;
|
||||
typedef Handle(Geom_ToroidalSurface) Handle(ToroidalSurface);
|
||||
typedef TColStd_Array1OfReal Array1OfReal;
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
@@ -49,7 +48,7 @@ typedef gp_XYZ XYZ;
|
||||
|
||||
Handle(Geom_Geometry) Geom_ToroidalSurface::Copy () const {
|
||||
|
||||
Handle(ToroidalSurface) Cs;
|
||||
Handle(Geom_ToroidalSurface) Cs;
|
||||
Cs = new ToroidalSurface (pos, majorRadius, minorRadius);
|
||||
return Cs;
|
||||
}
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <Geom_Transformation.ixx>
|
||||
|
||||
typedef Handle(Geom_Transformation) Handle(Transformation);
|
||||
typedef Geom_Transformation Transformation;
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
@@ -25,9 +24,6 @@ typedef gp_Pnt Pnt;
|
||||
typedef gp_TrsfForm TrsfForm;
|
||||
typedef gp_Vec Vec;
|
||||
|
||||
|
||||
|
||||
|
||||
Geom_Transformation::Geom_Transformation () { }
|
||||
|
||||
|
||||
@@ -37,7 +33,7 @@ Geom_Transformation::Geom_Transformation (const gp_Trsf& T)
|
||||
|
||||
Handle(Geom_Transformation) Geom_Transformation::Copy() const {
|
||||
|
||||
Handle(Transformation) T;
|
||||
Handle(Geom_Transformation) T;
|
||||
T = new Transformation (gpTrsf);
|
||||
return T;
|
||||
}
|
||||
@@ -104,13 +100,13 @@ Standard_Real Geom_Transformation::Value (const Standard_Integer Row, const Stan
|
||||
void Geom_Transformation::Invert () { gpTrsf.Invert(); }
|
||||
|
||||
|
||||
Handle(Transformation) Geom_Transformation::Inverted () const {
|
||||
Handle(Geom_Transformation) Geom_Transformation::Inverted () const {
|
||||
|
||||
return new Transformation (gpTrsf.Inverted());
|
||||
}
|
||||
|
||||
|
||||
Handle(Transformation) Geom_Transformation::Multiplied (
|
||||
Handle(Geom_Transformation) Geom_Transformation::Multiplied (
|
||||
const Handle(Geom_Transformation)& Other) const {
|
||||
|
||||
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); }
|
||||
|
||||
|
||||
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;
|
||||
T.Power (N);
|
||||
|
@@ -31,11 +31,7 @@
|
||||
#include <Precision.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
|
||||
|
||||
typedef Handle(Geom_TrimmedCurve) Handle(TrimmedCurve);
|
||||
typedef Geom_TrimmedCurve TrimmedCurve;
|
||||
typedef Handle(Geom_Curve) Handle(Curve);
|
||||
typedef Handle(Geom_Geometry) Handle(Geometry);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
@@ -49,7 +45,7 @@ typedef gp_Vec Vec;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -70,9 +66,9 @@ Geom_TrimmedCurve::Geom_TrimmedCurve (const Handle(Geom_Curve)& C,
|
||||
// kill trimmed basis curves
|
||||
Handle(Geom_TrimmedCurve) T = Handle(Geom_TrimmedCurve)::DownCast(C);
|
||||
if (!T.IsNull())
|
||||
basisCurve = Handle(Curve)::DownCast(T->BasisCurve()->Copy());
|
||||
basisCurve = Handle(Geom_Curve)::DownCast(T->BasisCurve()->Copy());
|
||||
else
|
||||
basisCurve = Handle(Curve)::DownCast(C->Copy());
|
||||
basisCurve = Handle(Geom_Curve)::DownCast(C->Copy());
|
||||
|
||||
SetTrim(U1, U2, Sense, theAdjustPeriodic);
|
||||
}
|
||||
@@ -207,7 +203,7 @@ GeomAbs_Shape Geom_TrimmedCurve::Continuity () const {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Curve) Geom_TrimmedCurve::BasisCurve () const {
|
||||
Handle(Geom_Curve) Geom_TrimmedCurve::BasisCurve () const {
|
||||
|
||||
return basisCurve;
|
||||
}
|
||||
|
@@ -17,15 +17,11 @@
|
||||
#include <Geom_Vector.ixx>
|
||||
|
||||
typedef Geom_Vector Vector;
|
||||
typedef Handle(Geom_Vector) Handle(Vector);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Trsf Trsf;
|
||||
|
||||
|
||||
|
||||
|
||||
void Geom_Vector::Reverse () { gpVec.Reverse(); }
|
||||
|
||||
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; }
|
||||
|
||||
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();
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
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());
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
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());
|
||||
}
|
||||
|
@@ -17,18 +17,12 @@
|
||||
#include <Geom_VectorWithMagnitude.ixx>
|
||||
|
||||
typedef Geom_VectorWithMagnitude VectorWithMagnitude;
|
||||
typedef Handle(Geom_VectorWithMagnitude) Handle(VectorWithMagnitude);
|
||||
typedef Geom_Vector Vector;
|
||||
typedef Handle(Geom_Vector) Handle(Vector);
|
||||
typedef Handle(Geom_Geometry) Handle(Geometry);
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Trsf Trsf;
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Geom_VectorWithMagnitude
|
||||
//purpose :
|
||||
@@ -63,7 +57,7 @@ const Pnt& P1, const Pnt& P2) { gpVec = gp_Vec (P1, P2); }
|
||||
|
||||
Handle(Geom_Geometry) Geom_VectorWithMagnitude::Copy() const {
|
||||
|
||||
Handle(VectorWithMagnitude) V;
|
||||
Handle(Geom_VectorWithMagnitude) V;
|
||||
V = new VectorWithMagnitude (gpVec);
|
||||
return V;
|
||||
}
|
||||
@@ -128,7 +122,7 @@ Standard_Real Geom_VectorWithMagnitude::SquareMagnitude () const {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_VectorWithMagnitude::Add (const Handle(Vector)& Other) {
|
||||
void Geom_VectorWithMagnitude::Add (const Handle(Geom_Vector)& Other) {
|
||||
|
||||
gpVec.Add (Other->Vec());
|
||||
}
|
||||
@@ -139,8 +133,8 @@ void Geom_VectorWithMagnitude::Add (const Handle(Vector)& Other) {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Added (
|
||||
const Handle(Vector)& Other) const {
|
||||
Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Added (
|
||||
const Handle(Geom_Vector)& Other) const {
|
||||
|
||||
gp_Vec V1 = gpVec;
|
||||
V1.Add (Other->Vec());
|
||||
@@ -153,7 +147,7 @@ const Handle(Vector)& Other) const {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_VectorWithMagnitude::Cross (const Handle(Vector)& Other) {
|
||||
void Geom_VectorWithMagnitude::Cross (const Handle(Geom_Vector)& Other) {
|
||||
|
||||
gpVec.Cross (Other->Vec());
|
||||
}
|
||||
@@ -165,8 +159,8 @@ void Geom_VectorWithMagnitude::Cross (const Handle(Vector)& Other) {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Vector) Geom_VectorWithMagnitude::Crossed (
|
||||
const Handle(Vector)& Other) const {
|
||||
Handle(Geom_Vector) Geom_VectorWithMagnitude::Crossed (
|
||||
const Handle(Geom_Vector)& Other) const {
|
||||
|
||||
gp_Vec V (gpVec);
|
||||
V.Cross (Other->Vec());
|
||||
@@ -180,7 +174,7 @@ const Handle(Vector)& Other) const {
|
||||
//=======================================================================
|
||||
|
||||
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());
|
||||
}
|
||||
@@ -191,8 +185,8 @@ const Handle(Vector)& V1, const Handle(Vector)& V2) {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Vector) Geom_VectorWithMagnitude::CrossCrossed (
|
||||
const Handle(Vector)& V1, const Handle(Vector)& V2) const {
|
||||
Handle(Geom_Vector) Geom_VectorWithMagnitude::CrossCrossed (
|
||||
const Handle(Geom_Vector)& V1, const Handle(Geom_Vector)& V2) const {
|
||||
|
||||
gp_Vec V (gpVec);
|
||||
V.CrossCross (V1->Vec(), V2->Vec());
|
||||
@@ -216,7 +210,7 @@ void Geom_VectorWithMagnitude::Divide (const Standard_Real Scalar) {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Divided (
|
||||
Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Divided (
|
||||
const Standard_Real Scalar) const {
|
||||
|
||||
gp_Vec V (gpVec);
|
||||
@@ -230,7 +224,7 @@ const Standard_Real Scalar) const {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Multiplied (
|
||||
Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Multiplied (
|
||||
const Standard_Real Scalar) const {
|
||||
|
||||
gp_Vec V (gpVec);
|
||||
@@ -263,7 +257,7 @@ void Geom_VectorWithMagnitude::Normalize () { gpVec.Normalize (); }
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Normalized () const {
|
||||
Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Normalized () const {
|
||||
|
||||
gp_Vec V (gpVec);
|
||||
V.Normalize ();
|
||||
@@ -276,7 +270,7 @@ Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Normalized () const {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_VectorWithMagnitude::Subtract (const Handle(Vector)& Other) {
|
||||
void Geom_VectorWithMagnitude::Subtract (const Handle(Geom_Vector)& Other) {
|
||||
|
||||
gpVec.Subtract (Other->Vec());
|
||||
}
|
||||
@@ -287,8 +281,8 @@ void Geom_VectorWithMagnitude::Subtract (const Handle(Vector)& Other) {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(VectorWithMagnitude) Geom_VectorWithMagnitude::Subtracted (
|
||||
const Handle(Vector)& Other) const {
|
||||
Handle(Geom_VectorWithMagnitude) Geom_VectorWithMagnitude::Subtracted (
|
||||
const Handle(Geom_Vector)& Other) const {
|
||||
|
||||
gp_Vec V (gpVec);
|
||||
V.Subtract (Other->Vec());
|
||||
|
Reference in New Issue
Block a user