Extended Object 49 "Color Gradient Filling" (Entity Type "Extended Object")

www.CAD6.com

 

The extended object "Color Gradient Filling" is defined by CAD6studio and CAD6industrie.

 

Creation of this extended object is not supported in CAD6starter and CAD6engine Eco! If already created, it can be displayed and modified generally, but not modified parametrically.

 

Data Block Sequence

Data Block 1000( Matrix )

Data Block 1001( Frame )

Data Block 1020( { ColorValue, ColorMode }[50] )

Data Block 1021( Position[50] )

Data Block 1022( GradientType, StepMode, ColorSteps, AutoSteps )

Data Block 1023( OriginX, OriginY, ThresholdStart, ThresholdEnd, Overlapping, Rotate )

 

These data blocks are followed by a sequence of data blocks identical to those stored in an object of type "Surface", see Object 13 "Surface".

 

Parameters

Matrix

[MKI_MATRIX] A matrix that will be applied to the outline data.

Frame

[MKI_RECT] Surrounding frame of the area to be filled in internal millimeters.

ColorValue

ColorMode

[__int32[100]] 50 pairs of ColorValue (see MKI_COLORVALUE) and ColorMode (see MKI_COLORMODE_*).

Position

[double[50]] 50 color positions on the total range in percent. Valid range: 0.0 ≤ x ≤ 100.0. Values of 1000.0 indicate unused entries.

GradientType

[__int32] Type of gradient. Possible values are:

0Stripes
1Circles
2Squares
3Sectors

StepMode

[__int32] Gradient curve. Valid range: -100 ≤ x ≤ 100. Resulting curve is: f(x) = x ^ ( 4 ^ ( 0.01 * StepMode ) ).

ColorSteps

[__int32] Number of color steps to use. Valid range: 2 ≤ x ≤ 256.

AutoSteps

[__int32] If non-zero, the number of steps will be calculated automatically.

OriginX

OriginY

[double] Offset of the gradients center-point in percent relative to the frame's center.

ThresholdStart

[double] Percent of the total range that will show the first color. Valid range: 0.0 ≤ x ≤ 99.0. The sum of ThresholdStart and ThresholdEnd must not exceed 99.0.

ThresholdEnd

[double] Percent of the total range that will show the last color. Valid range: 0.0 ≤ x ≤ 99.0. The sum of ThresholdStart and ThresholdEnd must not exceed 99.0.

Overlapping

[double] Overlapping of two adjacent color stripes in millimeters.

Rotate

[double] Rotation of the gradient in [rad].

 

Interface Command Sequence

MKI_ExtOpen, OwnerID = MKI_DB_OWNER_MK, Type = MKI_OBJ_EXT_FILL_GRADIENT, Flag = MKI_EXTFLAG_SURFACE

MKI_ExtAddDouble, Type = 1000, ElemCount = 6

MKI_ExtAddDouble, Type = 1001, ElemCount = 4

MKI_ExtAddInt32, Type = 1020, ElemCount = 100

MKI_ExtAddDouble, Type = 1021, ElemCount = 50

MKI_ExtAddInt32, Type = 1022, ElemCount = 4

MKI_ExtAddDouble, Type = 1023, ElemCount = 6

 

Use code like the following to parse the data blocks of this entity in memory:

 

MKI_BLOCK_ENUM b1000( f_pExt ),

               b1001( f_pExt ),

               b1020( f_pExt ),

               b1021( f_pExt ),

               b1022( f_pExt ),

               b1023( f_pExt );

b1001.SetNext( b1000 );

b1020.SetNext( b1001 );

b1021.SetNext( b1020 );

b1022.SetNext( b1021 );

b1023.SetNext( b1022 );

 

MKI_MATRIX cMatrix;

cMatrix.m11 = b1000.Double(0);

cMatrix.m12 = b1000.Double(1);

cMatrix.m21 = b1000.Double(2);

cMatrix.m22 = b1000.Double(3);

cMatrix.m31 = b1000.Double(4);

cMatrix.m32 = b1000.Double(5);

 

...

 

CAD6interface 2026.1 - Copyright 2026 Malz++Kassner® GmbH