Extended Object 34 "Spiral" (Entity Type "Extended Object")

www.CAD6.com

 

The extended object "Spiral" 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 1010( Rotation, Distance, Curvature )

Data Block 1011( Objtype, Options )

Data Block 003( Center )

Data Block 004( Radius )

Data Block 005( Angle )

 

Parameters

Rotation

[double] The number of full rotations (not used if 0x00000001 is set in Options).

Distance

[double] The distance of two adjacent evolutions in internal [mm] (not used if 0x00000002 is set in Options).

Curvature

[double] Curvature of the logarithmic spiral. Valid range is 0.0 < Curvature < 1.0.

Objtype

[__int32] Determines the type of objects the spiral will be made of. Possible values are:

 

0

The spiral will be made of lines.

 

1

The spiral will be made of Bézier curves.

 

2

The spiral will be made of a spline.

 

Options

[__int32] A bit-wise OR combination of options. It can be any combination of the following values:

 

0x00000000

No special mode.

 

0x00000001

The number of rotations will be automatically calculated (must not be combined with 0x00000002).

 

0x00000002

The rotation distance will be automatically calculated (must not be combined with 0x00000001).

 

0x00000004

The spiral will be created in reverse orientation, i.e. clockwise starting from the outermost point.

 

0x00000008

The spiral will be logarithmic (not Archimedean).

Center

[MKI_POINT] Center point of the spiral.

Radius

[MKI_POINT] Radius point of the outermost circle.

Angle

[MKI_POINT] Overall rotation relative to Center.

 

Interface Command Sequence

MKI_ExtOpen, OwnerID = MKI_DB_OWNER_MK, Type = MKI_OBJ_EXT_SPIRAL, Flag = MKI_EXTFLAG_CURVE

MKI_ExtAddDouble, Type = 1010, ElemCount = 3

MKI_ExtAddInt32, Type = 1011, ElemCount = 2

MKI_ExtAddPoint, Type = MKI_DB_POINT_CENTER

MKI_ExtAddPoint, Type = MKI_DB_POINT_RADIUS

MKI_ExtAddPoint, Type = MKI_DB_POINT_ANGLE

MKI_ExtFastInsert

 

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

 

MKI_BLOCK_ENUM b1010( f_pExt ),

               b1011( f_pExt ),

               b1( f_pExt ),

               b2( f_pExt ),

               b3( f_pExt );

b1011.SetNext( b1010 );

b1.SetNext( b1011 );

b2.SetNext( b1 );

b3.SetNext( b2 );

 

double dRotation = b1010.Double()[0];

double dDistance = b1010.Double()[1];

double dCurvature = b1010.Double()[2];

__int32 nObjType = b1011.Int32()[0];

__int32 nOptions = b1011.Int32()[1];

MKI_POINT cCenter = b1.Point(0);

MKI_POINT cRadius = b2.Point(0);

MKI_POINT cAngle  = b3.Point(0);

 

CAD6interface 2025.1 - Copyright 2025 Malz++Kassner® GmbH