ARTWORK CONVERSION SOFTWARE

GDSII | QISBOOL | Index

 

QisBool Clipping Functions

 

 

 


 

QisBool_ClipPathToRegion

 

Objective

To clip a path to a polygonal region.

Prototype

int QisBool_ClipPathToRegion(

  int* iXY, int iNV, int iWidth, EPathType iPathType, int* iRegionXY,

  int iRegionNV, int*** oXY, int** oNV, int* oN, void* iBooleanHandle

);

Input Arguments

a.     int* iXY: The x,y co-ordinates of the path to be clipped.

b.     int iNV: The number of vertices in the path to be clipped.

c.     int iWidth: The width of the path to be clipped.

d.     EPathType iPathType:

eFLUSH_PATH: Flush path.

eROUND_PATH: Round path.

eHALFEXT_PATH: Half extended path.

e.     int* iRegionXY: The x,y co-ordinates of the clipping region.

f.      int iRegionNV: The number of vertices of the clipping region.

g.     void* iBooleanHandle: A handle to an instance of QisBool obtained by QisBool_Create.

Output Arguments

a.     int* oN: Number of polygons in the output.

b.     int** oNV: A list of number of vertices for each one of the output polygons. (*oN integers)

c.     int*** oXY: A list of x,y co-ordinates of each one of the output polygons. (*oN integer arrays)

Return Value

a.     success: 0

b.     failure: < 0. Call QisBool_ErrorMsg to get the details.

Pre-Conditions

a.     The clipping region must be a regular closed polygon.

Operation

a.     This function clips the specified path to the specified polygonal region and generates a list of clipped paths (whose width and type are assumed to be the same as input).

b.     Although this function uses the path type and width, the output is just an approximation. The most accurate way to clip a path is to first convert it into a boundary and then use one of the boolean operations to do clipping.

Post-Conditions

a.     The memory allocated to store the output polygons (oNV, oXY) must be released using QisBool_Release.

C++ Equivalent

  virtual int IQisBool::ClipPathToRegion(

    int* iXY, int iNV, int iWidth, EPathType iPathType, int* iRegionXY,

    int iRegionNV, int*** oXY, int** oNV, int* oN

  ) = 0;

See Also

QisBool_Release

 

 


 

QisBool_ClipPathToWindow

 

Objective

To clip a path to a rectangular window.

Prototype

int QisBool_ClipPathToWindow(

  int* iXY, int iNV, int iWindow[4], int*** oXY, int** oNV, int* oN,

  void* iBooleanHandle

);

Input Arguments

a.     int* iXY: The x,y co-ordinates of the path to be clipped.

b.     int iNV: The number of vertices in the path to be clipped.

c.     int iWindow[4]: The min-max extents of the clipping window.

d.     void* iBooleanHandle: A handle to an instance of QisBool obtained by QisBool_Create.

Output Arguments

a.     int* oN: Number of polygons in the output.

b.     int** oNV: A list of number of vertices for each one of the output polygons. (*oN integers)

c.     int*** oXY: A list of x,y co-ordinates of each one of the output polygons. (*oN integer arrays)

Return Value

a.     success: 0

b.     failure: < 0. Call QisBool_ErrorMsg to get the details.

Pre-Conditions

-

Operation

a.     This function clips the specified path to the specified rectangular window and generates a list of clipped paths (whose width and type are assumed to be the same as input).

b.     This function ignores the path type and width and therefore the output is an approximation. The most accurate way to clip a path is to first convert it into a boundary and then use one of the boolean operations to do clipping.

Post-Conditions

a.     The memory allocated to store the output polygons (oNV, oXY) must be released using QisBool_Release.

C++ Equivalent

  virtual int IQisBool::ClipPathToWindow(

    int* iXY, int iNV, int iWindow[4], int*** oXY, int** oNV, int* oN

  ) = 0;

See Also

QisBool_Release

 

 


 

QisBool_ClipPathToLeonov

 

Objective

To clip a path to a Leonov region.

Prototype

int QisBool_ClipPathToLeonov(

  int* iXY, int iNV, int** iLXY, int* iLNV, int iLN,

  int*** oXY, int** oNV, int* oN, void* iBoolHandle

);

Input Arguments

a.     int* iXY: The x,y co-ordinates of the path to be clipped.

b.     int iNV: The number of vertices in the path to be clipped.

c.     int* iLXY: The x,y co-ordinates of the polygons in the clipping leonov region.

d.     int iLNV: The number of vertices in each of the polygons in the clipping leonov regions.

e.     int iLN: The number of polygons in the leonov region.

f.      void* iBooleanHandle: A handle to an instance of QisBool obtained by QisBool_Create

Output Arguments

a.     int* oN: Number of polygons in the output.

b.     int** oNV: A list of number of vertices for each one of the output polygons. (*oN integers)

c.     int*** oXY: A list of x,y co-ordinates of each one of the output polygons. (*oN integer arrays)

Return Value

a.     success: 0

b.     failure: < 0. Call QisBool_ErrorMsg to get the details.

Pre-Conditions

a.     The leonov region must consist of an outer polygon (with -ve number of vertices) followed by a list of polygons that form the holes (with +ve number of vertices).

Operation

a.     This function clips the specified path to the specified leonov region and generates a list of clipped paths (whose width and type are assumed to be the same as input).

b.     This function ignores the path type and width and therefore the output is an approximation. The most accurate way to clip a path is to first convert it into a boundary and then use one of the boolean operations to do clipping.

Post-Conditions

a.     The memory allocated to store the output polygons (oNV, oXY) must be released using QisBool_Release.

C++ Equivalent

  virtual int IQisBool::ClipPathToLeonov(

    int* iXY, int iNV, int** iLXY, int* iLNV, int iLN,

    int*** oXY, int** oNV, int* oN

  ) = 0;

See Also

QisBool_Release

 

 


 

QisBool_ClipPathToMultiRegions

 

Objective

To clip a path to multiple polygonal regions.

Prototype

int QisBool_ClipPathToMultiRegions(

  int* iXY, int iNV, int** iRXY, int* iRNV, int iRN,

  int*** oXY, int** oNV, int* oN, void* iBoolHandle

);

Input Arguments

a.     int* iXY: The x,y co-ordinates of the path to be clipped.

b.     int iNV: The number of vertices in the path to be clipped.

c.     int* iRXY: The x,y co-ordinates of the polygons in the clipping regions.

d.     int iRNV: The number of vertices in each of the polygons in the clipping regions.

e.     int iRN: The number of polygons in the clipping regions.

f.      void* iBooleanHandle: A handle to an instance of QisBool obtained by QisBool_Create.

Output Arguments

a.     int* oN: Number of polygons in the output.

b.     int** oNV: A list of number of vertices for each one of the output polygons. (*oN integers)

c.     int*** oXY: A list of x,y co-ordinates of each one of the output polygons. (*oN integer arrays)

Return Value

a.     success: 0

b.     failure: < 0. Call QisBool_ErrorMsg to get the details

Pre-Conditions

a.     The clipping regions must be regular closed polygons.

Operation

a.     This function clips the specified path to multiple polygonal regions and generates a list of clipped paths (whose width and type are assumed to be the same as input).

b.     This function ignore the path type and width and therefore the output is an approximation. The most accurate way to clip a path is to first convert it into a boundary and then use one of the boolean operations to do clipping.

Post-Conditions

a.     The memory allocated to store the output polygons (oNV, oXY) must be released using QisBool_Release.

C++ Equivalent

  virtual int IQisBool::ClipPathToMultiRegions(

    int* iXY, int iNV, int** iRXY, int* iRNV, int iRN,

    int*** oXY, int** oNV, int* oN

  ) = 0;

See Also

QisBool_Release

 

 


 

 

 

© 2012 Artwork Conversion Software Inc.

417 Ingalls St. Santa Cruz CA 95060

[T] +1 831-426-6163 [F] +1 831-[E] info@artwork.com