Files
envi-code/SourceCode/Code2026/inc/GiDrawUtility.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

140 lines
4.1 KiB
C++

#pragma once
#include "AcGiDraw.h"
#ifdef AECRXBASE_EXPORT
#define AECDLLIMPEXP __declspec(dllexport)
#else
#define AECDLLIMPEXP __declspec(dllimport)
#endif
// 所有3dSolid实体,都在原点处绘制,绘制完成后,根据原点移动,根据Z轴旋转
// drawPipe及使用drawPipe的方法除外,可以直接定位
namespace GiDrawUtility
{
AECDLLIMPEXP void transfromRegion(AcDbRegion *pRegion
, const AcGePoint3d &ptOnRegion
, const AcGeVector3d &vtNormal
, const AcGePoint3d &ptOnPlan);
AECDLLIMPEXP AcDbEntity* DrawPipe(const AcGePoint3d& ptFrom
, const AcGePoint3d& ptTo
, const double &dRadius
, const double &dThick
, const int &nSegs = 20);
AECDLLIMPEXP AcDbEntity* DrawPipe(const AcDbCurve* pCurve
, const AcDbRegion* pRegion
, const AcGePoint3d& ptCenInRgn);
AECDLLIMPEXP AcDbEntity* DrawPipe(const AcDbCurve* pCurve
, const AcDbPolyline* pRegion
, const AcGePoint3d& ptCenInRgn);
AECDLLIMPEXP AcDbEntity* DrawPipe(const AcDbCurve* pCurve
, const AcDbCurve* pRegion
, const AcGePoint3d& ptCenInRgn);
AECDLLIMPEXP AcDbEntity* DrawPipe(const AcDbCurve *pCurve, double dR);
AECDLLIMPEXP AcDbEntity* DrawCone( const AcGePoint3d &ptPos
, const AcGeVector3d &vtMove
, const double &Tr
, const double &Br
, const double &H
, const double &xOffset );
AECDLLIMPEXP AcDbEntity* DrawBox(const AcGePoint3d &ptPos
, const AcGeVector3d &vtMove
, const double &X
, const double &Y
, const double &Z);
AECDLLIMPEXP AcDbEntity* DrawSphere(const AcGePoint3d &ptCenter
, const double &dRadius );
AECDLLIMPEXP AcDbEntity* DrawPyramid(const AcGePoint3d &ptPos
, const AcGeVector3d &vtMove
, const double &Tx
, const double &Ty
, const double &Bx
, const double &By
, const double &H
, const double &xOffset );
AECDLLIMPEXP AcDbEntity* DrawTydf(const AcGePoint3d &ptPos
, const AcGeVector3d &vtMove
, const double &Tr
, const double &Bx
, const double &By
, const double &H
, const double &xOffset
, BOOL bIsTfdy = FALSE);
AECDLLIMPEXP AcDbEntity* DrawCylinder(const AcGePoint3d &ptFr
, const AcGePoint3d &ptTo
, const double &dRadius
);
AECDLLIMPEXP AcDbEntity* DrawCirTorus(const AcGePoint3d &ptCenter
, const AcGeVector3d &vtNormal
, const double &majorRadius // 大半径
, const double &minorRadius // 小半径,大半径减小半径是管子直径
, const double &startAngle
, const double &endAngle
);
AECDLLIMPEXP AcDbEntity* DrawRectTorus(const AcGePoint3d &ptCenter
, const AcGeVector3d &vtNormal
, const double &majorRadius // 大半径
, const double &minorRadius // 小半径
, const double &height // 大半径减小半径是正方形的宽,这个参数是高
, const double &startAngle
, const double &endAngle
);
AECDLLIMPEXP AcDbEntity* DrawDish(const double &dH // 小半径
, const double &dD // 大直径
, const AcGePoint3d &axisPnt
, const AcGeVector3d &axisDir
);
// 得到一个矩阵,将ptOrig点方向为vtOrig转到ptDirst,方向为vtDist
AECDLLIMPEXP AcGeMatrix3d RotateAndMove(const AcGeVector3d &vtOrig
, const AcGePoint3d &ptOrig
, const AcGeVector3d &vtDist
, const AcGePoint3d &ptDist);
AECDLLIMPEXP AcDbEntity* DrawLoft(const AcDbRegion *pTop
, const AcDbRegion *pBottom
, const AcDbCurve *pLine);
AECDLLIMPEXP AcDbEntity* DrawLoft(const AcDbCurve *pTop
, const AcDbCurve *pBottom
, const AcDbCurve *pLine);
AECDLLIMPEXP AcDbEntity* DrawRevolve(const AcDbLine& lnAxis
, const AcDbRegion *pReg);
AECDLLIMPEXP AcDbEntity* DrawRevolve(const AcDbLine& lnAxis
, const AcDbCurve *pCurve);
AECDLLIMPEXP AcDbEntity* DrawRevolve(const AcDbLine& lnAxis
,const AcGePoint3dArray& arSectionPtrs);
AECDLLIMPEXP AcDbEntity* DrawExclude(const AcGePoint3dArray& arSectionPtrs
, const AcGeVector3d &vtPath);
AECDLLIMPEXP AcDbEntity* DrawExclude(const AcDbCurve *pCurve
, const AcGeVector3d &vtPath);
AECDLLIMPEXP AcDbEntity* DrawExclude(const AcDbRegion *pReg
, const AcGePoint3d &ptInReg
, const AcGeVector3d &vtPath);
AECDLLIMPEXP AcDbEntity* DrawMesh(const Adesk::UInt32 &rows
, const Adesk::UInt32 &columns
, const AcGePoint3d *pVertexList
, bool bHasSeal = true);
}