Files
envi-code/SourceCode/Code2026/tg_shs/inc/TArch/TDbWallPatch.h
T
2026-09-28 15:28:50 +08:00

277 lines
6.8 KiB
C++

//-----------------------------------------------------------------------------+
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
// = FileName : TDbWallPatch.h
// = Version : ver2.0
// = Author : xlc
// = CreateDate : 2002-09-09
// = Description: 墙体造型类的声明
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#ifndef _TDBWALLPATCH_H_
#define _TDBWALLPATCH_H_
#ifndef _TGGECURVESEGMENT_H_
#include "TGGeCurveSegment.h"
#endif
#ifndef _TDBENTITY_H_
#include "TDbEntity.h"
#endif
#ifndef _TWALLBASE_H_
#include "TWallBase.h"
#endif
#ifndef _TGGEPOLY2D_H_
#include "TGGePoly2D.h"
#endif
#ifndef _TGGIEXPLODEDRAWBASE_H_
#include "TGGiExplodeDrawBase.h"
#endif
#ifndef _TGGICURVESTREAM_H_
#include "TGGiCurveStream.h"
#endif
class TARCH_EXP TDbWallPatch: public TDbEntity, public TGGiCurveStream ,public TWallBase
{
friend class TDbWall;
DECLARE_TENTBASE();
ACRX_DECLARE_MEMBERS(TDbWallPatch);
public:
TDbWallPatch();
enum UsageFlag
{
kUnknown = 0,
kWallPier = 1, //一般墙体造型
kFence = 2, //矮墙体造型,TArch7
kConcave = 3, //内凹造型
};
enum TWallPatchStyle
{
kFill = 30, //填充墙
kFill1 = 31, //填充墙1
kFill2 = 32, //填充墙2
kBrick = 40, //砖墙
kRocket = 50, //石墙
kConcrete = 60, //钢筋混凝土墙
};
// Overriden function from AcDbEntity
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler* pFiler);
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler* pFiler);
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* pFiler) const;
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
AcDbIntArray& osnapModes,
AcDbIntArray& geomIds) const;
virtual Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray & stretchPoints) const;
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus subClose();
virtual Acad::ErrorStatus subErase(Adesk::Boolean bErasing);
Acad::ErrorStatus subWblockClone(AcRxObject* pOwner,
AcDbObject*& pClonedObject,
AcDbIdMapping& idMap,
Adesk::Boolean isPrimary) const;
// drived from TDbEntity
virtual bool IsModelEntity() const;
virtual bool IsMeClip()const;
virtual BOOL IsValid() const;
virtual void CopyPropertiesFrom(AcDbEntity *pSrcEntity, unsigned gMatchFlag);
virtual Acad::ErrorStatus SetPathPoly(const TGGePoly2D &polyPath,const AcGeVector3d&normal);
virtual Acad::ErrorStatus GetPathPoly(TGGePoly2D &polyPath,AcGeVector3d&normal) const;
virtual Acad::ErrorStatus ExplodeOrDraw3d(TGGiExplodeDrawBase &dc) const;
virtual Acad::ErrorStatus ExplodeOrDraw2d(TGGiExplodeDrawBase &dc) const;
//add by xlc on 110407
virtual Acad::ErrorStatus DownGradeSave(int nDrawMode, AcDbVoidPtrArray &entSet, BOOL *bErase);
//取动态属性显示数据
virtual void GetTips(TDPtrList<TObjInfoUnit> &) const;
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
virtual const TCHAR * GetDefaultLayer() const;
#if ADS > 15
virtual void CreateGrip();
virtual Acad::ErrorStatus EntityToDim(long iGrip,long iDim,const AcDbEntity*pEnt);
virtual Acad::ErrorStatus DimToEntity(long iGrip,long iDim,double newValue,const AcGeVector3d& offset);
#endif
// sg add 101115,支持统一标高
virtual bool UnifyElevation(double dElevation = 0.0);
//override TWallBase
virtual AcDbEntity* GetMyEntity()const;
virtual int GetMaterialIndex()const;
virtual Usage GetUsage()const;
// sg add 101118,支持导出XML
virtual CString GetXml(const AcGeMatrix3d& mat) const;
// derive from TGGiCurveStream
static const TCHAR * Descriptor();
const TCHAR * Desc();
public:
// Helper Method
BOOL IsConcrete() const;
BOOL OnlyPatchMe(AcDbObjectId idWall) const; //是否仅仅对一段墙进行修补
void ClipOutlineByPatchWalls(TDPtrList<TGGeCurveSegment> &lstResult, TDPtrList<TGGeCurveSegment> &lstResultIn) const;
// 如果其他构件优先(强)于本构件, 则用它们的外轮廓, 如果相等用内轮廓
void GetInPatchObjectOutline(TDPtrList<TGGePoly2D> &lstClipPolies) const;
// 移除同墙体的连接关系(双向)
void RemoveAllLinkages();
void UpdateAssocWallGraphics() const;
const TCHAR *GetHatchPattern() const;
Adesk::UInt16 GetHatchColor() const;
//取本墙线厚度,不管加粗开关是否开启
double GetLineWeight(BOOL bAsPaperUnit = TRUE) const;
//被补的墙体
const TDPtrList<AcDbSoftPointerId> & GetPatchIds() const;
Acad::ErrorStatus AddPatchId(const AcDbObjectId &id);
Acad::ErrorStatus RemovePatchId(const AcDbObjectId &id);
UsageFlag GetUsageFlag() const;
void SetUsageFlag(UsageFlag nUsage);
//用于OPM的属性, 形状被修改后需调用UpdateAssocWallGraphics();
//底标高
double GetElevation() const;
void SetElevation(double nElev) ;
//wlw修改100629
void GetOutlinePoly(TGGePoly2D &poly, bool bInsulate = true) const;
//确保按逆时针方向
void SetOutlinePoly(const TGGePoly2D &poly);
//高度, 如果为0则不显示三维
double GetHeight() const;
void SetHeight(double h) ;
BOOL HasTop() const;
BOOL HasBottom() const;
AcDbObjectId GetLayerHatch2d() const;
void SetLayerHatch2d(AcDbObjectId id);
void SetStyle(TWallPatchStyle style);
TDbWallPatch::TWallPatchStyle GetStyle()const;
//wlw修改100629
//保温
AcDbObjectId GetLayerInsulateId() const;
void SetLayerInsulateId(AcDbObjectId id);
double GetInsulateThick() const;
void SetInsulateThick(double dThick);
BOOL HasInsulate() const;
void SetInsulate(BOOL bTrue = TRUE);
int GetWallFlag() const;
void SetWallFlag(int nFlag);
//绘制保温
void DrawInsulateLine(const TGGePoly2D& polyInsulate, TGGePoly2D& polyUnionInsulate, bool bzoom, TGGiExplodeDrawBase &dc) const;
protected:
//版本
const static Adesk::UInt8 g_nVersion;
//底标高
double m_nElevation;
//补丁轮廓, 必须是逆时针方向
TGGePoly2D m_polyOutline;
//高度, 如果为0则不显示三维
double m_nHeight;
//被补的墙体
TDPtrList<AcDbSoftPointerId> m_lstIdsForPatch;
//用途
UsageFlag m_nUsageFlag;
// TArch6
AcDbHardPointerId m_idLayerHatch2d;
// TArch7
//材料
TWallPatchStyle m_nStyle;
// TArch8
Adesk::UInt32 m_nFlag;
//保温层厚...
double m_nInsulateThick;
//保温图层...
AcDbHardPointerId m_idLayerInsulate;
private:
Acad::ErrorStatus ReadCurve(AcDbDwgFiler *pFiler, TGGeCurveSegment &seg);
Acad::ErrorStatus ReadCurveList(AcDbDwgFiler *pFiler, TDPtrList<TGGeCurveSegment> &lstSegs);
//wlw修改100629
void GetInsulateExLine(TDPtrList<TGGeCurveSegment> &lstSegs) const;
};
#endif