mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0031034: Visualization - stack-use-after-scope reported by Clang address sanitizer in AIS_FixRelation::Compute()
Methods of classes Geom_ElementarySurface, Geom_Conic, and Geom2d_Conic setting or returning values of fields are made inline and return const& to avoid copying
This commit is contained in:
parent
0deeff45a0
commit
2724a0b3cc
@ -14,50 +14,58 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <Geom_Conic.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_RangeError.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Geom_Conic,Geom_Curve)
|
||||
|
||||
typedef Geom_Conic Conic;
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Vec Vec;
|
||||
|
||||
|
||||
|
||||
void Geom_Conic::Reverse () {
|
||||
//=======================================================================
|
||||
//function : UReverse
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_Conic::Reverse ()
|
||||
{
|
||||
gp_Dir Vz = pos.Direction ();
|
||||
Vz.Reverse();
|
||||
pos.SetDirection (Vz);
|
||||
}
|
||||
|
||||
void Geom_Conic::SetAxis (const Ax1& A1) { pos.SetAxis (A1); }
|
||||
//=======================================================================
|
||||
//function : UReverse
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_Conic::SetLocation (const Pnt& O) { pos.SetLocation (O); }
|
||||
GeomAbs_Shape Geom_Conic::Continuity () const
|
||||
{
|
||||
return GeomAbs_CN;
|
||||
}
|
||||
|
||||
void Geom_Conic::SetPosition (const Ax2& A2) { pos = A2; }
|
||||
//=======================================================================
|
||||
//function : UReverse
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Ax1 Geom_Conic::Axis () const { return pos.Axis(); }
|
||||
gp_Ax1 Geom_Conic::XAxis () const
|
||||
{
|
||||
return gp_Ax1 (pos.Location(), pos.XDirection());
|
||||
}
|
||||
|
||||
GeomAbs_Shape Geom_Conic::Continuity () const { return GeomAbs_CN; }
|
||||
//=======================================================================
|
||||
//function : UReverse
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Pnt Geom_Conic::Location () const { return pos.Location(); }
|
||||
gp_Ax1 Geom_Conic::YAxis () const
|
||||
{
|
||||
return gp_Ax1 (pos.Location(), pos.YDirection());
|
||||
}
|
||||
|
||||
const gp_Ax2& Geom_Conic::Position () const { return pos; }
|
||||
|
||||
Ax1 Geom_Conic::XAxis () const {return Ax1(pos.Location(), pos.XDirection());}
|
||||
|
||||
Ax1 Geom_Conic::YAxis () const {return Ax1(pos.Location(), pos.YDirection());}
|
||||
|
||||
Standard_Boolean Geom_Conic::IsCN (const Standard_Integer ) const { return Standard_True; }
|
||||
//=======================================================================
|
||||
//function : UReverse
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Geom_Conic::IsCN (const Standard_Integer ) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
|
@ -17,22 +17,8 @@
|
||||
#ifndef _Geom_Conic_HeaderFile
|
||||
#define _Geom_Conic_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_ConstructionError;
|
||||
class Standard_RangeError;
|
||||
class Standard_DomainError;
|
||||
class gp_Ax1;
|
||||
class gp_Pnt;
|
||||
class gp_Ax2;
|
||||
|
||||
|
||||
class Geom_Conic;
|
||||
DEFINE_STANDARD_HANDLE(Geom_Conic, Geom_Curve)
|
||||
@ -62,27 +48,36 @@ DEFINE_STANDARD_HANDLE(Geom_Conic, Geom_Curve)
|
||||
//! also defines the origin of the parameter of the conic.
|
||||
class Geom_Conic : public Geom_Curve
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Changes the orientation of the conic's plane. The normal
|
||||
//! axis to the plane is A1. The XAxis and the YAxis are recomputed.
|
||||
//!
|
||||
//! raised if the A1 is parallel to the XAxis of the conic.
|
||||
Standard_EXPORT void SetAxis (const gp_Ax1& A1);
|
||||
void SetAxis (const gp_Ax1& theA1) { pos.SetAxis(theA1); }
|
||||
|
||||
//! changes the location point of the conic.
|
||||
Standard_EXPORT void SetLocation (const gp_Pnt& P);
|
||||
void SetLocation (const gp_Pnt& theP) { pos.SetLocation(theP); }
|
||||
|
||||
//! changes the local coordinate system of the conic.
|
||||
Standard_EXPORT void SetPosition (const gp_Ax2& A2);
|
||||
void SetPosition (const gp_Ax2& theA2) { pos = theA2; }
|
||||
|
||||
//! Returns the "main Axis" of this conic. This axis is
|
||||
//! normal to the plane of the conic.
|
||||
Standard_EXPORT gp_Ax1 Axis() const;
|
||||
|
||||
const gp_Ax1& Axis() const { return pos.Axis(); }
|
||||
|
||||
//! Returns the location point of the conic.
|
||||
//! For the circle, the ellipse and the hyperbola it is the center of
|
||||
//! the conic. For the parabola it is the Apex of the parabola.
|
||||
const gp_Pnt& Location() const { return pos.Location(); }
|
||||
|
||||
//! Returns the local coordinates system of the conic.
|
||||
//! The main direction of the Axis2Placement is normal to the
|
||||
//! plane of the conic. The X direction of the Axis2placement
|
||||
//! is in the plane of the conic and corresponds to the origin
|
||||
//! for the conic's parametric value u.
|
||||
const gp_Ax2& Position() const { return pos; }
|
||||
|
||||
//! Returns the eccentricity value of the conic e.
|
||||
//! e = 0 for a circle
|
||||
//! 0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius)
|
||||
@ -91,22 +86,7 @@ public:
|
||||
//! Exceptions
|
||||
//! Standard_DomainError in the case of a hyperbola if
|
||||
//! its major radius is null.
|
||||
Standard_EXPORT virtual Standard_Real Eccentricity() const = 0;
|
||||
|
||||
|
||||
//! Returns the location point of the conic.
|
||||
//! For the circle, the ellipse and the hyperbola it is the center of
|
||||
//! the conic. For the parabola it is the Apex of the parabola.
|
||||
Standard_EXPORT gp_Pnt Location() const;
|
||||
|
||||
|
||||
//! Returns the local coordinates system of the conic.
|
||||
//! The main direction of the Axis2Placement is normal to the
|
||||
//! plane of the conic. The X direction of the Axis2placement
|
||||
//! is in the plane of the conic and corresponds to the origin
|
||||
//! for the conic's parametric value u.
|
||||
Standard_EXPORT const gp_Ax2& Position() const;
|
||||
|
||||
virtual Standard_Real Eccentricity() const = 0;
|
||||
|
||||
//! Returns the XAxis of the conic.
|
||||
//! This axis defines the origin of parametrization of the conic.
|
||||
@ -136,28 +116,10 @@ public:
|
||||
//! Raised if N < 0.
|
||||
Standard_EXPORT Standard_Boolean IsCN (const Standard_Integer N) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(Geom_Conic,Geom_Curve)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
gp_Ax2 pos;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Geom_Conic_HeaderFile
|
||||
|
@ -14,31 +14,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <Geom_ElementarySurface.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Ax3.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Geom_ElementarySurface,Geom_Surface)
|
||||
|
||||
typedef Geom_ElementarySurface ElementarySurface;
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Ax3 Ax3;
|
||||
typedef gp_Dir Dir;
|
||||
typedef gp_Pnt Pnt;
|
||||
typedef gp_Vec Vec;
|
||||
|
||||
//=======================================================================
|
||||
//function : Continuity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
GeomAbs_Shape Geom_ElementarySurface::Continuity () const {
|
||||
|
||||
GeomAbs_Shape Geom_ElementarySurface::Continuity () const
|
||||
{
|
||||
return GeomAbs_CN;
|
||||
}
|
||||
|
||||
@ -47,8 +33,8 @@ GeomAbs_Shape Geom_ElementarySurface::Continuity () const {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Geom_ElementarySurface::IsCNu (const Standard_Integer ) const {
|
||||
|
||||
Standard_Boolean Geom_ElementarySurface::IsCNu (const Standard_Integer ) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
@ -57,92 +43,27 @@ Standard_Boolean Geom_ElementarySurface::IsCNu (const Standard_Integer ) const {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Geom_ElementarySurface::IsCNv (const Standard_Integer ) const {
|
||||
|
||||
Standard_Boolean Geom_ElementarySurface::IsCNv (const Standard_Integer ) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Axis
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Ax1 Geom_ElementarySurface::Axis () const {
|
||||
|
||||
return pos.Axis();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetAxis
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_ElementarySurface::SetAxis (const Ax1& A1) {
|
||||
|
||||
pos.SetAxis (A1);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Location
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Pnt Geom_ElementarySurface::Location () const {
|
||||
|
||||
return pos.Location();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Position
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
const gp_Ax3& Geom_ElementarySurface::Position () const {
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPosition
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_ElementarySurface::SetPosition (const Ax3& A3) {
|
||||
|
||||
pos = A3;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetLocation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_ElementarySurface::SetLocation (const Pnt& Loc) {
|
||||
|
||||
pos.SetLocation (Loc);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : UReverse
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_ElementarySurface::UReverse () {
|
||||
|
||||
void Geom_ElementarySurface::UReverse ()
|
||||
{
|
||||
pos.YReverse();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : VReverse
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_ElementarySurface::VReverse () {
|
||||
|
||||
void Geom_ElementarySurface::VReverse ()
|
||||
{
|
||||
pos.ZReverse();
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,20 +17,8 @@
|
||||
#ifndef _Geom_ElementarySurface_HeaderFile
|
||||
#define _Geom_ElementarySurface_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <gp_Ax3.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_ConstructionError;
|
||||
class gp_Ax1;
|
||||
class gp_Pnt;
|
||||
class gp_Ax3;
|
||||
|
||||
|
||||
class Geom_ElementarySurface;
|
||||
DEFINE_STANDARD_HANDLE(Geom_ElementarySurface, Geom_Surface)
|
||||
@ -74,38 +62,30 @@ DEFINE_STANDARD_HANDLE(Geom_ElementarySurface, Geom_Surface)
|
||||
//! "main Direction" = - "X Direction" ^ "Y Direction"
|
||||
class Geom_ElementarySurface : public Geom_Surface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
//! Changes the main axis (ZAxis) of the elementary surface.
|
||||
//!
|
||||
//! Raised if the direction of A1 is parallel to the XAxis of the
|
||||
//! coordinate system of the surface.
|
||||
Standard_EXPORT void SetAxis (const gp_Ax1& A1);
|
||||
|
||||
void SetAxis (const gp_Ax1& theA1) { pos.SetAxis(theA1); }
|
||||
|
||||
//! Changes the location of the local coordinates system of the
|
||||
//! surface.
|
||||
Standard_EXPORT void SetLocation (const gp_Pnt& Loc);
|
||||
|
||||
void SetLocation (const gp_Pnt& theLoc) { pos.SetLocation(theLoc); }
|
||||
|
||||
//! Changes the local coordinates system of the surface.
|
||||
Standard_EXPORT void SetPosition (const gp_Ax3& A3);
|
||||
void SetPosition (const gp_Ax3& theAx3) { pos = theAx3; }
|
||||
|
||||
|
||||
//! Returns the main axis of the surface (ZAxis).
|
||||
Standard_EXPORT gp_Ax1 Axis() const;
|
||||
|
||||
const gp_Ax1& Axis() const { return pos.Axis(); }
|
||||
|
||||
//! Returns the location point of the local coordinate system of the
|
||||
//! surface.
|
||||
Standard_EXPORT gp_Pnt Location() const;
|
||||
const gp_Pnt& Location() const { return pos.Location(); }
|
||||
|
||||
//! Returns the local coordinates system of the surface.
|
||||
Standard_EXPORT const gp_Ax3& Position() const;
|
||||
|
||||
const gp_Ax3& Position() const { return pos; }
|
||||
|
||||
//! Reverses the U parametric direction of the surface.
|
||||
Standard_EXPORT virtual void UReverse() Standard_OVERRIDE;
|
||||
@ -116,8 +96,7 @@ public:
|
||||
//! me->UReversed()->Value(me->UReversedParameter(U),V)
|
||||
//! is the same point as
|
||||
//! me->Value(U,V)
|
||||
Standard_EXPORT virtual Standard_Real UReversedParameter (const Standard_Real U) const Standard_OVERRIDE = 0;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real UReversedParameter (const Standard_Real U) const Standard_OVERRIDE = 0;
|
||||
|
||||
//! Reverses the V parametric direction of the surface.
|
||||
Standard_EXPORT virtual void VReverse() Standard_OVERRIDE;
|
||||
@ -139,28 +118,10 @@ public:
|
||||
//! Returns True.
|
||||
Standard_EXPORT Standard_Boolean IsCNv (const Standard_Integer N) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(Geom_ElementarySurface,Geom_Surface)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
gp_Ax3 pos;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Geom_ElementarySurface_HeaderFile
|
||||
|
@ -17,24 +17,13 @@
|
||||
#ifndef _Geom_Surface_HeaderFile
|
||||
#define _Geom_Surface_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_RangeError;
|
||||
class Standard_NoSuchObject;
|
||||
class Geom_UndefinedDerivative;
|
||||
class Geom_UndefinedValue;
|
||||
|
||||
class gp_Trsf;
|
||||
class gp_GTrsf2d;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
|
||||
|
||||
class Geom_Surface;
|
||||
DEFINE_STANDARD_HANDLE(Geom_Surface, Geom_Geometry)
|
||||
|
||||
|
@ -14,71 +14,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <Geom2d_Conic.hxx>
|
||||
#include <gp_Ax2d.hxx>
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <gp_Dir2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Geom2d_Conic,Geom2d_Curve)
|
||||
|
||||
typedef Geom2d_Conic Conic;
|
||||
|
||||
typedef gp_Ax2d Ax2d;
|
||||
typedef gp_Dir2d Dir2d;
|
||||
typedef gp_Pnt2d Pnt2d;
|
||||
typedef gp_Vec2d Vec2d;
|
||||
|
||||
//=======================================================================
|
||||
//function : SetAxis
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom2d_Conic::SetAxis(const gp_Ax22d& A)
|
||||
{
|
||||
pos.SetAxis(A);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetXAxis
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom2d_Conic::SetXAxis (const Ax2d& A)
|
||||
{
|
||||
pos.SetXAxis(A);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetYAxis
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom2d_Conic::SetYAxis (const Ax2d& A)
|
||||
{
|
||||
pos.SetYAxis(A);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetLocation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom2d_Conic::SetLocation (const Pnt2d& P)
|
||||
{
|
||||
pos.SetLocation (P);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : XAxis
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Ax2d Geom2d_Conic::XAxis () const
|
||||
gp_Ax2d Geom2d_Conic::XAxis () const
|
||||
{
|
||||
return gp_Ax2d(pos.Location(), pos.XDirection());
|
||||
}
|
||||
@ -88,40 +33,19 @@ Ax2d Geom2d_Conic::XAxis () const
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Ax2d Geom2d_Conic::YAxis () const
|
||||
gp_Ax2d Geom2d_Conic::YAxis () const
|
||||
{
|
||||
return gp_Ax2d(pos.Location(), pos.YDirection());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Location
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Pnt2d Geom2d_Conic::Location () const
|
||||
{
|
||||
return pos.Location();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Position
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
const gp_Ax22d& Geom2d_Conic::Position () const
|
||||
{
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Reverse
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom2d_Conic::Reverse () {
|
||||
|
||||
Dir2d Temp = pos.YDirection ();
|
||||
void Geom2d_Conic::Reverse ()
|
||||
{
|
||||
gp_Dir2d Temp = pos.YDirection ();
|
||||
Temp.Reverse ();
|
||||
pos.SetAxis(gp_Ax22d(pos.Location(), pos.XDirection(), Temp));
|
||||
}
|
||||
|
@ -17,21 +17,8 @@
|
||||
#ifndef _Geom2d_Conic_HeaderFile
|
||||
#define _Geom2d_Conic_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_ConstructionError;
|
||||
class Standard_DomainError;
|
||||
class gp_Ax22d;
|
||||
class gp_Ax2d;
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
||||
class Geom2d_Conic;
|
||||
DEFINE_STANDARD_HANDLE(Geom2d_Conic, Geom2d_Curve)
|
||||
@ -53,30 +40,31 @@ DEFINE_STANDARD_HANDLE(Geom2d_Conic, Geom2d_Curve)
|
||||
//! the parameter of the conic.
|
||||
class Geom2d_Conic : public Geom2d_Curve
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Modifies this conic, redefining its local coordinate system
|
||||
//! partially, by assigning P as its origin
|
||||
Standard_EXPORT void SetAxis (const gp_Ax22d& A);
|
||||
//! partially, by assigning theA as its axis
|
||||
void SetAxis (const gp_Ax22d& theA) { pos.SetAxis(theA); }
|
||||
|
||||
Standard_EXPORT void SetXAxis (const gp_Ax2d& A);
|
||||
|
||||
//! Assigns the origin and unit vector of axis A to the
|
||||
//! origin of the local coordinate system of this conic and either:
|
||||
//! - its "X Direction", or
|
||||
//! - its "Y Direction".
|
||||
//! Assigns the origin and unit vector of axis theA to the
|
||||
//! origin of the local coordinate system of this conic and X Direction.
|
||||
//! The other unit vector of the local coordinate system
|
||||
//! of this conic is recomputed normal to A, without
|
||||
//! of this conic is recomputed normal to theA, without
|
||||
//! changing the orientation of the local coordinate
|
||||
//! system (right-handed or left-handed).
|
||||
Standard_EXPORT void SetYAxis (const gp_Ax2d& A);
|
||||
void SetXAxis (const gp_Ax2d& theAX) { pos.SetXAxis(theAX); }
|
||||
|
||||
//! Assigns the origin and unit vector of axis theA to the
|
||||
//! origin of the local coordinate system of this conic and Y Direction.
|
||||
//! The other unit vector of the local coordinate system
|
||||
//! of this conic is recomputed normal to theA, without
|
||||
//! changing the orientation of the local coordinate
|
||||
//! system (right-handed or left-handed).
|
||||
void SetYAxis (const gp_Ax2d& theAY) { pos.SetXAxis(theAY); }
|
||||
|
||||
//! Modifies this conic, redefining its local coordinate
|
||||
//! system fully, by assigning A as this coordinate system.
|
||||
Standard_EXPORT void SetLocation (const gp_Pnt2d& P);
|
||||
|
||||
//! system partially, by assigning theP as its origin.
|
||||
void SetLocation (const gp_Pnt2d& theP) { pos.SetLocation(theP); }
|
||||
|
||||
//! Returns the "XAxis" of the conic.
|
||||
//! This axis defines the origin of parametrization of the conic.
|
||||
@ -102,12 +90,10 @@ public:
|
||||
//! Returns the location point of the conic.
|
||||
//! For the circle, the ellipse and the hyperbola it is the center of
|
||||
//! the conic. For the parabola it is the vertex of the parabola.
|
||||
Standard_EXPORT gp_Pnt2d Location() const;
|
||||
const gp_Pnt2d& Location() const { return pos.Location(); }
|
||||
|
||||
|
||||
//! Returns the local coordinates system of the conic.
|
||||
Standard_EXPORT const gp_Ax22d& Position() const;
|
||||
|
||||
const gp_Ax22d& Position() const { return pos; }
|
||||
|
||||
//! Reverses the direction of parameterization of <me>.
|
||||
//! The local coordinate system of the conic is modified.
|
||||
@ -120,32 +106,13 @@ public:
|
||||
//! Returns GeomAbs_CN which is the global continuity of any conic.
|
||||
Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Returns True, the order of continuity of a conic is infinite.
|
||||
Standard_EXPORT Standard_Boolean IsCN (const Standard_Integer N) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(Geom2d_Conic,Geom2d_Curve)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
gp_Ax22d pos;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Geom2d_Conic_HeaderFile
|
||||
|
Loading…
x
Reference in New Issue
Block a user