////////////////////////////////////////////////////////////////////////////////
//  System: K- API
//  Module: LtDefine
////////////////////////////////////////////////////////////////////////////////
unit LtDefine;

{$ALIGN OFF}

interface

uses
  Windows, LDefin2D;

type
  Reference = Longint;  
  PIUnknown = ^IUnknown;

//-------------------------------------------------------------------------------
//    
// ---
  TType1 = record
    xBase, yBase : Double;
    ang          : Double;
    scale        : Double;
    gr           : Reference;
  end;


//-------------------------------------------------------------------------------
//   
// ---
  TType2 = record
    xBase, yBase : Double;
  end;


//-------------------------------------------------------------------------------
//   
//    c  
// ---
  TType3 = record
    xBase, yBase : Double;
    ang          : Double;
  end;


//-------------------------------------------------------------------------------
//     c  
// ---
  TType5 = record
    xBase, yBase : Double;
    ang          : Double;
    horizon      : Byte; // 1     ; 0 - 
  end;
  

//-------------------------------------------------------------------------------
//   (  ,    )
// ---
  TType6 = record
    gr : Reference;  //    ,     
  end;
  

//-------------------------------------------------------------------------------
//
// ---
  PPhantom = ^Phantom;
  Phantom = record
  Case phType : Word of  //  
    1: (type1 : TType1); //    phType =1
    2: (type2 : TType2); //        phType =2
    3: (type3 : TType3); //  phType =3
    4: (type4 : TType3); //     phType =4
    5: (type5 : TType5); //   phType =5
    6: (type6 : TType6); //   (  ,    ) phType =6
    7: (type7 : TType2); //    phType =7
  end;


//-------------------------------------------------------------------------------
//  
// ---
  PPlacementParam  = ^PlacementParam;
  PlacementParam  = record
    xBase, yBase : Double; //     
    scale        : Double; // 
    ang          : Double; //     
  end;


//-------------------------------------------------------------------------------
//   
// ---
  PViewParam = ^ViewParam;
  ViewParam = record
    state : Word;   //  
    x,y   : Double; //   
    scale : Double; //  
    ang   : Double; //   
    color : Dword;  //     
    name  : array[0..TEXT_LENGTH-1] of char; //  
  end;


//-------------------------------------------------------------------------------
//    ( Unicode )
// ---
  PViewParamW = ^ViewParamW;
  ViewParamW = record
    state : Word;   //  
    x,y   : Double; //   
    scale : Double; //  
    ang   : Double; //   
    color : Dword;  //     
    name  : array[0..TEXT_LENGTH-1] of WideChar; //  
  end;


//-------------------------------------------------------------------------------
// C  
// ---
  PLayerParam = ^LayerParam;
  LayerParam = record
    state : Word;  //  
    color : DWord; //     
    name  : array[0..TEXT_LENGTH-1] of char; //  
  end;


//-------------------------------------------------------------------------------
// C   ( Unicode )
// ---
  PLayerParamW = ^LayerParamW;
  LayerParamW = record
    state : Word;  //  
    color : DWord; //     
    name  : array[0..TEXT_LENGTH-1] of WideChar; //  
  end;


//-------------------------------------------------------------------------------
//      :
// Cursor, Placement, CommandWindow
// ---
  PRequestInfo = ^RequestInfo;
  RequestInfo = record
    title        : PChar;   //      
    commands     : PChar;   //      
    prompt       : PChar;   //    
    cursor       : PChar;   //       
    callBack     : Pointer; //     
    _dynamic     : Integer; //    1- , 0-
    commInstance : HINST;   // Instance ,     
  end;

//-------------------------------------------------------------------------------
//      (Unicode):
// Cursor, Placement, CommandWindow
// ---
  PRequestInfoW = ^RequestInfoW;
  RequestInfoW = record
    title        : PWideChar; //      
    commands     : PWideChar; //      
    prompt       : PWideChar; //    
    cursor       : PWideChar; //       
    callBack     : Pointer;   //     
    _dynamic     : Integer;   //    1- , 0-
    commInstance : HINST;     // Instance ,     
  end;


//-------------------------------------------------------------------------------
//       .
//   1,    ,
//                    0,    .
// ---
  PTCursorCallBack = ^TCursorCallBack;
  TCursorCallBack =  function ( _dynamic  : Integer;      //   
                                phantom   : Pointer;      //    
                                info      : PRequestInfo; //        
                                var y,x   : Double;       //   
                                com       : Integer
                              ): Integer;  Pascal;  //     

//-------------------------------------------------------------------------------
//       .  (Unicode)
//   1,    ,
//                    0,    .
// ---
  PTCursorCallBackW = ^TCursorCallBackW;
  TCursorCallBackW =  function ( _dynamic  : Integer;       //   
                                 phantom   : Pointer;       //    
                                 info      : PRequestInfoW; //        
                                 var y,x   : Double;        //   
                                 com       : Integer
                               ): Integer;  Pascal;         //     


//-------------------------------------------------------------------------------
//         .
//   1,    ,
//                    0,    .
// ---
  PTPlacementCallBack = ^TPlacementCallBack;
  TPlacementCallBack = function ( _dynamic:  Integer;       //   
                                   phantom:  Pointer;       //    
                                   info:     PRequestInfo;  //        
                                   var angl: Double;        //  
                                   var y, x: Double;        //   
                                   com:      Integer        //     
                                ): Integer;  Pascal;

//-------------------------------------------------------------------------------
//         . (Unicode)
//   1,    ,
//                    0,    .
// ---
  PTPlacementCallBackW = ^TPlacementCallBackW;
  TPlacementCallBackW = function ( _dynamic:  Integer;       //   
                                    phantom:  Pointer;       //    
                                    info:     PRequestInfoW; //        
                                    var angl: Double;        //  
                                    var y, x: Double;        //   
                                    com:      Integer        //     
                                 ): Integer;  Pascal;

//-------------------------------------------------------------------------------
//       .
//   1,    ,
//                    0,    .
// ---
  PTCommandWindowCallBack = ^TCommandWindowCallBack;
  TCommandWindowCallBack  = function ( info: PRequestInfo; //        
                                       com:  Integer
                                     ): Integer; Pascal; //     


//-------------------------------------------------------------------------------
//       .
//   1,    ,
//                    0,    .
// ---
  PTCommandWindowCallBackW = ^TCommandWindowCallBackW;
  TCommandWindowCallBackW  = function ( info: PRequestInfoW; //        
                                        com:  Integer
                                      ): Integer; Pascal;    //     


//-------------------------------------------------------------------------------
//          
//   1,    ,
//                    0,    .
// ---
  PTFilePreviewFuncCallBack = ^TFilePreviewFuncCallBack;
  TFilePreviewFuncCallBack = function( fileName: PChar;  //   
			      	                         HWindow: HWND
			      	                       ): Integer; pascal; // ,      


//-------------------------------------------------------------------------------
//          
//   1,    ,
//                    0,    .
// ---
  PTFilePreviewFuncCallBackW = ^TFilePreviewFuncCallBackW;
  TFilePreviewFuncCallBackW = function( fileName: PWideChar;  //   
			      	                          HWindow: HWND
			      	                         ): Integer; pascal;    // ,      


//-------------------------------------------------------------------------------
//      
// ---
  PDeleteFunc = ^DeleteFunc;
  DeleteFunc = procedure( v: Pointer ); pascal;


//-------------------------------------------------------------------------------
//   
//  style  (   ) :
//  1  - ,
//  2  - ,
//  3  - ,
//  4  - ,
//  5  -  
//  6  -  ,
//  7  - ,
//  8  - -  2 ,
//  9  -  
//  10 - 
//  11 -,   
// ---
PLineSegParam = ^LineSegParam;
LineSegParam  = record
  x1,y1 : Double;       // 
  x2,y2 : Double;       // 
  style : Word;         // 
end;


//-------------------------------------------------------------------------------
//     
// ---
PArcParam = ^ArcParam;
ArcParam  = record
  xc,yc : double;       //
  rad   : double;       //
  ang1  : double;       // 
  ang2  : double;       // 
  dir   : SmallInt;     //
  style : Word;         // 
end;


//-------------------------------------------------------------------------------
//     
// ---
PArcParam1 = ^ArcParam1;
ArcParam1  = record
  xc,yc : Double;  //
  rad   : Double;  //
  x1,y1 : Double;  // 
  x2,y2 : Double;  // 
  dir   : SmallInt;//
  style : Word;    // 
end;


//-------------------------------------------------------------------------------
//   
// ---
PCircleParam = ^CircleParam;
CircleParam = record
  xc,yc : Double; //
  rad   : Double; //
  style : Word;   // 
end;


//-------------------------------------------------------------------------------
//    
// ---
PMathPointParam = ^MathPointParam;
MathPointParam = record
  x, y : Double;      // 
end;


//-------------------------------------------------------------------------------
//    
// ---
PRectParam = ^RectParam;
RectParam = record
  pBot : MathPointParam;  //   
  pTop : MathPointParam;  //   
end;


//-------------------------------------------------------------------------------
//  style  (   ) :
// 0 - 
// 1 - 
// 2 - -
// 3 - 
// 4 - 
// 5 - 
// 6 - 
// 7 -  
// 8 -  
//    
// ---
PPointParam = ^PointParam;
PointParam = record
  x, y 	 : Double;  // 
  style  : Word;    // 
end;


//-------------------------------------------------------------------------------
//        Bezier - 
// ---
PBezierPointParam = ^BezierPointParam;
BezierPointParam = record
  x, y  : Double;       //  
  ang   : Double;       //       
  left  : Double;       //       
  right : Double;       //       
end;


//-------------------------------------------------------------------------------
//        Nurbs - 
// ---
PNurbsPointParam = ^NurbsPointParam;
NurbsPointParam = record
  x, y   : Double;     //  
  weight : Double;     //    > 0
end;


//-------------------------------------------------------------------------------
//    bezier 
// ---
PBezierParam = ^BezierParam;
BezierParam = record
  pMathPoint : Reference; //       
  closed     : Byte;      //   0-  1- 
  style      : Word;      // 
end;


//-------------------------------------------------------------------------------
//     
// ---
PLineParam = ^LineParam;
LineParam  = record
  x, y	: Double; //   
  ang 	: Double; //    X
end;


//-------------------------------------------------------------------------------
//    
// ---
PEllipseParam = ^EllipseParam;
EllipseParam = record
  xc, yc  : Double;     // 
  a, b    : Double;     // 
  ang     : Double;     //     X
  style   : Word;       // 
end;


//-------------------------------------------------------------------------------
//     
// ---
PEllipseArcParam = ^EllipseArcParam;
EllipseArcParam = record
  xc, yc     :  Double;   // 
  a, b       :  Double;   // 
  ang        :  Double;   //   (  a )   X
  angFirst   :  Double;   //     a
  angSecond  :  Double;   //      a
  dir        :  SmallInt; //
  style      :  Word;     // 
end;

//-------------------------------------------------------------------------------
//     
// ---
PEllipseArcParam1 = ^EllipseArcParam1;
EllipseArcParam1 = record
  xc, yc     :  Double;   // 
  a, b       :  Double;   // 
  ang        :  Double;   //   (  a )   X
  angFirst   :  Double;   //  
  angSecond  :  Double;   //  
  dir        :  SmallInt; //
  style      :  Word;     // 
end;

//-------------------------------------------------------------------------------
//    
// ---
PEquidistantParam = ^EquidistantParam;
EquidistantParam = record
  geoObj     :   Reference; //   -  
  side       :   Byte;      // ,     
                            // 0-  , 1-  , 2-  
  cutMode    :   Byte;      //    
                            // 0- , 1-  
  degState   :   Byte;      //     
                            // 0-  , 1-  
  radRight   :   Double;    //      
  radLeft    :   Double;    //   
  style      :   Word;      //  
end;


//-------------------------------------------------------------------------------
//  style  (   ) :
// 0  - 
// 1  - 
// 2  - 
// 3  -  
// 4  - 
// 5  - 
// 6  - 
// 7  - 
// 8  -  
// 9  -  
// 10 -  
// 11 - 
// 12 -  
// 13 -    
// 14 - 
//
//    
// ---
PHatchParam = ^HatchParam;
HatchParam = record
  style         :  Word;      // 
  ang           :  Double;    //  
  step          :  Double;    // 
  width         :  Double;    // , 0- 
  x, y          :  Double;    //  (   )
  pBoundaries   :  Reference; // - ;    GetObjParam
end;


//-------------------------------------------------------------------------------
//  style  (   ) :
// 0 -     
// 1   
// 2     
// 3   
// 4   
// 5       (  )
// 6       ( \  )
// 7       (  )
// 8     
// 9     (  )
// 10    (  )
// 11    
// 12    
// 13     
//
//   
// ---
PParagraphParam = ^ParagraphParam;
ParagraphParam = record
  style   : Word;   //   ,  0 -  
  x, y    : Double; //   
  ang     : Double; //   
  hFormat : Cardinal;   //    0-   1-  2-   
  vFormat : Cardinal;   //    0-   1-  
  width   : Double; //   
  height  : Double; //   
end;


//-------------------------------------------------------------------------------
//   
// ---
PTextParam = ^TextParam;
TextParam = record
  par        : ParagraphParam; //  
  pTextLine  : Reference;      //       TEXT_LINE_ARR
end;


//-------------------------------------------------------------------------------
//    
// ---
PTextLineParam = ^TextLineParam;
TextLineParam = record
  style       : Word;      //    ,  0 -  
  pTextItem   : Reference; //        TEXT_ITEM_ARR
end;


//-------------------------------------------------------------------------------
//      
// ---
PTextItemFont = ^TextItemFont;
TextItemFont = record
  fontName     : array[0..MAX_TEXT_LENGTH-1] of Char; //  
  height       : Double;                              //  
  ksu          : Double;                              //  
  color        : DWord;                               // 
  bitVector    : Cardinal;                            //   (, , ,   (, ,   ))
end;


//-------------------------------------------------------------------------------
//       ( Unicode )
// ---
PTextItemFontW = ^TextItemFontW;
TextItemFontW = record
  fontName     : array[0..MAX_TEXT_LENGTH-1] of WideChar; //  
  height       : Double;                                  //  
  ksu          : Double;                                  //  
  color        : DWord;                                   // 
  bitVector    : Cardinal;                                //   (, , ,   (, ,   ))
end;


//-------------------------------------------------------------------------------
//     
// ---
PTextItemParam = ^TextItemParam;
TextItemParam = record
  tip      : Integer;                          // tip = SPECIAL_SYMBOL , FONT_SYMBOL, FRACTION_TYPE, SUM_TYPE   0
  font     : TextItemFont;                     //     
  s        : array [0..TEXT_LENGTH-1] of Char; //      
  iSNumb   : Cardinal;                         //  ,               0
end;


//-------------------------------------------------------------------------------
//     
// ---
PTextItemParamW = ^TextItemParamW;
TextItemParamW = record
  tip      : Integer;                              // tip = SPECIAL_SYMBOL , FONT_SYMBOL, FRACTION_TYPE, SUM_TYPE   0
  font     : TextItemFontW;                        //     
  s        : array [0..TEXT_LENGTH-1] of WideChar; //      
  iSNumb   : Cardinal;                             //  ,               0
end;


//-------------------------------------------------------------------------------
//    
// ---
PStandartSheet = ^StandartSheet;
StandartSheet = record
  format   : Byte;   //    0(0) ... 4(4)
  multiply : Byte;   //  
  direct   : Byte;   //   0   
end;


//-------------------------------------------------------------------------------
//        -    GetObjParam()
//  SetObjParam();   
// ---
PSheetSize = ^SheetSize;
SheetSize = record
  width  : Double;  //  
  height : Double;  //  
end;


//-------------------------------------------------------------------------------
//   
// ---
PSheetPar = ^SheetPar;
SheetPar = record
  layoutName : array [0..MAX_TEXT_LENGTH-1] of Char; //   -   ( );   - GRAPHIC.LYT
                                                     //   -        - GRAPHIC.LYT
                                    //   -   
  case shtType : Byte of           //  -   (1-13-  )
    1: ( stPar : StandartSheet );  //
    2: ( usPar : SheetSize );
end;


//-------------------------------------------------------------------------------
//    ( Unicode )
// ---
PSheetParW = ^SheetParW;
SheetParW = record
  layoutName : array [0..MAX_TEXT_LENGTH-1] of WideChar; //   -   ( );   - GRAPHIC.LYT
                                                         //   -        - GRAPHIC.LYT
                                   //   -   
  case shtType : Byte of           //  -   (1-13-  )
    1: ( stPar : StandartSheet );  //
    2: ( usPar : SheetSize );
end;


//-------------------------------------------------------------------------------
//   
// ---
PSheetOptions = ^SheetOptions;
SheetOptions = record
  sheetPar : SheetPar;  //    ( API)
  docType  : Byte;      //    DocType
end;


//-------------------------------------------------------------------------------
//    
// ---
POverlapObjectOptions = ^OverlapObjectOptions;
OverlapObjectOptions = record
  overlap : Byte;       // 1 -      ,  0 -  
  gap     : Double;     //    
end;


//-------------------------------------------------------------------------------
//    (    ,    )
// ---
PDocumentParam = ^DocumentParam;
DocumentParam = record
  regim      : Byte;   //  0 -  ,
                       //  1 -  

  fileName   : array [0..MAX_TEXT_LENGTH-1] of Char;  //    
  comment    : array [0..TEXT_LENGTH-1]     of Char;  // 
  author     : array [0..TEXT_LENGTH-1]     of Char;  // 
  layoutName : array [0..MAX_TEXT_LENGTH-1] of Char;  //    

  shtType    : cardinal;                              //  -   (1-13-  )
                                                      //   -   

  case _type : Byte of           //  
  1: ( stPar : StandartSheet );  //   1-  
  2: ( usPar : SheetSize     );  //               2-  
                                 //               3- 
                                 //               4- 
end;


//-------------------------------------------------------------------------------
//    (    ,    )
// ---
PDocumentParamW = ^DocumentParamW;
DocumentParamW = record
  regim      : Byte;   //  0 -  ,
                       //  1 -  

  fileName   : array [0..MAX_TEXT_LENGTH-1] of WideChar;  //    
  comment    : array [0..TEXT_LENGTH-1]     of WideChar;  // 
  author     : array [0..TEXT_LENGTH-1]     of WideChar;  // 
  layoutName : array [0..MAX_TEXT_LENGTH-1] of WideChar;  //    

  shtType    : cardinal;                              //  -   (1-13-  )
                                                      //   -   

  case _type : Byte of           //  
  1: ( stPar : StandartSheet );  //   1-  
  2: ( usPar : SheetSize     );  //               2-  
                                 //               3- 
                                 //               4- 
end;


//-------------------------------------------------------------------------------
//       
// ---
PColumnInfo = ^ColumnInfo;
ColumnInfo = record
  header          : array [0..80-1] of Char;          // o- 
  _type           : Byte;                           //    
  key             : Byte;                           //  ,        
  def             : array [0..TEXT_LENGTH-1] of Char; //   
  flagEnum        : Byte;                           //   ,    
                                                    //       1  0 
  fieldEnum       : Reference;                      //     ()
  columns         : Reference;                      //        
end;


//-------------------------------------------------------------------------------
//         ( Unicode )
// ---
PColumnInfoW = ^ColumnInfoW;
ColumnInfoW = record
  header          : array [0..80-1] of WideChar;          // o- 
  _type           : Byte;                                 //    
  key             : Byte;                                 //  ,        
  def             : array [0..TEXT_LENGTH-1] of WideChar; //   
  flagEnum        : Byte;                                 //   ,    
                                                          //       1  0 
  fieldEnum       : Reference;                            //     ()
  columns         : Reference;                            //        
end;


//-------------------------------------------------------------------------------
//    
// ---
PksAttributeType = ^ksAttributeType;
ksAttributeType = record
  key1          : Cardinal;     // .   
  key2          : Cardinal;     // .   
  key3          : Cardinal;     // .   
  key4          : Cardinal;     //   
                                //   0  1000 
                                //   ""
  header        : array [0..80-1] of Char; // o- 
  rowsCount     : Cardinal;                // -   
  flagVisible   : Byte;                    // ,     
  password      : array [0..10-1] of Char; // ,      -     
  columns       : Reference;               //      
end;


//-------------------------------------------------------------------------------
//    
// ---
PksAttributeTypeW = ^ksAttributeTypeW;
ksAttributeTypeW = record
  key1          : Cardinal;     // .   
  key2          : Cardinal;     // .   
  key3          : Cardinal;     // .   
  key4          : Cardinal;     //   
                                //   0  1000 
                                //   ""
  header        : array [0..80-1] of WideChar; // o- 
  rowsCount     : Cardinal;                    // -   
  flagVisible   : Byte;                        // ,     
  password      : array [0..10-1] of WideChar; // ,      -     
  columns       : Reference;                   //      
end;


//-------------------------------------------------------------------------------
//    
// ---
PAttribute = ^Attribute;
Attribute = record
  key1        : Cardinal;     // .   
  key2        : Cardinal;     // .   
  key3        : Cardinal;     // .   
  key4        : Cardinal;     //   
                              //   0  1000 
                              //   ""
  flagVisible : PChar;        //,    
                              //  -
                              //0 -  1-  
  values      : Pointer;               //     
                              //     1- ,
                              //     2-   ..
  valSize     : Cardinal;     //    
  password    : array[0..10-1] of Char; // 
end;


//-------------------------------------------------------------------------------
//    
// ---
PksAttribute = ^ksAttribute;
ksAttribute = record
  key1        : Cardinal;     // .   
  key2        : Cardinal;     // .   
  key3        : Cardinal;     // .   
  key4        : Cardinal;     //   
                              //   0  1000 
                              //   ""
  flagVisible : PChar;        //,    
                              //  -
                              //0 -  1-  
  values      : Pointer;               //     
                              //     1- ,
                              //     2-   ..
  valSize     : Cardinal;     //    
  password    : array[0..10-1] of Char; //  
  columnKeys  : PChar;        //   
end;


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PksAttributeW = ^ksAttributeW;
ksAttributeW = record
  key1        : Cardinal;     // .   
  key2        : Cardinal;     // .   
  key3        : Cardinal;     // .   
  key4        : Cardinal;     //   
                              //   0  1000 
                              //   ""
  flagVisible : PChar;        //,    
                              //  -
                              //0 -  1-  
  values      : Pointer;               //     
                              //     1- ,
                              //     2-   ..
  valSize     : Cardinal;     //    
  password    : array[0..10-1] of WideChar; //  
  columnKeys  : PChar;        //   
end;


//-------------------------------------------------------------------------------
//       
// ---
PLibraryAttrTypeParam = ^LibraryAttrTypeParam;
LibraryAttrTypeParam  = record
  name     : array [0..MAX_TEXT_LENGTH-1] of Char; //    
  typeId   : double;                               //     
end;


//-------------------------------------------------------------------------------
//       
// ---
PLibraryAttrTypeParamW = ^LibraryAttrTypeParamW;
LibraryAttrTypeParamW  = record
  name     : array [0..MAX_TEXT_LENGTH-1] of WideChar; //    
  typeId   : double;                                   //     
end;


//-------------------------------------------------------------------------------
//    
// ---
CON = record
  xc, yc         : Double ;        //  
  x1, y1, x2, y2 : Double ;        //  
end;


//-------------------------------------------------------------------------------
//
// ---
CON4 = Array[ 1..4 ] of CON;
CON8 = Array[ 1..8 ] of CON;


//-------------------------------------------------------------------------------
//    
// ---
TAN = record
x1, y1, x2, y2 :  Double ;  //  
end;


//-------------------------------------------------------------------------------
//
// ---
TAN4 = Array[0..4] of TAN;


//-------------------------------------------------------------------------------
//    
// ---
PDimText = ^DimText;
DimText = record
  style        :  Word;        //   ,  0 - 
  sign         :  Cardinal;        //      0- 1 - , 2-  3-   > 3 -    "Symbol type A"
  bitFlag      :  Cardinal;        // 0 -      
  pText        :  Reference;   //   
                               //        
                               //  :  PREFIX, , TOLERANCE,
                               //  ,  , UNIT,SUFFIX,
                               //  ,   , 
                               //  TOLERANCE    DEVIATION  - 
                               //   
                               //  
  stringFlag    : Byte;        // 0- pText  CHAR_STR_ARR  CHAR_STR_ARR_W -     
                               // 1- pText  TEXT_LINE_ARR -     -  TextLineParam
                               //   GetObjParam    ,  0 -      
end;


//-------------------------------------------------------------------------------
//      
// ---
PLDimSource = ^LDimSource;
LDimSource = record
  ps          :  Byte;   //  0-, 1- 2 - ., 3 -  dx,dy
  x1, y1      :  Double; //    1 -  
  x2, y2      :  Double; //    2 -  
  dx, dy      :  Double; //     ;  (     )
  basePoint   :  Byte;   //  1-dx, dy -   , 2-  
end;


//-------------------------------------------------------------------------------
//      
// ---
PDimDrawing = ^DimDrawing;
DimDrawing = record
  pl1        :  Byte;      //  ./.   1    0/1
  pl2        :  Byte;      //  ./.   2    0/1
//  
// 0 -   1 - ( ) 2 - ( ) 3 -  4 -  
// 5 -    6 -    7 -    8 -   
// 9 -  90   10 -  90   11 -  (      )
// 12 -   (   0.6    )
  pt1        :  Byte;      //    1-  
  pt2        :  Byte;      //    2-  
  textPos    :  Integer;   //  ; 0-    
                           //  - . . .- . ; >0    1   2;   (     )
  textBase   :  Byte;      //   : 0  ,  1- textPos  1 ;
                           // 2 - textPos  2 ; 3-   
  shelfDir   :  Integer;   //       X   0-   -1-  1- 
  ang        :  Double;    //   
  length     :  Integer;   //  ;  (     )
end;


//-------------------------------------------------------------------------------
//    
// ---
PLDimParam =^LDimParam;
LDimParam = record
  tPar   :  DimText;     //                        3
  dPar   :  DimDrawing;  //             2
  sPar   :  LDimSource;  //       1
end;


//-------------------------------------------------------------------------------
//        
// ---
PLBreakDimSource = ^LBreakDimSource;
LBreakDimSource  = record
  x1, y1 : Double;           //    1 -  
  x2, y2 : Double;           //     
  x3, y3 : Double;           //       
end;


//-------------------------------------------------------------------------------
//        
// ---
PBreakDimDrawing = ^BreakDimDrawing;
BreakDimDrawing  = record
  pl       : Byte;      //  ./.       0/1
//  
// 0 -   1 - ( ) 2 - ( ) 3 -  4 -  
// 5 -    6 -    7 -    8 -   
// 9 -  90   10 -  90   11 -  (      )
// 12 -   (   0.6    )
  pt       : Byte;      //    1-  
  textPos  : Integer;   //  ; 0-    
                        //  - . . ; >0    1   2;   (     )
  shelfDir : Integer;   //       X   0-   -1-  1- 
                        // 2-     3-   
  ang      : Double;    //   
  length   : Integer;   //  ;  (     )
end;


//-------------------------------------------------------------------------------
//     c 
// ---
PLBreakDimParam = ^LBreakDimParam;
LBreakDimParam  = record
  tPar : DimText;          //                        3
  dPar : BreakDimDrawing;  //             2
  sPar : LBreakDimSource;  //       1
end;


//-------------------------------------------------------------------------------
//     
// ---
PADimSource = ^ADimSource;
ADimSource = record
  xc, yc   :   Double;   //   
  rad      :   Double;   //   ;   (     )
  ang1     :   Double;   //     
  ang2     :   Double;   //     
  dir      :   Integer;  //  1 -     ; -1 -   
  x1, y1   :   Double;   //     
  x2, y2   :   Double;   //     
end;


//-------------------------------------------------------------------------------
//    
// ---
PADimParam = ^ADimParam;
ADimParam = record
  tPar   :  DimText;     //                        3
  dPar   :  DimDrawing;  //             2
  sPar   :  ADimSource;  //        1
end;


//-------------------------------------------------------------------------------
//     c 
// ---
PABreakDimParam = ^ABreakDimParam;
ABreakDimParam  = record
  tPar : DimText;          //                        3
  dPar : BreakDimDrawing;  //             2
  sPar : ADimSource;       //       1
end;


//-------------------------------------------------------------------------------
//      
// ---
PRDimSource = ^RDimSource;
RDimSource = record
  xc, yc   : Double;       //   , 
  rad      : Double;       //  , 
end;


//-------------------------------------------------------------------------------
//       
// ---
PRDimDrawing = ^RDimDrawing;
RDimDrawing = record
//    1-  
// 0 -   1 - ( ) 2 - ( ) 3 -  4 -  
// 5 -    6 -    7 -    8 -   
// 9 -  90   10 -  90   11 -  (      )
// 12 -   (   0.6    )
// 0xff -   ( )
  pt1       :  Byte;    //  1- 
  pt2       :  Byte;    // ( ) 2- ,(  ) 0 -    1-   
  textPos   :  Integer; //      ;  (     )
  shelfDir  :  Integer; //       X   0-   -1-  1- 
  ang       :  Double;  //      
end;


//-------------------------------------------------------------------------------
//         
// ---
PRDimParam = ^RDimParam;
RDimParam = record
  tPar    :  DimText;      //                                          3
  dPar    :  RDimDrawing;  //                               2
  sPar    :  RDimSource;   //       1
end;


//-------------------------------------------------------------------------------
//      
// ---
PRBreakDrawing = ^RBreakDrawing;
RBreakDrawing = record
//    1-  
// 0 -   1 - ( ) 2 - ( ) 3 -  4 -  
// 5 -    6 -    7 -    8 -   
// 9 -  90   10 -  90   11 -  (      )
// 12 -   (   0.6    )
  pt     :  Byte;     //  
  ang    :  Double;   //    
  pb     :  Cardinal; //  ;  (     )
end;


//-------------------------------------------------------------------------------
//      
// ---
PRBreakDimParam = ^RBreakDimParam;
RBreakDimParam = record
  sPar : RDimSource;    //        1
  dPar : RBreakDrawing; //             2
  tPar : DimText;       //                        3
end;


//-------------------------------------------------------------------------------
//    
// ---
PRoughPar = ^RoughPar;
RoughPar = record
  style      :     Word;        //  ,  0 -  ,
                                //  style = INDICATIN_TEXT_LINE_ARR -> pText-  TEXT_LINE_ARR
  _type      :     Byte;        //    0- -  - 1- -   
                                // 2 --    
  around     :     Byte;        // =1 -  " "
  x, y       :     Double;      //   
  ang        :     Double;      //        X
  cText0     :     Byte;        //       ( -   2789-73)
  cText1     :     Byte;        //       ( -  ,)
  cText2     :     Byte;        //       (    2789-73)
                                //   2 
  cText3     :     Byte;        //       (.. )
                                //   1 
  pText      :     Reference;   //  style = INDICATIN_TEXT_LINE_ARR , TEXT_LINE_ARR -    
                                // CHAR_STR_ARR  CHAR_STR_ARR_W -      
                                //  4    ;
                                //      
                                // -   ( -   2789-73) - cText0=0 -  
                                // -   ( -  ,)        - cText1=0 -  
                                // -   (    2789-73)    - cText2=0 -  
                                // -   (.. )- cText3=0 -  
end;


//-------------------------------------------------------------------------------
//    
// ---
PShelfPar = ^ShelfPar;
ShelfPar = record
  psh       :  Integer;   //   X   0-   -1-  1- 
  ang       :  Double;    //        
                          //      
  length    :  Integer;   // 
end;


//-------------------------------------------------------------------------------
//   
// ---
PRoughParam = ^RoughParam;
RoughParam = record
  rPar    :   RoughPar;
  shPar   :   ShelfPar; //   
end;


//-------------------------------------------------------------------------------
//     
// ---
PLeaderParam = ^LeaderParam;
LeaderParam = record
  x, y       :    Double;    //    (   )

	//   0 -   1 -  2 -  3 -    4 -   
  //             5 -   90 6 -   7 -   8 -  (     )
  //             9 -   ( = 0.6    ) 10 -    60 11 -    90
  arrowType  :    Byte;      //  

  dirX       :    Integer;   //    X (1 - -1-)
  signType   :    Byte;      //   0-  1-  2- 
                             // 3-   4 -   .
                             // 5 -    .
                             // 6 -   
  around     :    Byte;      //     0- 1- 
  cText0     :    Byte;      //      0-  
  cText1     :    Byte;      //      0-  
  cText2     :    Byte;      //      (  1 )0-  
  cText3     :    Byte;      //      (  1 )0-  
  pTextline  :    Reference; // TEXT_LINE_ARR -    
                             //  4     
                             //      
                             // -    - cText0=0 -  
                             // -    - cText1=0 -  
                             // -    - cText2=0 -  
                             // -    - cText3=0 -  
  pPolyline  :    Reference; // POLYLINE_ARR -      
                             //      -  
                             //     (       -    ),
                             //   - (  )
                             //   -   (  )
end;


//-------------------------------------------------------------------------------
//      
// ---
PPosLeaderParam = ^PosLeaderParam;
PosLeaderParam = record
  style     : Word;      //  ,  0 -  ,
                         //  style = INDICATIN_TEXT_LINE_ARR -> pText-  TEXT_LINE_ARR
  x, y      : Double;    //    (    )
  //   0 -   1 -  2 - 
  //             3 -   90 4 -   5 -  
  //             6 -  (     )
  //             7 -   ( = 0.6    )
  arrowType : Byte;      //  
  dirX      : Integer;   //    X (1 - -1-)
  dirY      : Integer;   //     Y (1 - -1-)
  pText     : Reference; //  style = INDICATIN_TEXT_LINE_ARR , TEXT_LINE_ARR -    
                         // CHAR_STR_ARR  CHAR_STR_ARR_W -    
                         //      
  pPolyline : Reference; // POLYLINE_ARR -      
                         //      -  
                         //     (       -    ),
                         //   - (  )
                         //   -   (  )
end;


//-------------------------------------------------------------------------------
//      
// ---
PBrandLeaderParam = ^BrandLeaderParam;
BrandLeaderParam = record
  dirX      : Integer;   //    X (1 - -1-)
  x, y      : Double;    //    (    )
  arrowType : Byte;      //  
  style1    : Word;      //      ,  0 -  
                         //  style1 = INDICATIN_TEXT_LINE_ARR -> pText-  TEXT_LINE_ARR
  style2    : Word;      //      ,  0 -  
  cText0    : Byte;      //      (  1 )0-  
  cText1    : Byte;      //      (  1 )0-  
  cText2    : Byte;      //      (  1 )0-  
  pText     : Reference; //  style1 = INDICATIN_TEXT_LINE_ARR , TEXT_LINE_ARR -    
                         // CHAR_STR_ARR  CHAR_STR_ARR_W -    
                         //      
                         //   
                         //   
                         //   
  pPolyline : Reference; // POLYLINE_ARR -      
                         //      -  
                         //     (       -    ),
                         //   - (  )
                         //   -   (  )
end;


//-------------------------------------------------------------------------------
//      
// ---
PMarkerLeaderParam = ^MarkerLeaderParam;
MarkerLeaderParam = record
  x, y      : Double;    //    (    )
  arrowType : Byte;      //  
  style1    : Word;      //      ,  0 -  
                         //  style1 = INDICATIN_TEXT_LINE_ARR -> pText-  TEXT_LINE_ARR
  style2    : Word;      //      ,  0 -  
  cText0    : Byte;      //     (  1 )0-  
  cText1    : Byte;      //      (  1 )0-  
  cText2    : Byte;      //      (  1 )0-  
  pText     : Reference; //  style1 = INDICATIN_TEXT_LINE_ARR , TEXT_LINE_ARR -    
                         // CHAR_STR_ARR  CHAR_STR_ARR_W -    
                         //      
                         //   
                         //   
                         //   
  pPolyline : Reference; // POLYLINE_ARR -      
                         //      -  
                         //     (       -    ),
                         //   - (  )
                         //   -   (  )
end;


//-------------------------------------------------------------------------------
//       
// ---
PChangeLeaderParam = ^ChangeLeaderParam;
ChangeLeaderParam = record
  x, y         : Double;       //    (    )
  style        : Word;         //    
  signType     : Byte;         //  
  signHeight   : Double;       //  
  leaderLength : Double;       //   < 0   
  pText        : Reference;    //  style1 = INDICATIN_TEXT_LINE_ARR , TEXT_LINE_ARR -    
                               // CHAR_STR_ARR  CHAR_STR_ARR_W -    
                               //      
                               //   
                               //   
                               //   
  pPolyline    : Reference;    // POLYLINE_ARR -      
                               //      -  
                               //     (       -    ),
                               //   - (  )
                               //   -   (  )
end;


//-------------------------------------------------------------------------------
//  " "
// ---
PBaseParam = ^BaseParam;
BaseParam = record
  style  : Word;                          //  ,  0 -  
  x1, y1 : Double;                        //    (   )
  x2, y2 : Double;                        //    
  Case _type : Byte of                    // 0-     1-    
  0 : ( str      : array[0..50-1] of Char );// 
  1 : ( pTextItem: Reference );           //    TEXT_ITEM_ARR  ()
end;


//-------------------------------------------------------------------------------
//  " "  ( Unicode )
// ---
PBaseParamW = ^BaseParamW;
BaseParamW = record
  style  : Word;                          //  ,  0 -  
  x1, y1 : Double;                        //    (   )
  x2, y2 : Double;                        //    
  Case _type : Byte of                    // 0-     1-    
  0 : ( str      : array[0..50-1] of WideChar );// 
  1 : ( pTextItem: Reference );           //    TEXT_ITEM_ARR  ()
end;


//-------------------------------------------------------------------------------
//  " / "
// ---
PCutLineParam = ^CutLineParam;
CutLineParam = record
  style  : Word;                            //  ,  0 -  
  right  : Byte;                            //   0 / 1    
  x1, y1 : Double;                          //     
  x2, y2 : Double;                          //     
  pMathPoint : Reference;                   // POINT_ARR    .,  , .
  Case _type : Byte of                      // 0-     1-    
  0 : ( str       : array[0..50-1] of Char);  // 
  1 : ( pTextItem : Reference);             //     TEXT_ITEM_ARR  ()
end;


//-------------------------------------------------------------------------------
//  " / " ( Unicode )
// ---
PCutLineParamW = ^CutLineParamW;
CutLineParamW = record
  style  : Word;                            //  ,  0 -  
  right  : Byte;                            //   0 / 1    
  x1, y1 : Double;                          //     
  x2, y2 : Double;                          //     
  pMathPoint : Reference;                   // POINT_ARR    .,  , .
  Case _type : Byte of                      // 0-     1-    
  0 : ( str       : array[0..50-1] of WideChar);  // 
  1 : ( pTextItem : Reference);             //     TEXT_ITEM_ARR  ()
end;


//-------------------------------------------------------------------------------
//  " "
// ---
PViewPointerParam = ^ViewPointerParam;
ViewPointerParam = record
  style   : Word;                           //  ,  0 -  
  x1, y1  : Double;                         //  ( ) 
  x2, y2  : Double;                         //    
  xt, yt  : Double;                         //  
  Case _type : Byte of                      // 0-     1-    
  0 : ( str       : array[0..50-1] of Char);  // 
  1 : ( pTextItem : Reference);             //     TEXT_ITEM_ARR  ()
end;


//-------------------------------------------------------------------------------
//  " " ( Unicode )
// ---
PViewPointerParamW = ^ViewPointerParamW;
ViewPointerParamW = record
  style   : Word;                           //  ,  0 -  
  x1, y1  : Double;                         //  ( ) 
  x2, y2  : Double;                         //    
  xt, yt  : Double;                         //  
  Case _type : Byte of                      // 0-     1-    
  0 : ( str       : array[0..50-1] of WideChar);  // 
  1 : ( pTextItem : Reference);             //     TEXT_ITEM_ARR  ()
end;


//-------------------------------------------------------------------------------
//    
// ---
PToleranceBranch = ^ToleranceBranch;
ToleranceBranch  = record
  arrowType   :  Byte;      //    1-  2-  0- 
  tCorner     :  Byte;      // 1-8       
  pMathPoint  :  Reference; //     ( POINT_ARR  )
                            //   -   (       -  tCorner1),
                            //   - (  )
                            //   -   (  )
end;


//-------------------------------------------------------------------------------
//  " "
// ---
PToleranceParam = ^ToleranceParam;
ToleranceParam = record
  tBase     : Byte;            // 1-8      ( 1-      3..4..5  )
  style     : Word;            //  ,  0 -                     :     :
  x, y      : Double;          //                                           2     6
  _type     : Byte;            //   0-  , 1-             :     :
  branch1   : ToleranceBranch; //                                                      1..8..7
  branch2   : ToleranceBranch; //  
end;


//-------------------------------------------------------------------------------
//     
// ---
PCurvePattern = ^CurvePattern;
CurvePattern = record
  visibleSeg   : Double;     //  
  invisibleSeg : Double;     //  
end;


//-------------------------------------------------------------------------------
//    
// ---
PCurvePicture = ^CurvePicture;
CurvePicture = record
  polygon : Reference;        //  ,   POLYLINE_ARR   (      0 )
  fill    : Reference;        //  ,    POLYLINE_ARR (     0 )
end;


//-------------------------------------------------------------------------------
//      
// ---
PCurvePatternEx = ^CurvePatternEx;
CurvePatternEx = record
  visibleSeg    : Double;                        //  
  invisibleSeg  : Double;                        //  
  dx            : Double;                        // .()    
  dy            : Double;
  Case pictureType : Byte of                     // 
  0 : ( picture : CurvePicture);                 //pictureType 0 -     
  1 : ( frwName : array[0..TEXT_LENGTH-1] of Char);//pictureType 1     ,      AddStyle
end;


//-------------------------------------------------------------------------------
//      
// ---
PCurvePatternExW = ^CurvePatternExW;
CurvePatternExW = record
  visibleSeg    : Double;                              //   
  invisibleSeg  : Double;                              //   
  dx            : Double;                              //  .()    
  dy            : Double;
  Case pictureType : Byte of                           //  
  0 : ( picture : CurvePicture);                       // pictureType 0 -     
  1 : ( frwName : array[0..TEXT_LENGTH-1] of WideChar);// pictureType 1     ,      AddStyle
end;


//-------------------------------------------------------------------------------
//   
// ---
PCurveStyleParam = ^CurveStyleParam;
CurveStyleParam = record
  name 	      : array [0..TEXT_LENGTH-1] of Char; //  
  color       : DWord;                          // 
  paperWidth  : Double;                         //    
  screenWidth : Byte;                           //    
  curveType   : Byte;                           //   0-  1-  2-   
  pattern     : Reference;                      // (  )        CURVE_STYLE-CurvePattern,  CURVE_STYLE_EX -CurvePatternEx
  even        : Byte;                           // (  ) 1-     0-  
end;


//-------------------------------------------------------------------------------
//   
// ---
PCurveStyleParamW = ^CurveStyleParamW;
CurveStyleParamW = record
  name 	      : array [0..TEXT_LENGTH-1] of WideChar; //  
  color       : DWord;                                // 
  paperWidth  : Double;                               //    
  screenWidth : Byte;                                 //    
  curveType   : Byte;                                 //   0-  1-  2-   
  pattern     : Reference;                            // (  )        CURVE_STYLE-CurvePattern,  CURVE_STYLE_EX -CurvePatternEx
  even        : Byte;                                 // (  ) 1-     0-  
end;


//-------------------------------------------------------------------------------
//      (  -   )
// ---
PDimensionPartsParam = ^DimensionPartsParam;
DimensionPartsParam = record
  line1    :  Reference;  //   1
  line2    :  Reference;  //   2
  dimLine  :  Reference;  //   
  dimLine1 :  Reference;  //   
  leg      :  Reference;  // 
  shelf    :  Reference;  // 
  gr       :  Reference;  //      ,  
end;


//-------------------------------------------------------------------------------
//    
// ---
PTextStyleParam = ^TextStyleParam;
TextStyleParam = record
  name 	     :  array [0..TEXT_LENGTH-1] of Char; // 
  height     :  Double;                         // 
  ksu        :  Double;                         // 
  step       :  Double;                         // 
  fontName   :  array [0..TEXT_LENGTH-1] of Char; // 
  color      :  DWord;                          //
  align      :  Byte;                           // 0-, 1- ,2-, 3 -  
  bold       :  Byte;                           // 1- , 0- 
  italic     :  Byte;                           // 1-  , 0-  
  underline  :  Byte;                           // 1-  , 0 -  
  posKS      :  Double;                         //  
  stepParPre :  Double;                         // ,  
  stepParPst :  Double;                         //   
  leftEdge   :  Double;                         //  
  rightEdge  :  Double;                         //  
end;


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PTextStyleParamW = ^TextStyleParamW;
TextStyleParamW = record
  name 	     :  array [0..TEXT_LENGTH-1] of WideChar; //  
  height     :  Double;                               //  
  ksu        :  Double;                               //  
  step       :  Double;                               //  
  fontName   :  array [0..TEXT_LENGTH-1] of WideChar; //  
  color      :  DWord;                                // 
  align      :  Byte;                                 //  0-, 1- ,2-, 3 -  
  bold       :  Byte;                                 //  1- , 0- 
  italic     :  Byte;                                 //  1-  , 0-  
  underline  :  Byte;                                 //  1-  , 0 -  
  posKS      :  Double;                               //   
  stepParPre :  Double;                               //  ,  
  stepParPst :  Double;                               //    
  leftEdge   :  Double;                               //   
  rightEdge  :  Double;                               //   
end;


//-------------------------------------------------------------------------------
//     
// ---
PConicArcParam = ^ConicArcParam;
ConicArcParam = record
  A      :  Double;
  B      :  Double;
  C      :  Double;
  D      :  Double;
  E      :  Double;
  F      :  Double; //  
  x1, y1 :  Double; //  
  x2, y2 :  Double; //  
  style  :  Word;   //
end;


//-------------------------------------------------------------------------------
//   
// ---
PPolylineParam = ^PolylineParam;
PolylineParam = record
  pMathPoint : Reference; //      POINT_ARR
  style      : Word;      //
end;


//-------------------------------------------------------------------------------
//      
// ---
PLibStyle = ^LibStyle;
LibStyle = record
  fileName 	 :  array [0..MAX_TEXT_LENGTH-1] of Char; //   
  styleNumber    : Integer;                             //    
  typeAllocation : Byte;                                //      0- ; 1-    
end;


//-------------------------------------------------------------------------------
//       ( Unicode )
// ---
PLibStyleW = ^LibStyleW;
LibStyleW = record
  fileName 	     : array [0..MAX_TEXT_LENGTH-1] of WideChar; //   
  styleNumber    : Integer;                                  //    
  typeAllocation : Byte;                                     //      0- ; 1-    
end;


//-------------------------------------------------------------------------------
//     
// ---
PTechnicalDemandParam = ^TechnicalDemandParam;
TechnicalDemandParam = record
  pGab     : Reference; //     RECT_ARR -( RectParam)
  style    : Word;      //
  strCount : Word;      //    
end;


//-------------------------------------------------------------------------------
//     
// ---
PSpecRoughParam = ^SpecRoughParam;
SpecRoughParam = record
  style  : Word;                           // 
  sign   : Byte;                           //  0- -  , 1- -   , 2 --    
  t      : Byte;                           //1-     0 -
  s 	 : array [0..TEXT_LENGTH-1] of Char; //
end;


//-------------------------------------------------------------------------------
//       ( Unicode )
// ---
PSpecRoughParamW = ^SpecRoughParamW;
SpecRoughParamW = record
  style  : Word;                               //  
  sign   : Byte;                               //   0- -  , 1- -   , 2 --    
  t      : Byte;                               // 1-     0 -
  s 	 : array [0..TEXT_LENGTH-1] of WideChar; // 
end;


//-------------------------------------------------------------------------------
//      
// ---
PDimensionsOptions = ^DimensionsOptions;
DimensionsOptions = record
  proLineExtension        : Double;  //     
  textDistanceFromDimLine : Double;  //   .  
  textDistanceFromProLine : Double;  //      
  dimLineExtension        : Double;  //     
  arrowLength             : Double;  //    

  style                   : Word;    // 

  decimalsCount           : Byte;    // -    0-9
  anglePrecisionLevel     : Integer; //    0-, 1- , 2- 
  hiddenToleranceNumber   : Integer; // -1  ;      1-17
end;


//-------------------------------------------------------------------------------
//    
// ---
PSpcColumnParam = ^SpcColumnParam;
SpcColumnParam = record
  columnType : Cardinal;                             //   SPC_CLM_FORMAT...SPC_CLM_USER
  ispoln     : Cardinal;                             //    
  block      : Cardinal;                             //  
  typeVal    : Cardinal;                             //   SPC_INT...SPC_RECORD
  name 	     : array [0..TEXT_LENGTH-1] of char; //  
end;


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PSpcColumnParamW = ^SpcColumnParamW;
SpcColumnParamW = record
  columnType : Cardinal;                             //   SPC_CLM_FORMAT...SPC_CLM_USER
  ispoln     : Cardinal;                             //    
  block      : Cardinal;                             //  
  typeVal    : Cardinal;                             //   SPC_INT...SPC_RECORD
  name 	     : array [0..TEXT_LENGTH-1] of WideChar; //  
end;


//-------------------------------------------------------------------------------
//      
// ---
PLibraryStyleParam = ^LibraryStyleParam;
LibraryStyleParam = record
  styleName : array [0..MAX_TEXT_LENGTH-1] of Char; //   
  styleId   : Cardinal;                           //    
end;


//-------------------------------------------------------------------------------
//        ( Unicode )
// ---
PLibraryStyleParamW = ^LibraryStyleParamW;
LibraryStyleParamW = record
  styleName : array [0..MAX_TEXT_LENGTH-1] of WideChar; //   
  styleId   : Cardinal;                                 //    
end;


//-------------------------------------------------------------------------------
//     - 
// ---
PInertiaParam = ^InertiaParam;
InertiaParam = record
  xc, yc  : Double;    //   ,
  f       : Double;    // ,
  ly, lx  : Double;    //      x  y,
  lxy     : Double;    //       x  y,
  my, mx  : Double;    //    ,   x  y
                       //     ,
  mxy     : Double;    //     ,   x  y
                       //     ,
  jy, jx  : Double;    //    ,
  a       : Double;    //        x
end;


//-------------------------------------------------------------------------------
//     - 
// ---
PMassInertiaParam = ^MassInertiaParam;
MassInertiaParam = record
  r                : Double; // 
  m                : Double; // 
  v                : Double; // 
  xc,   yc,   zc   : Double; //    -   
  lxy,  lxz,  lyz  : Double; //      
  lx,   ly,   lz   : Double; //      
  jy0z, jx0z, jx0y : Double; //   
  jxy,  jxz,  jyz  : Double; //      
  jx,   jy,   jz   : Double; //      
end;


//-------------------------------------------------------------------------------
//     
// ---
PVariableParam = ^VariableParam;
VariableParam = record
  name  : array [0..MAX_TEXT_LENGTH-1] of Char; //   
  value : Double;                             //  
  note  : array [0..MAX_TEXT_LENGTH-1] of Char; // 
end;


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PVariableParamW = ^VariableParamW;
VariableParamW = record
  name  : array [0..MAX_TEXT_LENGTH-1] of WideChar; //   
  value : Double;                                   //  
  note  : array [0..MAX_TEXT_LENGTH-1] of WideChar; // 
end;


//-------------------------------------------------------------------------------
//     
// ---
SnapOptions = record
  // 
  nearestPoint   : Byte;      //  
  nearestMiddle  : Byte;      // 
  intersect      : Byte;      // 
  tangentToCurve : Byte;      // 
  normalToCurve  : Byte;      // 
  grid           : Byte;      //  
  xyAlign        : Byte;      // 
  angSnap        : Byte;      //  
  pointOnCurve   : Byte;      //   
  commonOpt      : Cardinal;  //    :  ,  ,    ,  
  angleStep      : Double;    //      
  localSnap      : Byte;      //     SN_NEAREST_POINT...SN_POINT_CURVE  0
end;


//-------------------------------------------------------------------------------
//   Nurbs-
// ---
PNurbsParam = ^NurbsParam;
NurbsParam = record
  degree   : Byte;      //   > 2 && < 9
  close    : Byte;      //    0 -  1 - 
  style    : Word;      //   
  pPoint   : Reference; //     (NurbsPointParam )
  pKnot    : Reference; //     (double)
  periodic : Byte;      // 1 -  ; 0 -   - GetObjParam
end;


//-------------------------------------------------------------------------------
//    
// ---
PInsertFragmentParam = ^InsertFragmentParam;
InsertFragmentParam = record
  place      : PlacementParam;                        //   
  insertType : Byte          ;                        // (    GetObjparam )
                                                      // 0-   , 1- , 3-  
  fileName   : array [0..MAX_TEXT_LENGTH-1] of Char;  //     "\0"   
  comment    : array [0..MAX_TEXT_LENGTH-1] of Char;  // 
end;


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PInsertFragmentParamW = ^InsertFragmentParamW;
InsertFragmentParamW = record
  place      : PlacementParam;                           //    
  insertType : Byte          ;                           //  (    GetObjparam )
                                                         // 0-   , 1- , 3-  
  fileName   : array [0..MAX_TEXT_LENGTH-1] of WideChar; //     "\0"   
  comment    : array [0..MAX_TEXT_LENGTH-1] of WideChar; //  
end;


//-------------------------------------------------------------------------------
//     
// ---
PInsertFragmentParamEx = ^InsertFragmentParamEx;
InsertFragmentParamEx = record
  place      : PlacementParam;                        //   
  insertType : Byte          ;                        // (    GetObjparam )
                                                      // 0-   , 1- , 3-  
  fileName   : array [0..MAX_TEXT_LENGTH-1] of Char;  //     "\0"   
  comment    : array [0..MAX_TEXT_LENGTH-1] of Char;  // 
  scaleProjLinesSize : Byte;
end;


//-------------------------------------------------------------------------------
//      ( Unicode )
// ---
PInsertFragmentParamExW = ^InsertFragmentParamExW;
InsertFragmentParamExW = record
  place      : PlacementParam;                           //    
  insertType : Byte          ;                           //  (    GetObjparam )
                                                         // 0-   , 1- , 3-  
  fileName   : array [0..MAX_TEXT_LENGTH-1] of WideChar; //     "\0"   
  comment    : array [0..MAX_TEXT_LENGTH-1] of WideChar; //  
  scaleProjLinesSize : Byte;
end;


//-------------------------------------------------------------------------------
//    
// ---
PConstraintParam = ^ConstraintParam;
ConstraintParam  = record
  constrType   : Word;      //  
  index        : Integer;   //     (   0,     0- )
  partner      : Reference; //  
  partnerIndex : Integer;   //      (   0,     0- )
end;


//-------------------------------------------------------------------------------
//       
// ---
PCornerParam = ^CornerParam;
CornerParam  = record
  index  : Integer;  //   ( 0, 1, 2, .... )
  fillet : Byte;     //   1 - , 0 - 
  l1     : Double;   //   1   
  l2     : Double;   //   2 
end;


//-------------------------------------------------------------------------------
//   
// ---
PRectangleParam = ^RectangleParam;
RectangleParam  = record
  x       : Double;    //     
  y       : Double;
  ang     : Double;    //     1-   2-
  height  : Double;    // 
  weight  : Double;    // 
  style   : Word;      //  
  pCorner : Reference; //      CORNER_ARR
end;

//-------------------------------------------------------------------------------
//    
// ---
PRegularPolygonParam = ^RegularPolygonParam;
RegularPolygonParam  = record
  count    : Integer;   //   
  xc       : Double;    //  
  yc       : Double;
  ang      : Double;    //   
  radius   : Double;    //  
  describe : Byte;      //   .
  style    : Word;      //  
  pCorner  : Reference; //      CORNER_ARR
end;


//-------------------------------------------------------------------------------
//    " "
// ---
PCentreParam = ^CentreParam;
CentreParam  = record
  baseCurve   : Reference;  //     0
  x           : Double; //  ,  baseCurve  -  
  y           : Double;
  ang         : Double;        //,  baseCurve  -  
  _type       : Byte;       //    0- , 1-   2-  
  standXpTail : Byte;// 1-  "" 
  standXmTail : Byte;//
  standYpTail : Byte;//
  standYmTail : Byte;//
  lenXpTail   : Double;  // ,    
  lenXmTail   : Double;
  lenYpTail   : Double;
  lenYmTail   : Double;
end;


//-------------------------------------------------------------------------------
//      
// ---
PDocAttachedSpcParam = ^DocAttachedSpcParam;
DocAttachedSpcParam  = record
  fileName : array[0..MAX_TEXT_LENGTH-1] of Char; //    
  comment  : array[0..MAX_TEXT_LENGTH-1] of Char; //    
  transmit : Byte;  // 1 -   -     
end;


//-------------------------------------------------------------------------------
//      
// ---
PDocAttachedSpcParamW = ^DocAttachedSpcParamW;
DocAttachedSpcParamW  = record
  fileName : array[0..MAX_TEXT_LENGTH-1] of WideChar; //    
  comment  : array[0..MAX_TEXT_LENGTH-1] of WideChar; //    
  transmit : Byte;  // 1 -   -     
end;


//-------------------------------------------------------------------------------
//    
// ---
PSpcObjParam = ^SpcObjParam;
SpcObjParam  = record
  docArr         : Reference; //   DOC_SPCOBJ_ARR       

  //     
  typeObj        : Word;      //   - SPC_BASE_OBJECT ... SPC_EMPTY_STR !!!    !!!
  numbSection    : Word;      //    !!!    !!!

  //     - 
  blockNumber    : Word;      //   (  - 0 )  SPC_COMMENT - 

  //      
  numbSubSection : Word;   //  
  subSectionName : array[0..MAX_TEXT_LENGTH-1] of Char; //   !!!    !!!
  firstOnSheet   : Byte;   // 1 -   
  insFrgType     : Byte;   // 0 -  ,     1 -    
                           // 2 -     !!!    !!!
  posInc         : Byte;   // 1 -  ; 0 -   

  //     
  first          : Byte;   // 1 -   , 0 -    !!!    !!!
  draw           : Byte;   // 1 -    0 -    (    )
  posNotDraw     : Byte;   // 0 -     1  
  ispoln         : Byte;   // 1 -   
end;


//-------------------------------------------------------------------------------
//     (Unicode)
// ---
PSpcObjParamW = ^SpcObjParamW;
SpcObjParamW  = record
  docArr         : Reference; //   DOC_SPCOBJ_ARR       

  //     
  typeObj        : Word;      //   - SPC_BASE_OBJECT ... SPC_EMPTY_STR !!!    !!!
  numbSection    : Word;      //    !!!    !!!

  //     - 
  blockNumber    : Word;      //   (  - 0 )  SPC_COMMENT - 

  //      
  numbSubSection : Word;   //  
  subSectionName : array[0..MAX_TEXT_LENGTH-1] of WideChar; //   !!!    !!!
  firstOnSheet   : Byte;   // 1 -   
  insFrgType     : Byte;   // 0 -  ,     1 -    
                           // 2 -     !!!    !!!
  posInc         : Byte;   // 1 -  ; 0 -   

  //     
  first          : Byte;   // 1 -   , 0 -    !!!    !!!
  draw           : Byte;   // 1 -    0 -    (    )
  posNotDraw     : Byte;   // 0 -     1  
  ispoln         : Byte;   // 1 -   
end;


//-------------------------------------------------------------------------------
//    
// ---
PRasterParam = ^RasterParam;
RasterParam  = record
  place    : PlacementParam;                      //  
  fileName : array[0..MAX_TEXT_LENGTH-1] of Char; //    
  embeded  : Byte;                                // embeded - 1 -    ,
end;   													                 // 0 -      (  )


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PRasterParamW = ^RasterParamW;
RasterParamW  = record
  place    : PlacementParam;                          //  
  fileName : array[0..MAX_TEXT_LENGTH-1] of WideChar; //    
  embeded  : Byte;                                    // embeded - 1 -    ,
end;   													                      // 0 -      (  )


//-------------------------------------------------------------------------------
//     SPC_RECORD
// ---
PRecordTypeAttrParam = ^RecordTypeAttrParam;
RecordTypeAttrParam  = record
  attrLibName : array[0..MAX_TEXT_LENGTH-1] of Char;  //     

  key1 : Integer;                           //      
  key2 : Integer;                           //  -   0   
  key3 : Integer;
  key4 : Integer;
end;


//-------------------------------------------------------------------------------
//     SPC_RECORD (Unicode)
// ---
PRecordTypeAttrParamW = ^RecordTypeAttrParamW;
RecordTypeAttrParamW  = record
  attrLibName : array[0..MAX_TEXT_LENGTH-1] of WideChar;  //     

  key1 : Integer;                                         //      
  key2 : Integer;                                         //  -   0   
  key3 : Integer;
  key4 : Integer;
end;


//-------------------------------------------------------------------------------
//     SPC_DOUBLE  SPC_INT
// ---
PNumberTypeAttrParam = ^NumberTypeAttrParam;
NumberTypeAttrParam  = record
  minValue : Double;
  maxValue : Double;
end;


//-------------------------------------------------------------------------------
//      
//       
// ---
PSpcStyleColumnParam = ^SpcStyleColumnParam;
SpcStyleColumnParam  = record
  nameColumn : array[0..MAX_TEXT_LENGTH-1] of Char;  //  
  columnType : Cardinal;         //   SPC_CLM_FORMAT ... SPC_CLM_FACTORY
  ispoln     : Cardinal;         //     

  edit               : Byte; // 1 -     , 0 - 
  createSum          : Byte; // 1 -     , 0 - 
  multiplyToCount    : Byte; // 1 -      , 0 - 
  useForSectionTitle : Byte; // 1 -      , 0 - 
  textDn             : Byte; // 1 -     , 0 -   
  rezerv : array[0..9] of Char; //  

  linkId : Cardinal;         //     

  case typeVal : Cardinal of         //    : LINT_ATTR_TYPE, DOUBLE_ATTR_TYPE, STRING_ATTR_TYPE, RECORD_ATTR_TYPE
    RECORD_ATTR_TYPE                 : ( recordType : RecordTypeAttrParam );  //     RECORD_ATTR_TYPE
    LINT_ATTR_TYPE, DOUBLE_ATTR_TYPE : ( numberType : NumberTypeAttrParam );  //     LINT_ATTR_TYPE, DOUBLE_ATTR_TYPE
end;


//-------------------------------------------------------------------------------
//       ( Unicode )
//       
// ---
PSpcStyleColumnParamW = ^SpcStyleColumnParamW;
SpcStyleColumnParamW  = record
  nameColumn : array[0..MAX_TEXT_LENGTH-1] of WideChar;  //  
  columnType : Cardinal;         //   SPC_CLM_FORMAT ... SPC_CLM_FACTORY
  ispoln     : Cardinal;         //     

  edit               : Byte; // 1 -     , 0 - 
  createSum          : Byte; // 1 -     , 0 - 
  multiplyToCount    : Byte; // 1 -      , 0 - 
  useForSectionTitle : Byte; // 1 -      , 0 - 
  textDn             : Byte; // 1 -     , 0 -   
  rezerv : array[0..9] of char; //  

  linkId : Cardinal;         //     

  case typeVal : Cardinal of         //    : LINT_ATTR_TYPE, DOUBLE_ATTR_TYPE, STRING_ATTR_TYPE, RECORD_ATTR_TYPE
    RECORD_ATTR_TYPE                 : ( recordType : RecordTypeAttrParamW );  //     RECORD_ATTR_TYPE
    LINT_ATTR_TYPE, DOUBLE_ATTR_TYPE : ( numberType : NumberTypeAttrParam  );  //     LINT_ATTR_TYPE, DOUBLE_ATTR_TYPE
end;


//-------------------------------------------------------------------------------
//    a 
// ---
PSpcStyleSectionParam = ^SpcStyleSectionParam;
SpcStyleSectionParam  = record
  sectionName    : array[0..MAX_TEXT_LENGTH-1] of Char; //  
  number         : Word;               //  
  sortColumnType : Cardinal;           //       
  sortIspoln     : Cardinal;           //      

  dataType : Byte;                     //   : 0 -   ,
                                       //                        1 -      
  sortType            : Word;          //   SPC_SORT_OFF ... SPC_SORT_DOWN
  arrColumn           : Reference;     //      SpcStyleColumnParam
  arrAdditionalColumn : Reference;     //    
  															               //   SpcStyleColumnParam
  rezerv : array[0..9] of Char;        //  
end;


//-------------------------------------------------------------------------------
//    a  ( Unicode )
// ---
PSpcStyleSectionParamW = ^SpcStyleSectionParamW;
SpcStyleSectionParamW  = record
  sectionName    : array[0..MAX_TEXT_LENGTH-1] of WideChar; //  
  number         : Word;               //  
  sortColumnType : Cardinal;           //       
  sortIspoln     : Cardinal;           //      

  dataType : Byte;                     //   : 0 -   ,
                                       //                        1 -      
  sortType            : Word;          //   SPC_SORT_OFF ... SPC_SORT_DOWN
  arrColumn           : Reference;     //      SpcStyleColumnParam
  arrAdditionalColumn : Reference;     //    
												               //   SpcStyleColumnParam
  rezerv : array[0..9] of Char;        //  
end;


//-------------------------------------------------------------------------------
//    .     
// ---
PSpcSubSectionParam = ^SpcSubSectionParam;
SpcSubSectionParam  = record
  name   : array[0..MAX_TEXT_LENGTH-1] of Char; // 
  number : Byte;                                // 
end;


//-------------------------------------------------------------------------------
//    .      ( Unicode )
// ---
PSpcSubSectionParamW = ^SpcSubSectionParamW;
SpcSubSectionParamW  = record
  name   : array[0..MAX_TEXT_LENGTH-1] of WideChar; //  
  number : Byte;                                    //  
end;


//-------------------------------------------------------------------------------
//     
// ---
PSpcTuningSectionParam = ^SpcTuningSectionParam;
SpcTuningSectionParam  = record
  subsectionOn : Byte;  // 1-   , 0- 
  geometryOn   : Byte;  // 1-   , 0- 
  positionOn   : Byte;  // 1-   , 0-  
  sortOn       : Byte;  // 1- , 0-  
  firstOnSheet : Byte;  // 1-     , 0-

  rezerv : array[0..9] of Char; //  

  rezervCount : Word;           //     
  number      : Word;           //   -   

  arrSubSection : Reference;    //    SpcSubSectionParam  
end;


//-------------------------------------------------------------------------------
//     
// ---
PSpcTuningStyleParam = ^SpcTuningStyleParam;
SpcTuningStyleParam  = record
  grToSP                 : Byte; //   C ->  0-; 1-  ; 2-  ;
  zoneCalc               : Byte; // 1-  , 0- 
  showSectionName        : Byte; // 1-    , 0- 
  positionCalc           : Byte; // 1-   , 0- 
  geometryDel            : Byte; // 1-    , 0- 
  positionDel            : Byte; // 1-     , 0- 
  massCalc               : Byte; // 1-  , 0-
  disableEmptyStr        : Byte; //       
  insertNull             : Byte; //    1-     0- 
  insertDash             : Byte; //    1-   0- 
  disableEmptyBlockStr   : Byte; //       
  showInfoByDetBlock     : Byte; // 0-    1-  (   > 10 )
  ispolnOn               : Byte; // 1-   
  ispolnMarkFull         : Byte; // 1-    0 -   (-01)
  blocOnNewPage          : Byte; //     
  userTextStyle          : Byte; // 1-     

  countIspoln            : Byte; //  
  countBlock             : Byte; //  
	countIspolnEx          : Word; //  
  countBlockEx           : Word; //  
  delSpcObjOnDelGeometry : Byte; //      
  copySpcObjOnCopyGeometry : Byte; //      

  rezerv      : array[0..3] of Char; //  

  sectionTextStyleFirst : TextStyleParam; //     -  
  sectionTextStyleNext  : TextStyleParam; //     -  
  objectTextStyle       : TextStyleParam; //    

  predefinedTextFileName : array[0..MAX_TEXT_LENGTH-1] of Char;
  arrSection             : Reference;  //      SpcTuningSectionParam
end;


//-------------------------------------------------------------------------------
//      ( Unicode )
// ---
PSpcTuningStyleParamW = ^SpcTuningStyleParamW;
SpcTuningStyleParamW = record
  grToSP                 : Byte; //   C ->  0-; 1-  ; 2-  ;
  zoneCalc               : Byte; // 1-  , 0- 
  showSectionName        : Byte; // 1-    , 0- 
  positionCalc           : Byte; // 1-   , 0- 
  geometryDel            : Byte; // 1-    , 0- 
  positionDel            : Byte; // 1-     , 0- 
  massCalc               : Byte; // 1-  , 0-
  disableEmptyStr        : Byte; //       
  insertNull             : Byte; //    1-     0- 
  insertDash             : Byte; //    1-   0- 
  disableEmptyBlockStr   : Byte; //       
  showInfoByDetBlock     : Byte; // 0-    1-  (   > 10 )
  ispolnOn               : Byte; // 1-   
  ispolnMarkFull         : Byte; // 1-    0 -   (-01)
  blocOnNewPage          : Byte; //     
  userTextStyle          : Byte; // 1-     

  countIspoln            : Byte; //  
  countBlock             : Byte; //  
	countIspolnEx          : Word; //  
  countBlockEx           : Word; //  
  delSpcObjOnDelGeometry : Byte; //      
  copySpcObjOnCopyGeometry : Byte; //      

  rezerv      : array[0..3] of Char; //  

  sectionTextStyleFirst : TextStyleParamW; //     -  
  sectionTextStyleNext  : TextStyleParamW; //     -  
  objectTextStyle       : TextStyleParamW; //    

  predefinedTextFileName : array[0..MAX_TEXT_LENGTH-1] of WideChar;
  arrSection             : Reference;  //      SpcTuningSectionParam
end;


//-------------------------------------------------------------------------------
//    
// ---
PSpcStyleParam = ^SpcStyleParam;
SpcStyleParam  = record
  layoutName1 : array[0..MAX_TEXT_LENGTH-1] of Char; //       
  layoutName2 : array[0..MAX_TEXT_LENGTH-1] of Char; //       
  shtType1    : Cardinal;                            //       
  shtType2    : Cardinal;                            //     

  variant     : Byte;    //      0-, 1-, 2-, 3-, 4-
  sectionOn   : Byte;    // 1-    , 0- 
  rezerv      : array[0..9] of Char; //  

  tuning : SpcTuningStyleParam;    //  ,    

  arrColumn           : Reference; //     -  SpcStyleColumnParam
  arrAdditionalColumn : Reference; //    SpcStyleColumnParam
  arrSection          : Reference; //     SpcStyleSectionParam

  case _type : Byte of           //  a   0- , 1 - 
  0: ( stPar : StandartSheet );  //    
  1: ( usPar : SheetSize     );  //    
end;


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PSpcStyleParamW = ^SpcStyleParamW;
SpcStyleParamW  = record
  layoutName1 : array[0..MAX_TEXT_LENGTH-1] of WideChar; //       
  layoutName2 : array[0..MAX_TEXT_LENGTH-1] of WideChar; //       
  shtType1    : Cardinal;                                //       
  shtType2    : Cardinal;                                //     

  variant     : Byte;    //      0-, 1-, 2-, 3-, 4-
  sectionOn   : Byte;    // 1-    , 0- 
  rezerv      : array[0..9] of Char; //  

  tuning : SpcTuningStyleParam;    //  ,    

  arrColumn           : Reference; //     -  SpcStyleColumnParam
  arrAdditionalColumn : Reference; //    SpcStyleColumnParam
  arrSection          : Reference; //     SpcStyleSectionParam

  case _type : Byte of           //  a   0- , 1 - 
  0: ( stPar : StandartSheet );  //    
  1: ( usPar : SheetSize     );  //    
end;


//-------------------------------------------------------------------------------
//    
// ---
PSpcDescrParam = ^SpcDescrParam;
SpcDescrParam  = record
  layoutName : array[0..MAX_TEXT_LENGTH-1] of Char; //    
  styleId    : Cardinal;                            //    
  spcName    : array[0..MAX_TEXT_LENGTH-1] of Char; //    
end;


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PSpcDescrParamW = ^SpcDescrParamW;
SpcDescrParamW  = record
  layoutName : array[0..MAX_TEXT_LENGTH-1] of WideChar; //    
  styleId    : Cardinal;                                //    
  spcName    : array[0..MAX_TEXT_LENGTH-1] of WideChar; //    
end;


//-------------------------------------------------------------------------------
//      - 
// ---
PQualityItemParam = ^QualityItemParam;
QualityItemParam = record
  minLimit : SmallInt;     //     
  maxLimit : SmallInt;     //     
  high     : Double;       //  
  low      : Double;       //  
end;


//-------------------------------------------------------------------------------
//   
// ---
PQualityContensParam = ^QualityContensParam;
QualityContensParam = record
	systemQuality : Byte;         //  
  kindQuality   : Byte;         //  
  name          : array[0..MAX_TEXT_LENGTH-1] of Char; //  
  pQualityItems : Reference;    //  
end;


//-------------------------------------------------------------------------------
//    ( Unicode )
// ---
PQualityContensParamW = ^QualityContensParamW;
QualityContensParamW = record
	systemQuality : Byte;         //  
  kindQuality   : Byte;         //  
  name          : array[0..MAX_TEXT_LENGTH-1] of WideChar; //  
  pQualityItems : Reference;    //  
end;


//-------------------------------------------------------------------------------
//  " "
// ---
PksTolerancePar = ^ksTolerancePar;
ksTolerancePar = record
  tBase : Byte;          // 1-8      ( 1-      3..4..5  )
  style : Word;          //  ,  0 -                     :     :
  x, y  : Double;        //                                           2     6
  _type : Byte;          //   0-  , 1-             :     :
  branchArr : Reference; //    ( ToleranceBranch )            1..8..7
end;


//-------------------------------------------------------------------------------
//     
// ---
PHatchParamEx = ^HatchParamEx;
HatchParamEx = record
	style       : Word;      // 
	ang         : Double;    // 
	step        : Double;    // 
	width       : Double;    // , 0- 
	x, y        : Double;    //  (   )
  pBoundaries : Reference; // - ;   GetObjParam  ksHatch
  color       : Dword;     //,   FREE_COLOR (0xff000000l)
  sheetAng    : Byte;      //0 -     (  ) 1 -  (  )
end;


//-------------------------------------------------------------------------------
//    
// ---
POrdinatedDrawing = ^OrdinatedDrawing;
OrdinatedDrawing = record
  _type : Byte; //   
end;


//-------------------------------------------------------------------------------
//    
// ---
POrdinatedSource = ^OrdinatedSource;
OrdinatedSource = record
  x0, y0 : Double;           //  ,   
  x1, y1 : Double;           //  ,   
  x2, y2 : Double;           //  ,    
end;


//-------------------------------------------------------------------------------
//     ORDINATEDIMENSION_OBJ
// ---
POrdinatedDimParam = ^OrdinatedDimParam;
OrdinatedDimParam = record
  tPar : DimText;           //  
  dPar : OrdinatedDrawing;  //   
  sPar : OrdinatedSource;   //   
end;


//-------------------------------------------------------------------------------
//    
// ---
PHatchLineParam = ^HatchLineParam;
HatchLineParam = record
  x, y   : Double;               //  
  dx, dy : Double;               //    . dy     !
  ang    : Double;               //  
  Case typeCurvStyle : Byte of           // 0 - (style), 1 - (curPar)
    0 : ( style  : SmallInt );           //   (1-11)
    1 : ( curPar : CurveStyleParam );    //   , pattern     CurvePattern
end;


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PHatchLineParamW = ^HatchLineParamW;
HatchLineParamW = record
  x, y   : Double;               //  
  dx, dy : Double;               //    . dy     !
  ang    : Double;               //  
  Case typeCurvStyle : Byte of           // 0 - (style), 1 - (curPar)
    0 : ( style  : SmallInt );           //   (1-11)
    1 : ( curPar : CurveStyleParamW );   //   , pattern     CurvePattern
end;


//-------------------------------------------------------------------------------
//   
// ---
PHatchStyleParam = ^HatchStyleParam;
HatchStyleParam = record

  name     : array[0..TEXT_LENGTH-1] of Char;       //  
  step     : Double;         // 
  ang      : Double;         //  
  refPoint : MathPointParam; //  
  width    : Double;         // 
  color    : Cardinal;       // ,   FREE_COLOR (0xff000000l)
  mayChangeAngle : Cardinal; //     
  mayChangeWidth : Cardinal; //     
  mayChangeSpace : Cardinal; //    /
  isScalable     : Cardinal; //   (1)  (0)
  arrLineParam   : Cardinal; //    ,    HatchLineParam
end;


//-------------------------------------------------------------------------------
//   
// ---
PHatchStyleParamW = ^HatchStyleParamW;
HatchStyleParamW = record

  name     : array[0..TEXT_LENGTH-1] of WideChar;       //  
  step     : Double;         // 
  ang      : Double;         //  
  refPoint : MathPointParam; //  
  width    : Double;         // 
  color    : Cardinal;       // ,   FREE_COLOR (0xff000000l)
  mayChangeAngle : Cardinal; //     
  mayChangeWidth : Cardinal; //     
  mayChangeSpace : Cardinal; //    /
  isScalable     : Cardinal; //   (1)  (0)
  arrLineParam   : Cardinal; //    ,    HatchLineParam
end;


//-----------------------------------------------------------------------------
//      
// ---
PRasterFormatParam = ^RasterFormatParam;
RasterFormatParam = record
  format        : Byte;          //   FORMAT_BMP...FORMAT_PCX
  colorBPP      : Byte;          //   (  ) BPP_COLOR_01...BPP_COLOR_32
  grayScale     : Byte;          // >0  
  extResolution : Integer;       //   : 0 - 
  extScale      : Double;        // 
  colorType     : Byte;          //   BLACKWHITE...COLOROBJECT
  onlyThinLine  : Byte;          // >0 -   
  pages         : array[0..MAX_TEXT_LENGTH-1] of Char; //      "beg1-end1, beg2-end2, beg3-end3,  ..."
  rangeIndex    : Byte;          // 0 - ,  1-  2- ,
  multiPageOutput : Byte;        // >0       (  FORMAT_TIF)
end;


//-----------------------------------------------------------------------------
//       ( Unicode )
// ---
PRasterFormatParamW = ^RasterFormatParamW;
RasterFormatParamW = record
  format        : Byte;          //   FORMAT_BMP...FORMAT_PCX
  colorBPP      : Byte;          //   (  ) BPP_COLOR_01...BPP_COLOR_32
  grayScale     : Byte;          // >0  
  extResolution : Integer;       //   : 0 - 
  extScale      : Double;        // 
  colorType     : Byte;          //   BLACKWHITE...COLOROBJECT
  onlyThinLine  : Byte;          // >0 -   
  pages         : array[0..MAX_TEXT_LENGTH-1] of WideChar; //      "beg1-end1, beg2-end2, beg3-end3,  ..."
  rangeIndex    : Byte;          // 0 - ,  1-  2- ,
  multiPageOutput : Byte;        // >0       (  FORMAT_TIF)
end;


//-------------------------------------------------------------------------------
//   . 
// ---
PPolylineParamEx = ^PolylineParamEx;
PolylineParamEx = record
  pMathPoint : reference;  //       POINT_ARR
  style	     : Word;       // 
  closed     : Byte;       //    - 1  , 0 
  rezerv     : array[0..10] of Char;       //  
end;


//-------------------------------------------------------------------------------
// . <ldefin2d.h> LtNodeType -       
//    
// ---
PTreeNodeParam = ^TreeNodeParam;
TreeNodeParam = record
  nodeType    : Integer;               //  : , ,  ( LtNodeType)
  name        : array[0..MAX_TEXT_LENGTH-1] of Char; //  
  comment     : reference;             //  -   CHAR_STR_ARR  -    
  nodes       : reference;             //     TreeNodeParam
end;


//-------------------------------------------------------------------------------
// . <ldefin2d.h> LtNodeType -       
//     ( Unicode )
// ---
PTreeNodeParamW = ^TreeNodeParamW;
TreeNodeParamW = record
  nodeType    : Integer;               //  : , ,  ( LtNodeType)
  name        : array[0..MAX_TEXT_LENGTH-1] of WideChar; //  
  comment     : reference;             //  -   CHAR_STR_ARR_W -    
  nodes       : reference;             //     TreeNodeParam
end;


//-------------------------------------------------------------------------------
//   
// ---
PViewColorParam = ^ViewColorParam;
ViewColorParam  = record
  color         : Integer; //  ,  -1    ,   Windows
  useGradient   : Byte;    // 1 -      
                           // 0 -  . (   3D-)
  topColor      : Integer; //    (   3D-)
  bottomColor   : Integer; //    (   3D-)
end;


//-------------------------------------------------------------------------------
// . <ldefin2d.pas> LtViewType -  
//    
// ---
PAssociationViewParam = ^AssociationViewParam;
AssociationViewParam  = record
  viewPar        : ViewParam;                         //  

  fileName       : array[0..MAX_TEXT_LENGTH-1] of Char; //   3d 
  projectionName : array[0..TEXT_LENGTH-1    ] of Char; //   (       )

  viewType       : Byte;                              //    LtViewType (readOnly)
  dimensionLayoutScaling : Byte;               //      (  SetObjParam)

  projectionLink : Byte;                       //  
  disassembly    : Byte;                       // 

  visibleLinesStyle : Integer;                 //       ,  0 -  
  hiddenLinesStyle  : Integer;                 //      ,  0 -  
  tangentEdgesStyle : Integer;                 //      ,  0 -  
  hiddenLinesShow   : Byte;                    //    
  tangentEdgesShow  : Byte;                    //     

	projBodies        : Byte;	  	               //   
	projSurfaces      : Byte;                    //   
	projThreads       : Byte;                    //   

  reserve           : array[0..30-1] of Byte;    // 
  hatchPar          : HatchParamEx;            //  ,     \
  sameHatch         : Byte;                    // o    
  section           : Byte;                    //  /
end;


//-------------------------------------------------------------------------------
// . <ldefin2d.pas> LtViewType -  
//     ( Unicode )
// ---
PAssociationViewParamW = ^AssociationViewParamW;
AssociationViewParamW  = record
  viewPar        : ViewParamW;                 //  

  fileName       : array[0..MAX_TEXT_LENGTH-1] of WideChar; //   3d 
  projectionName : array[0..TEXT_LENGTH-1    ] of WideChar; //   (       )

  viewType       : Byte;                              //    LtViewType (readOnly)
  dimensionLayoutScaling : Byte;               //      (  SetObjParam)

  projectionLink : Byte;                       //  
  disassembly    : Byte;                       // 

  visibleLinesStyle : Integer;                 //       ,  0 -  
  hiddenLinesStyle  : Integer;                 //      ,  0 -  
  tangentEdgesStyle : Integer;                 //      ,  0 -  
  hiddenLinesShow   : Byte;                    //    
  tangentEdgesShow  : Byte;                    //     

	projBodies        : Byte;	  	               //   
	projSurfaces      : Byte;                    //   
	projThreads       : Byte;                    //   

  reserve           : array[0..30-1] of Byte;    // 
  hatchPar          : HatchParamEx;            //  ,     \
  sameHatch         : Byte;                    // o    
  section           : Byte;                    //  /
end;


//-------------------------------------------------------------------------------
//   
// ---
PAxisLineParam = ^AxisLineParam;
AxisLineParam  = record
  begPoint : MathPointParam; //     
  endPoint : MathPointParam; //     
end;


//-------------------------------------------------------------------------------
//   " "
// ---
PRemoteElementParam = ^RemoteElementParam;
RemoteElementParam  = record
  style        : Byte;      //  ,  0 -  ,
                            //  style = INDICATIN_TEXT_LINE_ARR -> pText-  TEXT_LINE_ARR
  signType     : Integer;   //   LtRemoteElmSignType
  x            : Double;    //    
  y            : Double;
  width        : Double;    //  (    )
  height       : Double;    //  (    )
  smooth       : Double;    //   
  radius       : Double;    //   ( )
  shelfX       : Double;    //   
  shelfY       : Double;
  shelfDir     : Integer;   //    X (1 - -1-, 2-     3-   )
  pText        : reference; //  style = INDICATIN_TEXT_LINE_ARR , TEXT_LINE_ARR -    
                            // CHAR_STR_ARR  CHAR_STR_ARR_W -      
end;


//-------------------------------------------------------------------------------
//      2d 
// ---
PCopyObjectParam = ^CopyObjectParam;
CopyObjectParam  = record
  p            : reference;            //   , , , 
  xOld         : Double;               //   
  yOld         : Double;
  xNew         : Double;               //    
  yNew         : Double;
  scale        : Double;               // 
  angle        : Double;               //    
  attrCopy     : Byte;                 //   
  dimLineScale : Byte;                 //   
  spcObjCopy   : Byte;                 //    
  reserv       : array[0..9] of Byte;  //  -  
end;


//-------------------------------------------------------------------------------
//    
// ---
PTextDocumentParam = ^TextDocumentParam;
TextDocumentParam = record
  regim             : Byte;                              //  0 -  ,
                                                         //  1 -  
  fileName          : array[0..MAX_TEXT_LENGTH-1] of Char; //    
  comment           : array[0..TEXT_LENGTH-1] of Char;     // 
  author            : array[0..TEXT_LENGTH-1] of Char;     // 
  firstSheet        : LibraryStyleParam;                 //   (   ,    )
  evenSheet         : LibraryStyleParam;                 //   (   ,    )
  oddSheet          : LibraryStyleParam;                 //   (   ,    )
  arrTitleSheet     : reference;                         //       LIBRARY_STYLE_ARR
  arrTailSheet      : reference;                         //        LIBRARY_STYLE_ARR
  Case _type : Byte of
    1: ( stPar : StandartSheet );                         //  ; multiply  
    2: ( usPar : SheetSize     );                         //   
end;


//-------------------------------------------------------------------------------
//     ( Unicode )
// ---
PTextDocumentParamW = ^TextDocumentParamW;
TextDocumentParamW = record
  regim             : Byte;                                    //  0 -  ,
                                                               //  1 -  
  fileName          : array[0..MAX_TEXT_LENGTH-1] of WideChar; //    
  comment           : array[0..TEXT_LENGTH-1]     of WideChar; // 
  author            : array[0..TEXT_LENGTH-1]     of WideChar; // 
  firstSheet        : LibraryStyleParamW;                //   (   ,    )
  evenSheet         : LibraryStyleParamW;                //   (   ,    )
  oddSheet          : LibraryStyleParamW;                //   (   ,    )
  arrTitleSheet     : reference;                         //       LIBRARY_STYLE_ARR
  arrTailSheet      : reference;                         //        LIBRARY_STYLE_ARR
  Case _type : Byte of
    1: ( stPar : StandartSheet );                         //  ; multiply  
    2: ( usPar : SheetSize     );                         //   
end;


//-----------------------------------------------------------------------------
//      \    COM
// ---
PNotifyConnectionParam = ^NotifyConnectionParam;
NotifyConnectionParam = record
  pContainer : reference ; //    ,  .
                           //   0.    .
  objType    : LongInt;    //  .   ,
                           //    ( ksObject2DNotify).
  ifType     : Integer;    //    ksNotifyType
  iContainer : IUnknown;   //    ,  .
  iObj       : IUnknown;   //  .   ( ksObject3DNotify).
                           //   ,  objType  .
end;


implementation
end.






