104 lines
2.3 KiB
C++
104 lines
2.3 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TPGeCurve3D.h
|
|
// = Version : ver2.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: 类的声明 空间有向连续参数曲线,起点参数0,如果有终点,终点参数为1
|
|
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _TPGECURVE3D_H_
|
|
#define _TPGECURVE3D_H_
|
|
|
|
#ifndef _TGOBJECT3D_H_
|
|
#include "TGObject3D.h"
|
|
#endif
|
|
|
|
#ifndef _TGPOINT_H_
|
|
#include "TGPoint.h"
|
|
#endif
|
|
|
|
#ifndef _TGOBJECT_H_
|
|
#include "TGObject.h"
|
|
#endif
|
|
|
|
#ifndef _TTABLE_H_
|
|
#include "TTable.h"
|
|
#endif
|
|
|
|
#ifndef _TGOBJECTLIST_H_
|
|
#include "TGObjectList.h"
|
|
#endif
|
|
|
|
class TGMLine3D;
|
|
|
|
class GEOAPI TPGeCurve3D : public TGObject3D
|
|
{
|
|
DECLARE_RUN_TIME_CLASS(TPGeCurve3D)
|
|
|
|
public:
|
|
|
|
virtual ~TPGeCurve3D();
|
|
|
|
virtual void GetStartPoint(TGPoint& pt) const;
|
|
|
|
virtual void GetEndPoint(TGPoint& pt) const;
|
|
|
|
//是否封闭曲线,封闭曲线一定是有限曲线
|
|
virtual bool IsClosed() const;
|
|
|
|
//是否有起点或终点
|
|
virtual bool IsFinite(bool bStart) const;
|
|
|
|
//存在重复子集
|
|
virtual bool IsSelfCross() const;
|
|
|
|
//由曲线参数得到点
|
|
virtual void Pa2Pt(double pa,TGPoint& pt) const;
|
|
|
|
//由点得到曲线参数,适用于非自交时!
|
|
virtual void Pt2Pa(const TGPoint& pt,double& pa) const;
|
|
|
|
//只适用于平面封闭不自交曲线
|
|
virtual double Area() const;
|
|
|
|
//用于有限曲线
|
|
virtual double Length() const;
|
|
|
|
//反向
|
|
virtual void Reverse();
|
|
|
|
//有限曲线,如果paDist<=0,则使用该实体默认精度
|
|
virtual TGMLine3D* MLinearize(double paDist = 0) const;
|
|
|
|
//取线型化的默认精度
|
|
virtual double GetMLinePrec() const;
|
|
|
|
virtual TPGeCurve3D* GetSubCurve(double pa0,double pa1) const;
|
|
|
|
//取同曲线方向的子曲线,pa0,pa1必须有效,不封闭时必须pa1>pa0,封闭时pa0==pa1表示一点切割
|
|
virtual void Split(const TTable<double> & paTable,TGObjectList& res) const;
|
|
|
|
//按参数表分解曲线,paTable为有序表,参数表中参数必须有效!允许冗余参数
|
|
virtual TGPoint GetSamplePoint() const;
|
|
|
|
virtual bool IsInclude(const TGObject& obj) const;
|
|
|
|
void GetMidPoint(TGPoint& pt) const;
|
|
|
|
//两段曲线是否可以连接,终点与seg的起点相同
|
|
bool IsConnect(const TPGeCurve3D& seg) const;
|
|
|
|
//是否有两端点
|
|
bool IsCurveSeg() const;
|
|
|
|
//有限曲线(封闭或是曲线段)
|
|
bool IsFinite() const;
|
|
|
|
//完全无限曲线
|
|
bool IsInfinite() const;
|
|
};
|
|
|
|
#endif |