// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'sgConsts.pas' rev: 6.00

#ifndef sgConstsHPP
#define sgConstsHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Types.hpp>	// Pascal unit
#include <Registry.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Sgconsts
{
//-- type declarations -------------------------------------------------------
typedef AnsiString sgConsts__1[20];

typedef double *PsgFloat;

typedef double TsgFloat;

#pragma pack(push, 4)
struct TsgInt64
{
	int Lo;
	int Hi;
} ;
#pragma pack(pop)

struct TFPoint;
typedef TFPoint *PFPoint;

struct TFPoint
{
	
	union
	{
		struct 
		{
			double V[3];
			
		};
		struct 
		{
			double X;
			double Y;
			double Z;
			
		};
		
	};
} ;

struct TF2DPoint;
typedef TF2DPoint *PF2DPoint;

struct TF2DPoint
{
	
	union
	{
		struct 
		{
			double V[2];
			
		};
		struct 
		{
			double X;
			double Y;
			
		};
		
	};
} ;

struct TdxfPoint;
typedef TdxfPoint *PdxfPoint;

#pragma pack(push, 4)
struct TdxfPoint
{
	float X;
	float Y;
	float Z;
} ;
#pragma pack(pop)

struct TsgLine
{
	TFPoint Point1;
	TFPoint Point2;
} ;

struct TFRect;
typedef TFRect *PFRect;

struct TFRect
{
	
	union
	{
		struct 
		{
			TFPoint TopLeft;
			TFPoint BottomRight;
			
		};
		struct 
		{
			double Left;
			double Top;
			double Z1;
			double Right;
			double Bottom;
			double Z2;
			
		};
		
	};
} ;

struct TcadExtendedData;
typedef TcadExtendedData *PcadExtendedData;

#pragma pack(push, 1)
struct TcadExtendedData
{
	void *Param1;
} ;
#pragma pack(pop)

struct TcadData;
typedef TcadData *PcadData;

#pragma pack(push, 1)
struct TcadData
{
	Word Tag;
	Word Count;
	Word TickCount;
	Byte Flags;
	Byte Style;
	int Dimension;
	TFPoint *DashDots;
	int DashDotsCount;
	int Color;
	void *Ticks;
	double Thickness;
	double Rotation;
	char *Layer;
	char *Text;
	char *FontName;
	unsigned Handle;
	int Undefined1;
	double Undefined2;
	double Undefined3;
	TcadExtendedData *CADExtendedData;
	TFPoint Point;
	TFPoint Point1;
	TFPoint Point2;
	TFPoint Point3;
	union
	{
		struct 
		{
			TFPoint *Points;
			
		};
		struct 
		{
			double FHeight;
			double FScale;
			double RWidth;
			double RHeight;
			Byte HAlign;
			Byte VAlign;
			
		};
		struct 
		{
			unsigned Block;
			TFPoint Scale;
			
		};
		struct 
		{
			double Radius;
			double StartAngle;
			double EndAngle;
			double Ratio;
			Byte EntityType;
			
		};
		
	};
} ;
#pragma pack(pop)

struct TdxfData;
typedef TdxfData *PdxfData;

#pragma pack(push, 1)
struct TdxfData
{
	Word Tag;
	Word Count;
	Word TickCount;
	Byte Flags;
	Byte Style;
	int Dimension;
	TdxfPoint *DashDots;
	int DashDotsCount;
	int Color;
	void *Ticks;
	float Thickness;
	float Rotation;
	char *Layer;
	char *Text;
	char *FontName;
	unsigned Handle;
	TcadExtendedData *CADExtendedData;
	TdxfPoint Point;
	TdxfPoint Point1;
	TdxfPoint Point2;
	TdxfPoint Point3;
	union
	{
		struct 
		{
			TdxfPoint *Points;
			
		};
		struct 
		{
			float FHeight;
			float FScale;
			float RWidth;
			float RHeight;
			Byte HAlign;
			Byte VAlign;
			
		};
		struct 
		{
			unsigned Block;
			TdxfPoint Scale;
			
		};
		struct 
		{
			float Radius;
			float StartAngle;
			float EndAngle;
			float Ratio;
			Byte EntityType;
			
		};
		
	};
} ;
#pragma pack(pop)

#pragma option push -b-
enum TsgAxes { axisX, axisY, axisZ };
#pragma option pop

#pragma option push -b-
enum TsgDistUnitsMode { umDrawing, umUser, umAltUser };
#pragma option pop

#pragma option push -b-
enum TsgDWGVersion { acR09, acR10, acR11, acR12, acR13, acR14, acR2000, acR2004, acR2007 };
#pragma option pop

#pragma option push -b-
enum TsgHatchStyle { hsSolid, hsPatternData, hsHorizontal, hsVertical, hsFDiagonal, hsBDiagonal, hsCross, hsDiagCross };
#pragma option pop

#pragma option push -b-
enum TsgImportMode { imView, imImport };
#pragma option pop

#pragma option push -b-
enum TsgCADSpace { cs2D, cs3D, csUndefined };
#pragma option pop

#pragma option push -b-
enum TsgBorderType { btGlobal, btRatio };
#pragma option pop

typedef double TsgBorderSize;

#pragma option push -b-
enum TsgGradientType { gtNone, gtCurved, gtCylinder, gtHemiSpherical, gtLinear, gtSpherical, gtInvCurved, gtInvCylinder, gtInvHemiSpherical, gtInvSpherical, gtOther };
#pragma option pop

typedef double TFMatrix[4][3];

typedef double *PFMatrix;

#pragma option push -b-
enum TIntersectionMode { imNone, imPoint, imLine, imPlane };
#pragma option pop

#pragma option push -b-
enum TObjectSnapMode { osNone, osAll, osEndPt, osIntersection, osCenter, osCross, osInsert, osImmediate, osMiddle, osDisabled };
#pragma option pop

#pragma option push -b-
enum TsgCADEnities { ceEntity, cePoint, ceLine, ceSolid, ceCircle, ceArc, ceEllipse, cePolyline, ceLWPolyline, ceSpline, ceLeader, ceInsert, ceDimension, ceMText, ceText, ceAttdef, ceAttrib, ce3dFace, ceImageEnt, ceViewport, ceRegion, ceBody, ce3DSolid, cePattern, ceGradient, ceOle2Frame, cePolyPolygon, ceGradientPolygon, ceCurvePolygon, ceHatch, ceACADTable, ceFlatPoly, ceFlatHatch, ceXRef, ceProxy, cePath };
#pragma option pop

//-- var, const, procedure ---------------------------------------------------
static const int clByLayer = 0x2fffffff;
static const int clByBlock = 0x3fffffff;
static const Shortint DXF_SEC_TABLES = 0x0;
static const Shortint DXF_SEC_BLOCKS = 0x1;
static const Shortint DXF_SEC_ENTITIES = 0x2;
static const Shortint DXF_SEC_LTYPE = 0x3;
static const Shortint DXF_SEC_LAYERS = 0x4;
static const Shortint DXF_UNKNOWN = 0x0;
static const Shortint DXF_TABLE = 0x1;
static const Shortint DXF_BLOCK = 0x2;
static const Shortint DXF_LTYPE = 0x3;
static const Shortint DXF_LAYER = 0x4;
static const Shortint DXF_VERTEX = 0x5;
static const Shortint DXF_LINE = 0x6;
static const Shortint DXF_SOLID = 0x7;
static const Shortint DXF_CIRCLE = 0x8;
static const Shortint DXF_ARC = 0x9;
static const Shortint DXF_POLYLINE = 0xa;
static const Shortint DXF_LWPOLYLINE = 0xb;
static const Shortint DXF_SPLINE = 0xc;
static const Shortint DXF_INSERT = 0xd;
static const Shortint DXF_DIMENSION = 0xe;
static const Shortint DXF_TEXT = 0xf;
static const Shortint DXF_MTEXT = 0x10;
static const Shortint DXF_ATTDEF = 0x11;
static const Shortint DXF_ELLIPSE = 0x12;
static const Shortint DXF_POINT = 0x13;
static const Shortint DXF_3DFACE = 0x14;
static const Shortint DXF_HATCH = 0x15;
static const Shortint DXF_IMAGE_ENT = 0x16;
static const Shortint DXF_ATTRIB = 0x17;
static const Shortint DXF_BEGIN_POLYLINE = 0x64;
static const Shortint DXF_END_POLYLINE = 0x65;
static const Shortint DXF_BEGIN_INSERT = 0x66;
static const Shortint DXF_END_INSERT = 0x67;
static const Shortint DXF_BEGIN_VIEWPORT = 0x68;
static const Shortint DXF_END_VIEWPORT = 0x69;
static const Shortint Info_0 = 0x0;
static const Shortint Text_1 = 0x1;
static const Shortint Name_2 = 0x2;
static const Shortint Text_3 = 0x3;
static const Shortint Text_4 = 0x4;
static const Shortint Text_5 = 0x5;
static const Shortint LineTypeName_6 = 0x6;
static const Shortint TextFont_7 = 0x7;
static const Shortint LayerName_8 = 0x8;
static const Shortint VarName_9 = 0x9;
static const Shortint XFirst_10 = 0xa;
static const Shortint XOther_11 = 0xb;
static const Shortint XOther_12 = 0xc;
static const Shortint XOther_13 = 0xd;
static const Shortint XOther_14 = 0xe;
static const Shortint XOther_15 = 0xf;
static const Shortint XOther_16 = 0x10;
static const Shortint XOther_17 = 0x11;
static const Shortint XOther_18 = 0x12;
static const Shortint XOther_110 = 0x6e;
static const Shortint XOther_111 = 0x6f;
static const Shortint XOther_112 = 0x70;
static const Shortint YFirst_20 = 0x14;
static const Shortint YOther_21 = 0x15;
static const Shortint YOther_22 = 0x16;
static const Shortint YOther_23 = 0x17;
static const Shortint YOther_24 = 0x18;
static const Shortint YOther_25 = 0x19;
static const Shortint YOther_26 = 0x1a;
static const Shortint YOther_27 = 0x1b;
static const Shortint YOther_28 = 0x1c;
static const Shortint YOther_120 = 0x78;
static const Shortint YOther_121 = 0x79;
static const Shortint YOther_122 = 0x7a;
static const Shortint ZFirst_30 = 0x1e;
static const Shortint ZOther_31 = 0x1f;
static const Shortint ZOther_32 = 0x20;
static const Shortint ZOther_33 = 0x21;
static const Shortint ZOther_34 = 0x22;
static const Shortint ZOther_35 = 0x23;
static const Shortint ZOther_36 = 0x24;
static const Shortint ZOther_37 = 0x25;
static const Byte ZOther_130 = 0x82;
static const Byte ZOther_131 = 0x83;
static const Byte ZOther_132 = 0x84;
static const Shortint Elevation_38 = 0x26;
static const Shortint TableOfEntity_39 = 0x27;
static const Shortint Float_40 = 0x28;
static const Shortint Float_41 = 0x29;
static const Shortint Float_42 = 0x2a;
static const Shortint Float_43 = 0x2b;
static const Shortint Float_44 = 0x2c;
static const Shortint Float_45 = 0x2d;
static const Shortint Float_46 = 0x2e;
static const Shortint Float_47 = 0x2f;
static const Shortint Float_48 = 0x30;
static const Shortint FloatRepeated_49 = 0x31;
static const Byte Float_140 = 0x8c;
static const Byte Float_141 = 0x8d;
static const Byte Float_142 = 0x8e;
static const Byte Float_143 = 0x8f;
static const Byte Float_144 = 0x90;
static const Byte Float_145 = 0x91;
static const Byte Float_146 = 0x92;
static const Byte Float_147 = 0x93;
static const Byte Float_148 = 0x94;
static const Byte Float_149 = 0x95;
static const Byte Float_211 = 0xd3;
static const Byte Float_221 = 0xdd;
static const Byte Float_231 = 0xe7;
static const Shortint Angle_50 = 0x32;
static const Shortint Angle_51 = 0x33;
static const Shortint Angle_52 = 0x34;
static const Shortint Angle_53 = 0x35;
static const Shortint Angle_54 = 0x36;
static const Shortint Angle_55 = 0x37;
static const Shortint Angle_56 = 0x38;
static const Shortint Angle_57 = 0x39;
static const Shortint Angle_58 = 0x3a;
static const Shortint Visible_60 = 0x3c;
static const Shortint ColorNumber_62 = 0x3e;
static const Shortint UCSVP_65 = 0x41;
static const Shortint EntitysBegin_66 = 0x42;
static const Shortint PaperSpace_67 = 0x43;
static const Shortint Integer_68 = 0x44;
static const Shortint Integer_69 = 0x45;
static const Shortint Integer_70 = 0x46;
static const Shortint Integer_71 = 0x47;
static const Shortint Integer_72 = 0x48;
static const Shortint Integer_73 = 0x49;
static const Shortint Integer_74 = 0x4a;
static const Shortint Integer_75 = 0x4b;
static const Shortint Integer_76 = 0x4c;
static const Shortint Integer_77 = 0x4d;
static const Shortint Integer_78 = 0x4e;
static const Shortint Integer_79 = 0x4f;
static const Shortint Integer_90 = 0x5a;
static const Shortint Integer_91 = 0x5b;
static const Shortint Integer_92 = 0x5c;
static const Shortint Integer_93 = 0x5d;
static const Shortint Integer_97 = 0x61;
static const Word Integer_290 = 0x122;
static const Word Integer_1070 = 0x42e;
static const Byte Extrusion_210 = 0xd2;
static const Byte Extrusion_220 = 0xdc;
static const Byte Extrusion_230 = 0xe6;
static const Shortint String_100 = 0x64;
static const Word String_310 = 0x136;
static const Word String_330 = 0x14a;
static const Word String_331 = 0x14b;
static const Word String_340 = 0x154;
static const Word String_341 = 0x155;
static const Word Integer_370 = 0x172;
static const Word String_1000 = 0x3e8;
static const Word String_1005 = 0x3ed;
static const Word Float_1040 = 0x410;
static const Word UserDigit = 0x5a47;
extern PACKAGE AnsiString sgDimensionArrowTypeNames[20];
#define sByBlock "BYBLOCK"
#define sByLayer "BYLAYER"
#define sContinuous "CONTINUOUS"
#define sModel "Model"
#define sLayout "Layout1"
#define sACADXDataAppName "ACAD"
#define sActiveVPort "*ACTIVE"
#define sModelSpace "*MODEL_SPACE"
#define sPaperSpace "*PAPER_SPACE"
#define sTextStyleStandardName "STANDARD"
#define sPolyline "Polyline"
#define sCircle "Circle"
#define sEllipse "Ellipse"
#define sHatchEntity "HATCH"
#define sPatternSOLID "SOLID"
#define sPatternANSI31 "ANSI31"
#define sPatternANSI37 "ANSI37"
#define sPatternNET "NET"
#define sPatternLINE "LINE"
#define sRedlineLayerName "Redline_layer"
static const Shortint iDefaultNumberOfCircleParts = 0x2f;
static const Shortint iDefaultNumberOfSplineParts = 0x18;
extern PACKAGE int iCurrentNumberOfCircleParts;
extern PACKAGE int iCurrentNumberOfSplineParts;
static const Shortint iMinNumberOfCircleParts = 0x4;
static const Word iMaxNumDottedLines = 0x3e8;
static const Extended fAccuracy = 1.000000E-06;
extern PACKAGE float BadSingValue;
extern PACKAGE Extended fWinTextHeightFactor;
extern PACKAGE Extended fWinTextYOffsetFactor;
extern PACKAGE Extended fPiDividedBy180;
extern PACKAGE Extended f180DividedByPi;
extern PACKAGE bool bLineWeightOn;
extern PACKAGE double fLineWeightByLayer;
extern PACKAGE double fLineWeightByBlock;
extern PACKAGE double fLineWeightDefault;
extern PACKAGE float fLineWeightFactor;
#define sLineWeightFactor "LineWeightDispFactor"
extern PACKAGE AnsiString sCorruptedDWGfileHeader;
extern PACKAGE AnsiString sEncryptedByPassword;
extern PACKAGE AnsiString sUnsupportedOldDWGVer;
extern PACKAGE AnsiString sUnsupportedNewDWGVer;
extern PACKAGE bool bUseSHXFonts;
extern PACKAGE bool bUseGDIPlusForRastImgRotate;
extern PACKAGE bool bSearchSHXPaths;
extern PACKAGE AnsiString sDefaultSHXPath;
extern PACKAGE AnsiString sDefaultSHXFont;
extern PACKAGE AnsiString sSHXSearchPaths;
extern PACKAGE Types::TRect sgClientRect;
extern PACKAGE Types::TRect sgClientRectForSnap;
extern PACKAGE Types::TPoint sgVisibleArea;
static const char sImpossiblePointerID = '\x23';
#define sInternalDimension "sgDim"
#define sFilledArrowForLeader "Filled_arrow_for_leader"
#define sNewBlockID "#NewBlockID"
extern PACKAGE AnsiString SMessageAnalysing;
extern PACKAGE AnsiString SMessageCleaning;
extern PACKAGE AnsiString sLoadFile;
extern PACKAGE AnsiString sLoadEntities;
extern PACKAGE unsigned arrDXFtoRGBColors[256];
extern PACKAGE int sgDXFLineWeights[24];
static const Shortint cnstFPointSize = 0x6;
extern PACKAGE TFPoint cnstFPointZero;
extern PACKAGE TFPoint cnstFPointSingle;
extern PACKAGE TFPoint cnstExtrusion;
extern PACKAGE TF2DPoint cnstF2DPointZero;
extern PACKAGE Types::TRect cnstBad2DRect;
extern PACKAGE TFRect cnstBadRect;
extern PACKAGE double cnstIdentityMat[4][3];
extern PACKAGE double cnstBorderSize;
extern PACKAGE TsgBorderType cnstBorderType;
extern PACKAGE bool __fastcall BinSearch(Classes::TList* List, Classes::TListSortCompare Comp, int &Index, void *Param);
extern PACKAGE double __fastcall Proportional(const double XInput, const double YInput, const double AOutput, bool AOutputIsX);
extern PACKAGE Extended __fastcall ConvToFloatDef(const AnsiString S, const Extended Value);
extern PACKAGE void __fastcall ExpandFRect(TFRect &R, const TFPoint &P);
extern PACKAGE Extended __fastcall Degree(Extended ARadian);
extern PACKAGE TdxfPoint __fastcall MakeDXFPoint(const float X, const float Y, const float Z);
extern PACKAGE TFPoint __fastcall MakeFPoint(double X, double Y, double Z);
extern PACKAGE TF2DPoint __fastcall MakeF2DPoint(const double X, const double Y);
extern PACKAGE TFRect __fastcall MakeFRect(double Left, double Top, double Z1, double Right, double Bottom, double Z2);
extern PACKAGE TFPoint __fastcall MakeFPointFromDXF(const TdxfPoint &AdxfPoint);
extern PACKAGE TdxfPoint __fastcall MakeDXFFromFPoint(const TFPoint &AFPoint);
extern PACKAGE AnsiString __fastcall MakeRightPath(AnsiString APath);
extern PACKAGE TFPoint __fastcall FloatPoint(Extended X, Extended Y);
extern PACKAGE TFRect __fastcall FloatRect(Extended ALeft, Extended ATop, Extended ARight, Extended ABottom);
extern PACKAGE TFPoint __fastcall FltPoint3D(Extended X, Extended Y, Extended Z);
extern PACKAGE Extended __fastcall Radian(Extended Angle);
extern PACKAGE void __fastcall ReplaceAnsi(AnsiString &S, const AnsiString S1, const AnsiString S2);
extern PACKAGE void __fastcall SwapSGFloats(double &A, double &B);
extern PACKAGE TFPoint __fastcall PtXMat(const TFPoint &P, const double * M);
extern PACKAGE double __fastcall MatXMat(const double * A, const double * B);
extern PACKAGE bool __fastcall IsRotated(const double * M);
extern PACKAGE void __fastcall MatOffset(double * M, const TFPoint &P);
extern PACKAGE double __fastcall StdMat(const TFPoint &S, const TFPoint &P);
extern PACKAGE double __fastcall IdentityMat();
extern PACKAGE double __fastcall TransposeMat(const double * AMatrix);
extern PACKAGE void __fastcall TransRectCorners(TFRect &ARect, const double * AMatrix);
extern PACKAGE void __fastcall SortList(Classes::PPointerList AList, Classes::TListSortCompare ACompareFunc, int ALeftPos, int ARightPos);
extern PACKAGE int __fastcall CompareDXFPointByXCoord(void * Item1, void * Item2);
extern PACKAGE int __fastcall CompareDXFPointByYCoord(void * Item1, void * Item2);
extern PACKAGE int __fastcall CompareFPointByXCoord(void * Item1, void * Item2);
extern PACKAGE int __fastcall CompareFPointByYCoord(void * Item1, void * Item2);
extern PACKAGE void __fastcall ClearList(Classes::TList* AList);
extern PACKAGE void __fastcall ClearRecordList(Classes::TList* AList);
extern PACKAGE void __fastcall ClearRecordListOfList(Classes::TList* AListOfList);
extern PACKAGE void __fastcall ClearListWithNilCheck(Classes::TList* List);
extern PACKAGE void __fastcall FreeList(Classes::TList* &AList);
extern PACKAGE void __fastcall FreeRecordList(Classes::TList* &AList);
extern PACKAGE void __fastcall FreeRecordListOfList(Classes::TList* &AListOfList);
extern PACKAGE bool __fastcall FindAutoCADSHXPaths(Classes::TStringList* APaths);
extern PACKAGE double __fastcall Min(const double A, const double B);
extern PACKAGE double __fastcall Max(const double A, const double B);
extern PACKAGE int __fastcall MinI(const int A, const int B);
extern PACKAGE int __fastcall MaxI(const int A, const int B);
extern PACKAGE TFPoint __fastcall GetIntersectingPoint(const TsgLine &Line1, const TsgLine &Line2, TIntersectionMode &IntersectionMode);
extern PACKAGE TsgLine __fastcall GetIntresectingRectAndLine(const TFRect &ARect, const TsgLine &ALine, TIntersectionMode &IntersectionMode);
extern PACKAGE Extended __fastcall MaxTsgFloat(void);
extern PACKAGE double __fastcall DistanceF(const TFPoint &APoint1, const TFPoint &APoint2);
extern PACKAGE double __fastcall DistanceI(const Types::TPoint &APoint1, const Types::TPoint &APoint2);
extern PACKAGE void __fastcall SwapInts(void *A, void *B);
extern PACKAGE bool __fastcall IsEqual(const double AVal1, const double AVal2);
extern PACKAGE bool __fastcall IsEqualPoints(const Types::TPoint &Point1, const Types::TPoint &Point2);
extern PACKAGE bool __fastcall IsEqualFPoints(const TFPoint &Point1, const TFPoint &Point2);
extern PACKAGE bool __fastcall IsEqualF2DPoints(const TF2DPoint &Point1, const TF2DPoint &Point2);

}	/* namespace Sgconsts */
using namespace Sgconsts;
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// sgConsts
