![]() |
MKI_SYSTEMDEF (Entity Data Classes) Changed in Version 2024.0 |
www.CAD6.com |
C++ Syntaxclass MKI_SYSTEMDEF { public:
MKI_SYSTEMNAME m_szSystemName; MKI_COMMENTSHORT m_szSystemComment; double m_dSystemRotate, m_dSystemScale; __int32 m_nSystemOption, m_nSystemOriginMode; MKI_POINT m_cSystemOrigin; __int32 m_nSystemLenUnit, m_nSystemLineUnit, m_nSystemAngleUnit, m_nSystemFraction, m_nSystemPrecision; __int32 m_nSystemGridMode; MKI_VECTOR m_cSystemGridSize; __int32 m_nSystemSnapMode; MKI_VECTOR m_cSystemSnapSize; MKI_MATRIX m_cSystemMMToUnit, m_cSystemUnitToMM;
void Init( void );
__int32 GetLengthUnit( void ) const; New in Version 2024.0
bool IsImperial( void ) const; New in Version 2024.0
bool IsArchitect( void ) const; New in Version 2024.0 };
This structure contains a coordinate system definition.
Element Descriptionm_szSystemName Changed in Version 2019.1 [MKI_SYSTEMNAME] Name of the coordinate system, up to 63 characters. m_szSystemComment New in Version 2023.2 [MKI_COMMENTSHORT] Comment on the coordinate system, up to 63 characters. m_dSystemRotate [double] Rotation of the display in [rad]. The rotation is valid for screen display only, not during output. m_dSystemScale [double] Drawing scale (100.0 represents a scale of 100:1, 0.02 represents a scale of 1:50 etc.). Valid range is 1e-10 to 1e10 inclusive. m_nSystemOption [__int32] Distortion mode of the display (see MKI_VIEWMODE_*). The distortion is valid for screen display only. This option allows to distort the screen display of a drawing in a way that isometric or dimetric views inside this drawing will be displayed rectangular, plain and without distortion. By this means, isometric and dimetric drawings can be produced without having to calculate the exact angles and lengths of lines and ellipses. For an illustration of the effect of this option, have a close look at the application. This distortion is independent from the grid settings (see m_nSystemGridMode and m_nSystemSnapMode). Anyway, a distorted view should never be combined with a distorted grid - this will lead to deep confusion of the user. m_nSystemOriginMode [__int32] Placement of the coordinate system's origin (see MKI_ORIGIN_*). Internal drawing coordinates are always relative to the drawing area's center, independent of the origin's placement! m_cSystemOrigin Changed in Version 6.60 [MKI_POINT] Coordinates of the origin in [mm] relative to the drawing area's center. They must be valid even if m_nSystemOriginMode states an explicit origin placement. The valid range is -1e100 to 1e100. m_nSystemLenUnit [__int32] Length unit to be used (see MKI_LENGTHUNIT_*). This unit will be used for in- and output of coordinates and all values that are depending on the drawing's scale (like dimensions, perimeter, area etc.). m_nSystemLineUnit [__int32] Line unit to be used (see MKI_LENGTHUNIT_*). This unit will be used for in- and output of values that are not depending on the drawing's scale (line width, font size etc.). m_nSystemAngleUnit [__int32] Angle unit to be used (see MKI_ANGLEUNIT_*). This unit will be used for in- and output of angle values. m_nSystemFraction [__int32] This value determines how non-integer values will be displayed (see MKI_FRACTION_*). The lower 16 bits of m_nSystemFraction contain the mode for length display, the upper 16 bits contain the mode for angle display. m_nSystemPrecision [__int32] This value determines the precision of non-integer value output to the screen. If values are displayed using floating point representation (m_nSystemFraction = 0, 2, 4, 6 or 8), this value states the maximum number of fractional digits. If values are displayed using mixed fraction representation (m_nSystemFraction = 1, 3, 5 or 7), this value states the maximum power of 2 the denominator will have. In both cases, the valid range is 0 to 14 inclusive. m_nSystemGridMode [__int32] Current mode of the display grid (see MKI_GRID_*). The display grid will be displayed on the screen, it does not influence the cursor's movement. Possible values are: m_cSystemGridSize Changed in Version 6.60 [MKI_VECTOR] Distances of two display grid points in X- and Y-direction in the current unit. Valid range is 0.0 to 1e10 inclusive. If any value is 0.0, the grid is invalid and will not be displayed. m_nSystemSnapMode [__int32] Current mode of the position grid (see MKI_GRID_*). The position grid influences the cursor's movement, it will not be displayed on the screen. Possible values are: m_cSystemSnapSize Changed in Version 6.60 [MKI_VECTOR] Distances of two position grid points in X- and Y-direction in the current unit. Valid range is 0.0 to 1e10 inclusive. If one value is 0.0, the cursor's movement will be restricted only in one direction. If both values are 0.0, the grid is invalid and will have no effect. m_cSystemMMToUnit [MKI_MATRIX] This matrix can be used to convert internal point coordinates ([mm] relative to the page's center) into coordinates based on the system's origin, scale and distortion. If a MKI_SYSTEMDEF structure is used to create a new or modify an existing coordinate system, it is not necessary to initialize this matrix, it will automatically be updated by the system. m_cSystemUnitToMM [MKI_MATRIX] This matrix can be used to convert coordinates based on the system's origin, scale and distortion into internal point coordinates ([mm] relative to the page's center). If a MKI_SYSTEMDEF structure is used to create a new or modify an existing coordinate system, it is not necessary to initialize this matrix, it will automatically be updated by the system.
MKD SyntaxThe section =SYSTEM= contains up to MKI_SYSTEM_MAX coordinate system definitions.
A coordinate system contains a set of several settings that influence the drawing's display and output. These settings are: scaling, rotation, distortion, origin position, length unit, line unit, angle unit, number representation, position grid and display grid.
The coordinate system with the index 0 is named "*Standard" and is predefined by default as an non-rotated, unscaled coordinate system with its origin in the page's center. The length and line unit is [mm], the angle unit is [deg], both grids are initialized with 1 unit, but not active. This coordinate system is valid throughout all drawings and libraries and does not occur in any MKD file.
Head of Section=SYSTEM=; TotalNum;
Entry for each Coordinate System DefinitionSystemName,SystemIndex, SystemRotate,SystemScale,SystemOption, SystemOriginMode,SystemOrigin.x,SystemOrigin.y, SystemLenUnit,SystemLineUnit,SystemAngleUnit, SystemFraction,SystemPrecision, SystemGridMode,SystemGridSize.x,SystemGridSize.y, SystemSnapMode,SystemSnapSize.x,SystemSnapSize.y,SystemComment;
End of Section=END=;
If the section =SYSTEM= does not exist, assume no coordinate system to be defined (m_nTotalNum = 0).
Element Descriptionm_nTotalNum [__int32] Number of coordinate system definitions to follow. Valid range is 0 to MKI_SYSTEM_MAX inclusive. m_nSystemIndex [__int32] Index of the coordinate system (1 to MKI_SYSTEM_MAX). Each index may be assigned to one coordinate system only, as this index is used internally to identify a coordinate system.
Example of a Coordinate System Definition|Name,Index| "Standard, 1:50, Grid 1 m",1, |Rotate,Scale,Option| 0.0,0.02,0, |OrgMode,XOrg,YOrg| 7,0.0,0.0, |LenUnit,LineUnit,AngleUnit| 4,1,0, |Fraction,Precision| 0,4, |GridMode,XGrid,YGrid| 1,1.0,1.0, |SnapMode,XSnap,YSnap| 0,1.0,1.0, |Comment| "";
This is the definition of the coordinate system "Standard, 1:50, Grid 1 m" having the index 1. The origin is located in the lower left corner of the page, the display will neither be rotated nor distorted. The scale of the drawing is 1:50. The length unit is [m], the line unit is [mm] and the angle unit is [deg]. Non-integer values will be displayed in floating-point representation with up to 4 fractional digits.
Display and position grid are both set to one meter in both directions, but only the display grid is currently active. Please note that the grid point distance is always stated in the current length unit! If this length unit is changed to [cm], the grid's distances will be one centimeter.
|
CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH