CAM Library
API Reference
General Functions

Common functions used by CAM Library. More...

Functions

int camlib_PathsAsPolygons ()
 Converts paths (and traces) to polygons. The result will be an outlined polygon. Useful when polygons are desired for output. More...
 
int camlib_NoStepRepeat ()
 Explodes Step-Repeat (ie. arrayed data). More...
 
int camlib_IgnoreText ()
 Skips test during the loading of DXF or GDSII. More...
 
int camlib_SetQuietMode ()
 Suppresses translator information outputted to stdout. More...
 
int camlib_UseArcs ()
 Allows CAM Library engine to handle arcs. By default Arcs are not separately processed. More...
 
int camlib_MaxPolygon (int nCount)
 Max. points used in a polygon. (default: 30,000) If a polygon has more points, then it will be sliced into smaller polygons. More...
 
int camlib_ArcDeviation (float fSize)
 Arc approximation tolerance using millimeters (Default is: .01) More...
 
int camlib_ArcResolution (float fDegrees)
 Arc approximation using degrees (Default is: 3) More...
 
int camlib_Scale (float fScale)
 Scales the imported data. (default: 1.0) More...
 
int camlib_DefaultFont (char *value)
 Use this font as the default (default: txt) More...
 
int camlib_IgnoreFigures (int value)
 Assign figure types to be ignored before activating cell. Use -1 to disable Ignorefigures. More...
 
int camlib_SetClipBox (float fLeft, float fBottom, float fRight, float fTop)
 Crop out just a rectangular region of the design you require. More...
 
int camlib_IgnoreLayers (char *value)
 Assign Layer name(s) to ignore. If more than one layer separate using a comma. More...
 
int camlib_IncludeLayers (char *value)
 Assign Layer name(s) to be used. If more than one layer separate using a comma. More...
 
int camlib_GetUserUnits (char *value)
 Get the active user units used in CAM Library API. More...
 
int camlib_SetUserUnits (char *value)
 Set the active user units to be used with CAM Library API's. More...
 
int camlib_SetDatabaseExtents (char *value)
 You can actually modify the CAM Library database to handle various designs extents up to 100x100 meters. small = 1/10 nanometer accuracy. medium = 10 nanometer accuracy. large = 100 nanometer accuracy. The default value is "medium". More...
 
int camlib_ExportArcs ()
 Permits CAM Library to detect line segments (that are organized as an arc) and output as arc entities (instead of line segments). More...
 

Detailed Description

Common functions used by CAM Library.

Function Documentation

◆ camlib_ArcDeviation()

int camlib_ArcDeviation ( float  fSize)

Arc approximation tolerance using millimeters (Default is: .01)

Parameters
fSizeSize of Arc approximation tolerance using millimeters (Default is: .01)
Returns
Returns 0 if successful, else -1.
Note
The smaller the deviation value, the more accurately curves will appear. However the output file size will increase.
See also
camlib_ArcResolution

◆ camlib_ArcResolution()

int camlib_ArcResolution ( float  fDegrees)

Arc approximation using degrees (Default is: 3)

Parameters
fDegreesArc resulution in Degrees
Returns
Returns 0 if successful, else -1.
Note
The smaller the degrees, the more accurately curves will appear. However the output file size will increase.
See also
camlib_ArcDeviation

◆ camlib_DefaultFont()

int camlib_DefaultFont ( char *  value)

Use this font as the default (default: txt)

Parameters
valueDefault font name. The font name can be one of the available font files located in the CAM Library folder ../fonts Make sure to removee the .fnt extesion.
Returns
Returns 0 if successful, else -1.
Note
Font files (*.fnt) are derived from any TrueType or AutoCAD SHX font file. If CAM Library does not have a particular font you wish to use, you can create the font file using ACE 3000 or FAB 3000.
See also
https://support.numericalinnovations.com/support/discussions/topics/14000003029

◆ camlib_ExportArcs()

int camlib_ExportArcs ( )

Permits CAM Library to detect line segments (that are organized as an arc) and output as arc entities (instead of line segments).

Returns
Returns 0 if successful, else -1.

◆ camlib_GetUserUnits()

int camlib_GetUserUnits ( char *  value)

Get the active user units used in CAM Library API.

Parameters
valueThe following are the available user units: "nanometer", "micron", "millimeter", "centimeter", "meter", "inch", "mil", "dpi".
Returns
Returns 0 if successful, else -1.
See also
camlib_SetUserUnits

◆ camlib_IgnoreFigures()

int camlib_IgnoreFigures ( int  value)

Assign figure types to be ignored before activating cell. Use -1 to disable Ignorefigures.

Parameters
valueFigure Types to ignore - defined by CAM_FigureType. Use -1 to disable IgnoreFigures.
Returns
Returns 0 if successful, else -1.
See also
CAM_FigureType

◆ camlib_IgnoreLayers()

int camlib_IgnoreLayers ( char *  value)

Assign Layer name(s) to ignore. If more than one layer separate using a comma.

Parameters
valueA comma separate string which contains the layer names you wish to ignore. Example: layer1,top.pho,layer23,silktop.gbr
Returns
Returns 0 if successful, else -1.
See also
camlib_IncludeLayers

◆ camlib_IgnoreText()

int camlib_IgnoreText ( )

Skips test during the loading of DXF or GDSII.

Returns
Returns 0 if successful, else -1.
Note
Text in Gerber files is simply lines, and will not be detected by this function.

◆ camlib_IncludeLayers()

int camlib_IncludeLayers ( char *  value)

Assign Layer name(s) to be used. If more than one layer separate using a comma.

Parameters
valueA comma separate string which contains the layer names you wish to include. Example: layer1,top.pho,layer23,silktop.gbr
Returns
Returns 0 if successful, else -1.

◆ camlib_MaxPolygon()

int camlib_MaxPolygon ( int  nCount)

Max. points used in a polygon. (default: 30,000) If a polygon has more points, then it will be sliced into smaller polygons.

Parameters
nCountMaximum number of points allowed per polygon.
Returns
Returns 0 if successful, else -1.
Note
Useful in situations where when other tools in a design flow cannot handle large polygons.

◆ camlib_NoStepRepeat()

int camlib_NoStepRepeat ( )

Explodes Step-Repeat (ie. arrayed data).

Returns
Returns 0 if successful, else -1.
Note
Arrayed data will be exploded to individual figures resulting in larger file sizes.
Useful in situations where when other tools in a design flow cannot handle Step and Repeat.

◆ camlib_PathsAsPolygons()

int camlib_PathsAsPolygons ( )

Converts paths (and traces) to polygons. The result will be an outlined polygon. Useful when polygons are desired for output.

Returns
Returns 0 if successful, else -1.

◆ camlib_Scale()

int camlib_Scale ( float  fScale)

Scales the imported data. (default: 1.0)

Parameters
fScaleScale factor for the imported data. (default: 1.0)
Returns
Returns 0 if successful, else -1.

◆ camlib_SetClipBox()

int camlib_SetClipBox ( float  fLeft,
float  fBottom,
float  fRight,
float  fTop 
)

Crop out just a rectangular region of the design you require.

Parameters
fLeftClip design to extents Left.
fBottomClip design to extents Bottom.
fRightClip design to extents Right.
fTopClip design to extents Top.
Returns
Returns 0 if successful, else -1.
Note
Many times only a section of the design needs to be extracted for analysis, simulation, or other purposes. Clipping a design for a specific rectangular region will drastically reduce file sizes and processing time.

◆ camlib_SetDatabaseExtents()

int camlib_SetDatabaseExtents ( char *  value)

You can actually modify the CAM Library database to handle various designs extents up to 100x100 meters. small = 1/10 nanometer accuracy. medium = 10 nanometer accuracy. large = 100 nanometer accuracy. The default value is "medium".

Parameters
valueThe following are the available database extents: "small", "medium", "large".
Returns
Returns 0 if successful, else -1.
Note
Typically most PCB designs go down to 1 mil traces and spacing - which is the limit of most PCB Fabricators. You can set CAM Library to handle Micro dimension capabilities (0.1 nm trace/space) by setting the Database Extents to "small". You can set CAM Library to handle Macro dimension capabilities (1000 meters) by setting the Database Extents to "large".
See also
https://support.numericalinnovations.com/support/discussions/topics/14000012798

◆ camlib_SetQuietMode()

int camlib_SetQuietMode ( )

Suppresses translator information outputted to stdout.

Returns
Returns 0 if successful, else -1.

◆ camlib_SetUserUnits()

int camlib_SetUserUnits ( char *  value)

Set the active user units to be used with CAM Library API's.

Parameters
valueThe following are the available user units: "nanometer", "micron", "millimeter", "centimeter", "meter", "inch", "mil", "dpi".
Returns
Returns 0 if successful, else -1.
See also
camlib_GetUserUnits

◆ camlib_UseArcs()

int camlib_UseArcs ( )

Allows CAM Library engine to handle arcs. By default Arcs are not separately processed.

Returns
Returns 0 if successful, else -1.