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

63 lines
3.1 KiB
C

/********************************************************************
created: 2014/12/04 10:47
filename: f:\telecT20\telec\TElecSys\telecdef.h
author: 艾新昶
purpose: 电气公共函数,全局变量
comment: 将电气的几个全局变量和函数从tch_public工程移植到
tel_sys工程,方便管理。
*********************************************************************/
#ifndef __TELECGLOBALDEF_H_
#define __TELECGLOBALDEF_H_
#if _MSC_VER > 1000
#pragma once
#endif
//**********************************************************************
// 电气全局变量
//**********************************************************************
#define MAX_WIRE_LEN 37
#define g_nCurWireWidth g_nWireWidth[g_iPlanWireIndex]*DocGetPScale() > 0.01 ? g_nWireWidth[g_iPlanWireIndex]*DocGetPScale() : 0.5*DocGetPScale()
extern TGLOAPI double g_nWireWidth[MAX_WIRE_LEN]; //导线线宽
extern TGLOAPI BOOL g_bNeedUser[33]; //是否激活
extern TGLOAPI BOOL g_bJoin2Wire;
extern TGLOAPI BOOL g_bLineTypeByLayer;
extern TGLOAPI int g_iWireDimNorm[MAX_WIRE_LEN]; //0:普通,1:阻燃,2:耐火
extern TGLOAPI CString g_csWireDimMode[MAX_WIRE_LEN], g_csWireDimPlace[MAX_WIRE_LEN], g_csWireDimRadius[MAX_WIRE_LEN],
g_csWireDimType[MAX_WIRE_LEN], g_csWireLoop[MAX_WIRE_LEN], g_csWireDimArea[MAX_WIRE_LEN], g_csWireLineNum[MAX_WIRE_LEN];
extern TGLOAPI CString g_csLineType[MAX_WIRE_LEN]; //导线线型
extern TGLOAPI CString g_csTextAttr; //块属性字
extern TGLOAPI CString g_csBlkAttrTypeChnShx;//块属性字中文字体
extern TGLOAPI CString g_csBlkAttrTypeEngShx;//块属性字英文字体
extern TGLOAPI int g_iGourdWireLineType, g_iLightingWireLineType; //避雷 接地 线型 1:普通线型+图块 0:线型
extern TGLOAPI double g_dBlkThickWidth; //图块加粗线宽
extern TGLOAPI double g_dChamAngle; //倒角半径
extern TGLOAPI double g_dBusLineWidth,g_dSysLineWidth; //系统导线 线宽
extern TGLOAPI double g_nEqBlkLength, g_nEq2WallDist, g_nPointDia,
g_nTerminalDia, g_nWireDimScale,
g_nDimHeight, g_nScaleDim, g_nWireNumHeight;
extern TGLOAPI int g_iLastBlkMaxNum, g_iWireBreak,
g_iWireTextType, g_iWireNumType,g_iPlanWireIndex;//g_iPlanWireIndex 图层数组索引 参加ArxMain()
extern TGLOAPI BOOL g_bJoin2Wire, g_bAskInsBlk, g_bThickEquip,
g_bWireAskInfo, g_bDimWireSimple,
g_bCloseLnGrid, g_bDrawWireDiv, g_bRotateAttrib;
extern TGLOAPI BOOL g_bIsChamAngle; //是否倒角
/**************************电气全局函数*********************************/
TGLOAPI void DrawPLineWire(XPoly2D &xpoly, int iLayerIndex, BOOL bJoin);
TGLOAPI void DrawPLineWire(XPoint ptStart, XPoint ptEnd, int iLayerIndex, BOOL bJoin = g_bJoin2Wire);
TGLOAPI void DrawPArcWire(XPoint ptStart, XPoint ptMid, XPoint ptEnd, int iLayerIndex, BOOL bJoin = g_bJoin2Wire);
TGLOAPI void DrawPArcWire(XArc arc, int iLayerIndex);
TGLOAPI void DrawDivWire(XPoint ptStart, XPoint ptEnd, BOOL bIsBusWire, BOOL bNeed = TRUE, BOOL bIsEmptyMWire = FALSE);
TGLOAPI void ThickBlkPLine(const TCHAR* szBlkName);
TGLOAPI XCurveSegment GetBlkSel(Entity entBlk, XPoint ptPick);
TGLOAPI BOOL DrawPLineWireBy2Equip(Entity oldent, Entity ent1, Entity ent2);
TGLOAPI void AdjustWndToViewport(CWnd* pWnd,int nXOff = 0,int nYOff = 0);
#endif