<< Click to Display Table of Contents > 

Client Control Interface Manual > Job > Entities Properties > Transformations

Transformations
Previous pageReturn to chapter overviewNext page

Center Entity

Entity Outline

Mirror Entity

Outline 2D

Rotate Entity

Rotate Entity (Double Data ID)

Rotate Entity (String Data ID)

Rotation Angle & Outline

Scale Entity

Scale Entity (Current Position)

Translate Entity

Translate Entity (String Data ID)

 

Center Entity

 

☒  Set

☐  Get

DLL Function

int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Axis)

ASCII Function

int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Axis)

Description

Center the entities with respect to the defined axis

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlLongDataIdEntityCenter

129

Axis

Type: int

Unit: none

6: Center horizontally

7: Center vertically

8: Center both

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Center the entity "entity1" in both axes:

 

int CCI_Return = cci.ScSetEntityLongData( "entity1", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityCenter, 8 );

Table 190: Center Entity

Entity Outline

☐  Set

☒  Get

DLL Function

double Value = ScGetEntityOutline(string Entity_Name, int Index)

ASCII Function

double Value = ScCciGetEntityOutline(string Entity_Name, int Index)

Description

Returns the outline of the current enitity specified by Entity_Name. The following constants can be set for Index to specify which outline value has to be returned.

Entity_Name

Type: string

Unit: none

If Entity_Name is an empty string, the function returns the job outline.

Index

Type: int

ID:

Location: ScComSAMLightClientCtrlExecCommandConstants

scComSAMLightClientCtrlOutlineIndexMinX

0

The smallest x coordinate.

scComSAMLightClientCtrlOutlineIndexMinY

1

The smallest y coordinate.

scComSAMLightClientCtrlOutlineIndexMinZ

2

The smallest z coordinate.

scComSAMLightClientCtrlOutlineIndexMaxX

3

The biggest x coordinate.

scComSAMLightClientCtrlOutlineIndexMaxY

4

The biggest y coordinate.

scComSAMLightClientCtrlOutlineIndexMaxZ

5

The biggest z coordinate.

Value

Type: double

Unit: [mm]*

The corresponding value.

Notes

The default unit is mm, but the user can select a different unit.

C# Example: Get the biggest x coordinate of the whole job:

 

double Max_X = cci.ScGetEntityOutline( "", 3 );

Table 191: Entity Outline

Mirror Entity

 

☒  Set

☐  Get

DLL Function

int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Mirror_Plane)

ASCII Function

int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Mirror_Plane)

Description

Mirrors the specified entity along the specified plane. The same functionality as the buttons of page Z-Dimension > Mirror and Rotate.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlLongDataIdEntityMirrorOnPlane

120

Mirror_Plane

Type: int

Unit: none

1: xz-plane with y = center of field

2: yz-plane with x = center of field

3: xy-plane with z = center of field

4: xz-plane with y = center of entity

5: yz-plane with x = center of entity

6: xy-plane with z = center of entity

CCI_Return

Type: int

CCI return number, see error list.

Notes

You can set only one flag simultaneously.

C# Example: Mirror the entity "entity1" on the xz-plane with y in the center of field

 

int CCI_Return = cci.ScSetEntityLongData( "entity1", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityMirrorOnPlane, 1 );

Table 192: Mirror Entity

Outline 2D
 

Set

Get

DLL Function

int CCI_Return = ScSetEntityOutline2D(string Entity_Name, double Min_X, double Min_Y, double Max_X, double Max_Y, int Index)

int CCI_Return = ScGetEntityOutline2D(string Entity_Name, ref double Min_X, ref double Min_Y, ref double Max_X, ref double Max_Y)

ASCII Function

int CCI_Return = ScCciSetEntityOutline2D(string Entity_Name, double Min_X, double Min_Y, double Max_X, double Max_Y, int Index)

double Min_X double Min_Y double Max_X double Max_Y = ScCciGetEntityOutline2D(string Entity_Name)

Description

With this command the total 2D outlines of all entities with Entity_Name can be set or get.

Entity_Name

Type: string

Unit: none

If Entity_Name is an empty string, the function returns the job outline.

Min_X

Type: double

Unit: none

The smallest x coordinate.

Min_Y

Type: double

Unit: none

The smallest y coordinate.

Max_X

Type: double

Unit: none

The biggest x coordinate.

Max_Y

Type: double

Unit: none

The biggest y coordinate.

Index

Type: int

Index:

Location: ScComSAMLightClientCtrlFlags

-

0

Entity will be scaled like defined by the parameters.

scComSAMLightClientCtrlSetOutlineNoMove

1

Left down point will stay at current position. Just the dimension will be changed, defined by: X_dim = Max_X - Min_X and Y_dim = Max_Y - Min_Y.

scComSAMLightClientCtrlSetOutlineNoSize

2

Specity the center coordinates. The dimension will be ignored.

X_center = Max_X = Min_X and Y_center = Max_Y = Min_Y.

CCI_Return

Type: int

CCI return number, see error list.

Note

Max coordinate has to be bigger than Min coordinate

For this command the index cannot be combined.

This command can also be used for 1D entities. In this case make sure that Min_X = Max_X or Min_Y = Max_Y.

C# Example: Set new outline for the entity "circle":
 
int CCI_Return = cci.ScSetEntityOutline2D( "circle", -15, -10, 20, 15, 0 );

C# Example: Get current outline of entity "circle":

 
double Min_X, Min_Y, Max_X, Max_Y;

Min_X = Min_Y = Max_X = Max_Y = 0.0;

int CCI_Return = cci.ScGetEntityOutline2D( "circle", ref Min_X, ref Min_Y, ref Max_X, ref Max_Y );

Table 193: Outline 2D

Rotate Entity
 

☒  Set

☐  Get

DLL Function

int CCI_Return = ScRotateEntity(string Entity_Name, double Center_X, double Center_Y, double Angle)

ASCII Function

int CCI_Return = ScCciRotateEntity(string Entity_Name, double Center_X, double Center_Y, double Angle)

Description

Relative rotation around a chosen center.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Center_X

Type: double

Unit: none

Rotation center X.

Center_Y

Type: double

Unit: none

Rotation center Y.

Angle

Type: double

Unit: [deg]

Relative rotation angle. Counterclockwise for positive angles.

CCI_Return

Type: int

CCI return number, see error list.

Notes

If Entity_Name is an empty string the complete job is rotated.

C# Example: Rotate the entity "Rectangle" by 45.5 degrees around the origin:

 

int CCI_Return = cci.ScRotateEntity( "Rectangle", 0.0, 0.0, 45.5 );

Table 194: Rotate Entity

Rotate Entity (Double Data ID)
 

☒  Set

☒  Get

DLL Function

int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Angle)

int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Angle)

ASCII Function

int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Angle)

double Angle = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)

Description

Relative rotation around the entity center.

Get the rotation angle.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlDoubleDataIdEntityRotationAngle

71

Angle

Type: double

Unit: [deg]

(Relative) rotation angle. Counterclockwise for positive angles.

CCI_Return

Type: int

CCI return number, see error list.

Notes

If Entity_Name is an empty string the each entity in the job is rotated.

C# Example: Get the rotation angle of the entity "Rectangle":

 

double Rot_Angle = 0;

int CCI_Return = cci.ScGetEntityDoubleData( "Rectangle", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdEntityRotationAngle, ref Entity_Rotation_Angle );

C# Example: Rotate entity "Rectangle" to 50° relative:

 

int CCI_Return = cci.ScSetEntityDoubleData( "Rectangle", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdEntityRotationAngle, 50.0 );

Table 195: Rotate Entity (Double Data ID)

Rotate Entity (String Data ID)

 

☒  Set

☐  Get

DLL Function

int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Rotation_Param)

ASCII Function

int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Rotation_Param)

Description

Relative rotation around a chosen center. Multiple objects can be rotated with different parameters.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlStringDataIdRotate

30

Rotation_Param

Type: string

Unit: [mm*, mm*, °]

"CenterX;CenterY;Angle": A string containing of rotation center X, rotation center Y and relative rotation angle separated by semicolon ";". The parameters for multiple entities have to be separated by vertical tab "\v".

CCI _Return

Type: int

CCI return number, see error list.

Notes

If Entity_Name is an empty string the complete job is rotated.

If used for multiple entities Entity_NamesSeparatedBySemicolon has to be set.

C# Example: Rotate entity "Rectangle" around the center (0.0, 0.0)  by 45.0 degrees and rotate entity "Text" around the center (50.0, 50.0)  by 10.0 degrees.:
 
int CCI_Return = cci.ScSetEntityStringData( "Rectangle;Text", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdRotate, "0.0;0.0;45.0\v50.0;50.0;10.0" );

Table 196: Rotate Entity (String Data ID)

Rotation Angle & Outline
 

☐ Set

☒ Get

DLL Function

int CCI_Return = ScGetEntityStringData(string Entity_Name, int Data_ID, ref string Outl_Angle)

ASCII Function

string Outl_Angle = ScCciGetEntityStringData(string Entity_Name, int Data_ID)

Description

This allows to get the Outline and the Rotation Angle of the Entities defined by Entity_Name.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed

Data_ID

Type: int

ID:

Location: Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlStringDataIdOutlineAndRotate

31

Outl_Angle

Type: string

Unit: [mm*, mm*, mm*, mm*, °]

Returns the outline and the rotation angle in the following format:

"MinX;MinY;MaxX;MaxY;Angle"

CCI_Return

Type: int

CCI return number, see error list.

Notes

If used for multiple entities Entity_NamesSeparatedBySemicolon has to be set. Outl_Angle will hold the Outlines and Rotation Angle in a list in the format "MinX;MinY;MaxX;MaxY;Angle".

C# Example: Get the outline and the rotation angle of the entity "entity1":

 

string Outl_Angle = "";

int CCI_Return = cci.ScGetEntityStringData( "entity1", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdOutlineAndRotate, ref Outl_Angle );

Table 197: Rotation Angle & Outline

Scale Entity
 

☒ Set

☐ Get

DLL Function

int CCI_Return = ScScaleEntity(string Entity_Name, double Scale_X, double Scale_Y, double Scale_Z)

ASCII Function

int CCI_Return = ScCciScaleEntity(string Entity_Name, double Scale_X, double Scale_Y, double Scale_Z)

Description

Scales the entity specified by Entity_Name. The scaling center is the center of field.

Entity_Name

Type: string

Unit: none

The Entity to be scaled.

Scale_X

Type: double

Unit: none

Scaling coefficient in x direction.

Scale_Y

Type: double

Unit: none

Scaling coefficient in y direction.

Scale_Z

Type: double

Unit: none

Scaling coefficient in z direction.

CCI_Return

Type: int

CCI return number, see error list.

Notes

If Entity_Name is set to an empty string the complete job is scaled.

C# Example: Scale the entity "entity1" by factor 2 in y direction:

 

int CCI_Return = cci.ScScaleEntity( "entity1", 1.0, 2.0, 1.0 );

Table 198: Scale Entity

Scale Entity (Current Position)
 

☒ Set

☐ Get

DLL Function

int CCI_Return = ScScaleEntityCurPos(string Entity_Name, double Scale_X, double Scale_Y, double Scale_Z)

ASCII Function

int CCI_Return = ScCciScaleEntityCurPos(string Entity_Name, double Scale_X, double Scale_Y, double Scale_Z)

Description

Scales the entity specified by Entity_Name. The scaling center is the center of entity.

Entity_Name

Type: string

Unit: none

The Entity to be scaled.

Scale_X

Type: double

Unit: none

Scaling coefficient in x direction.

Scale_Y

Type: double

Unit: none

Scaling coefficient in y direction.

Scale_Z

Type: double

Unit: none

Scaling coefficient in z direction.

CCI_Return

Type: int

CCI return number, see error list.

Notes

If Entity_Name is set to an empty string the complete job is scaled.

C# Example: Scale the entity "entity1" by factor 2 in y direction:

 

int CCI_Return = cci.ScScaleEntityCurPos( "entity1", 1.0, 2.0, 1.0 );

Table 199: Scale Entity (Current Position)

Translate Entity
 

☒  Set

☐  Get

DLL Function

int CCI_Return = ScTranslateEntity(string Entity_Name, double X, double Y, double Z)

ASCII Function

int CCI_Return = ScCciTranslateEntity(string Entity_Name, double X, double Y, double Z)

Description

Translates the an entity relative to its current position.

Entity_Name

Type: string

Unit: none

The Entity to be translated.

X

Type: double

Unit: [mm]*

The relative x coordinate.

Y

Type: double

Unit: [mm]*

The relative y coordinate.

Z

Type: double

Unit: [mm]*

The relative z coordinate.

CCI_Return

Type: int

CCI return number, see error list.

Notes

If Entity_Name is set to an empty string the complete job is translated.

The default unit is mm, but the user can select a different unit.

C# Example: Translate the entity "entity1" by 15 mm in x direction:

 

int CCI_Return = cci.ScTranslateEntity( "entity1", 15.0, 0.0, 0.0 );

Table 200: Translate Entity

Translate Entity (String Data ID)
 

☒  Set

☐  Get

DLL Function

int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Coordinates)

ASCII Function

int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Coordinates)

Description

Translates the an entity relative to its current position. Multiple objects can be rotated with different parameters.

Entity_Name

Type: string

Unit: none

This allows to translate the entity or entities defined by Entity_Name.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlStringDataIdTranslate

29

Coordinates

Type: string

Unit: none

"X;Y;Z" A string containing of X translation, Y translation and Z translation separated by semicolon ";". The parameters for multiple entities have to be separated by vertical tab "\v".

CCI_Return

Type: int

CCI return number, see error list.

Notes

If used for multiple entities Entity_NamesSeparatedBySemicolon has to be set.

C# Example: Translate the entity "Rectangle" by 5.0 mm in Y and translate the entity "Text" by 1.0 mm in X:

 

int CCI_Return = cci.ScSetEntityStringData( "Rectangle;Text", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTranslate, "0.0;5.0;0.0\v1.0;0.0;0.0" );

Table 201: Translate Entity (String Data ID)