CAM Library
API Reference
|
|
Available Add Functions used by CAM Library.
More...
|
int | camlib_Add_Polygon (int nLayer) |
| Add a Polygon to the active cell. May be used after camlib_ActivateCell and Point Array Functions. More...
|
|
int | camlib_Add_Line (int nLayer) |
| Add a 0-Width Line to the active cell. May be used after camlib_ActivateCell and Point Array Functions. More...
|
|
int | camlib_Add_Path (int nLayer, float fWidth, int nPathType) |
| Add a Path to the active cell. May be used after camlib_ActivateCell and Point Array Functions. More...
|
|
int | camlib_Add_Arc (int nLayer, float sx, float sy, float ex, float ey, float cx, float cy, int dir, float fWidth) |
| Add an Arc path to the active cell. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_Text (int nLayer, char *textvalue, char *textstyle, float x, float y, float height, float angle, int mirror, char *align) |
| Add Text to the active cell. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_Flash (int nLayer, float x, float y, int dcode) |
| Add a flashed Pad to active cell. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_Flash_Circle (int nLayer, float x, float y, float od, float id) |
| Add a flashed Circle or Donut Pad to active cell. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_Flash_Rectangle (int nLayer, float x, float y, float width, float height, float corner_radius, float angle) |
| Add a flashed Rectangle Pad to active cell. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_Component (char *part_side, float x, float y, float width, float height, float angle, char *ref_des, char *part_name, char *part_description, float part_height) |
| Add a Component to active cell. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_Insert (char *insertname, float x, float y, float angle, int mirror, int rows, int cols, float rowdist, float coldist) |
| Add an Insert to active cell. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_SetCompositeLevel (int nCompositeLevel) |
| Set active composite level to newly added figures. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_SetPurpose (int nPurpose) |
| Set active purpose number to newly added figures. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_NC_Drill (int nLayer, float x, float y, float diameter, int plated) |
| Add NC drill hit to the active cell. May be used after camlib_ActivateCell. More...
|
|
int | camlib_Add_NC_Rout (int nLayer, float diameter) |
| Add a Rout path to the active cell. May be used after camlib_ActivateCell and Point Array Functions. More...
|
|
Available Add Functions used by CAM Library.
◆ camlib_Add_Arc()
int camlib_Add_Arc |
( |
int |
nLayer, |
|
|
float |
sx, |
|
|
float |
sy, |
|
|
float |
ex, |
|
|
float |
ey, |
|
|
float |
cx, |
|
|
float |
cy, |
|
|
int |
dir, |
|
|
float |
fWidth |
|
) |
| |
Add an Arc path to the active cell. May be used after camlib_ActivateCell.
- Parameters
-
- Returns
- Returns 0 if successful, else -1.
◆ camlib_Add_Component()
int camlib_Add_Component |
( |
char * |
part_side, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
width, |
|
|
float |
height, |
|
|
float |
angle, |
|
|
char * |
ref_des, |
|
|
char * |
part_name, |
|
|
char * |
part_description, |
|
|
float |
part_height |
|
) |
| |
Add a Component to active cell. May be used after camlib_ActivateCell.
- Note
- Does not require a footprint. This function makes it much more quick to add components.
- Parameters
-
part_side | Layer to place component. Must be either "top" or "bottom". |
x | Insert point (X value in user units) To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
y | Insert point (Y value in user units) To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
width | Horizontal size of the component (value in user units). To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
height | Vertical size of the component (value in user units). To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
angle | Rotation angle of Component in degrees. Default value should be 0. |
ref_des | Component Reference Designator. Should be Unique per job. |
part_name | Component Part identification. Typically this part_name will be referenced in other sources like the BOM file, etc. |
part_description | Component Part description. Default is empty string "" |
part_height | Actual Part Height (value in user units). (i.e Component Thickness or Z value used to calculate enclousre fit). Default value should be 0. |
- Returns
- Returns 0 if successful, else -1.
Sample Code C++:
camlib_Add_Component(
"top", 2.0, 0.1, 0.2, 0.1, 0,
"R122",
"ERA3AEB123V",
"Res Thin Film 0603 12K Ohm 0.1% 1/10W" );
camlib_Add_Component(
"bottom", 3.225, 2.1, 0.95, 0.95, 45,
"U23",
"N80C188-16",
"MCU CISC 16-Bit 16MHz 68-Pin PLCC", 0.175 );
◆ camlib_Add_Flash()
int camlib_Add_Flash |
( |
int |
nLayer, |
|
|
float |
x, |
|
|
float |
y, |
|
|
int |
dcode |
|
) |
| |
Add a flashed Pad to active cell. May be used after camlib_ActivateCell.
- Parameters
-
- Returns
- Returns 0 if successful, else -1.
- Note
- The internal point array must have 2 or more points.
◆ camlib_Add_Flash_Circle()
int camlib_Add_Flash_Circle |
( |
int |
nLayer, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
od, |
|
|
float |
id |
|
) |
| |
Add a flashed Circle or Donut Pad to active cell. May be used after camlib_ActivateCell.
- Note
- Does not require an existing aperture or Dcode. This function makes it much more natrural to add pads.
- Parameters
-
- Returns
- Returns 0 if successful, else -1.
◆ camlib_Add_Flash_Rectangle()
int camlib_Add_Flash_Rectangle |
( |
int |
nLayer, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
width, |
|
|
float |
height, |
|
|
float |
corner_radius, |
|
|
float |
angle |
|
) |
| |
Add a flashed Rectangle Pad to active cell. May be used after camlib_ActivateCell.
- Note
- Does not require an existing aperture or Dcode. This function makes it much more natrural to add pads.
- Parameters
-
nLayer | Layer number to place flashed pad. |
x | Insert point (X value in user units) To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
y | Insert point (Y value in user units) To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
width | Width of flash (i.e. horizontal size in user units). To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
height | Height of flash (i.e. vertical size in user units). To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
corner_radius | Corner radius of rectangle (in user units). Default value should be 0. If greater than 0 will result in either a Rounded Rectangle or Oblong shape (depending on radius value used). |
angle | Rotation angle of flash in degrees. Default value should be 0. |
- Returns
- Returns 0 if successful, else -1.
◆ camlib_Add_Insert()
int camlib_Add_Insert |
( |
char * |
insertname, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
angle, |
|
|
int |
mirror, |
|
|
int |
rows, |
|
|
int |
cols, |
|
|
float |
rowdist, |
|
|
float |
coldist |
|
) |
| |
Add an Insert to active cell. May be used after camlib_ActivateCell.
- Parameters
-
- Returns
- Returns 0 if successful, else -1.
◆ camlib_Add_Line()
int camlib_Add_Line |
( |
int |
nLayer | ) |
|
◆ camlib_Add_NC_Drill()
int camlib_Add_NC_Drill |
( |
int |
nLayer, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
diameter, |
|
|
int |
plated |
|
) |
| |
Add NC drill hit to the active cell. May be used after camlib_ActivateCell.
- Parameters
-
- Returns
- Returns 0 if successful, else -1.
◆ camlib_Add_NC_Rout()
int camlib_Add_NC_Rout |
( |
int |
nLayer, |
|
|
float |
diameter |
|
) |
| |
◆ camlib_Add_Path()
int camlib_Add_Path |
( |
int |
nLayer, |
|
|
float |
fWidth, |
|
|
int |
nPathType |
|
) |
| |
◆ camlib_Add_Polygon()
int camlib_Add_Polygon |
( |
int |
nLayer | ) |
|
◆ camlib_Add_SetCompositeLevel()
int camlib_Add_SetCompositeLevel |
( |
int |
nCompositeLevel | ) |
|
Set active composite level to newly added figures. May be used after camlib_ActivateCell.
- Note
- For more information about composites please see, Composite 101
- Parameters
-
nCompositeLevel | Composite Level (i.e. Dark/Clear) to use for the following figures added using CAM Library API. |
- Returns
- Returns 0 if successful, else -1.
- Note
- This Comppste Level setting remains current until changed by camlib_Add_SetCompositeLevel, or export has started.
◆ camlib_Add_SetPurpose()
int camlib_Add_SetPurpose |
( |
int |
nPurpose | ) |
|
Set active purpose number to newly added figures. May be used after camlib_ActivateCell.
- Parameters
-
nPurpose | Purpose number to use for the following figures added using CAM Library API. |
- Returns
- Returns 0 if successful, else -1.
◆ camlib_Add_Text()
int camlib_Add_Text |
( |
int |
nLayer, |
|
|
char * |
textvalue, |
|
|
char * |
textstyle, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
height, |
|
|
float |
angle, |
|
|
int |
mirror, |
|
|
char * |
align |
|
) |
| |
Add Text to the active cell. May be used after camlib_ActivateCell.
- Parameters
-
nLayer | Layer number to place Text. |
textvalue | Text string to use. |
textstyle | Text style to use (can be Truetype name or SHX font file name) |
x | Insert point (X value in user units) To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
y | Insert point (Y value in user units) To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
height | Height of arc (in user units). To change user units see, camlib_SetUserUnits or camlib_GetUserUnits |
angle | Text angle (in degrees) |
mirror | Mirror text horizontally (1 = yes, 0 = no mirror). |
align | text alignment. Default is "lowerleft". Choose from the following:
- "upperleft" = Upper Left Alignment
- "centerleft" = Center Left Alignment
- "lowerleft" = Lower Left Alignment
- "uppercenter" = Upper Center Alignment
- "centercenter" = Center Center Alignment
- "lowercenter" = Lower Center Alignment
- "upperright" = Upper Right Alignment
- "centerright" = Center Right Alignment
- "lowerright" = Lower Right Alignment
|
- Returns
- Returns 0 if successful, else -1.
Sample Code C++:
camlib_Add_Text( 3,
"My Sample Text #1",
"arial", 1.0, 1.0, 0.5, 0.0, 0,
"lowerleft" );
camlib_Add_Text( 3,
"My Sample Text #2",
"txt.shx", 1.0, 3.0, 0.3, 90.0, 0,
"centerleft" );
int camlib_PointArray_Empty()
Clear internal point array. May be used after camlib_ActivateCell.
int camlib_Add_Flash(int nLayer, float x, float y, int dcode)
Add a flashed Pad to active cell. May be used after camlib_ActivateCell.
int camlib_Add_Polygon(int nLayer)
Add a Polygon to the active cell. May be used after camlib_ActivateCell and Point Array Functions.
int camlib_Add_Insert(char *insertname, float x, float y, float angle, int mirror, int rows, int cols, float rowdist, float coldist)
Add an Insert to active cell. May be used after camlib_ActivateCell.
int camlib_Add_Line(int nLayer)
Add a 0-Width Line to the active cell. May be used after camlib_ActivateCell and Point Array Function...
int camlib_Add_Flash_Rectangle(int nLayer, float x, float y, float width, float height, float corner_radius, float angle)
Add a flashed Rectangle Pad to active cell. May be used after camlib_ActivateCell.
int camlib_Add_NC_Rout(int nLayer, float diameter)
Add a Rout path to the active cell. May be used after camlib_ActivateCell and Point Array Functions.
Clockwise direction of the arc.
Definition: CamLib.h:91
int camlib_Add_Arc(int nLayer, float sx, float sy, float ex, float ey, float cx, float cy, int dir, float fWidth)
Add an Arc path to the active cell. May be used after camlib_ActivateCell.
int camlib_PointArray_Append(float x, float y)
Add point to internal point array. May be used after camlib_ActivateCell.
int camlib_SetUserUnits(char *value)
Set the active user units to be used with CAM Library API's.
int camlib_Add_Flash_Circle(int nLayer, float x, float y, float od, float id)
Add a flashed Circle or Donut Pad to active cell. May be used after camlib_ActivateCell.
int camlib_Add_NC_Drill(int nLayer, float x, float y, float diameter, int plated)
Add NC drill hit to the active cell. May be used after camlib_ActivateCell.
int camlib_Add_Text(int nLayer, char *textvalue, char *textstyle, float x, float y, float height, float angle, int mirror, char *align)
Add Text to the active cell. May be used after camlib_ActivateCell.
int camlib_Add_Path(int nLayer, float fWidth, int nPathType)
Add a Path to the active cell. May be used after camlib_ActivateCell and Point Array Functions.
This style results in an extension with a radius equal to one-half the Path width.
Definition: CamLib.h:74
int camlib_Add_Component(char *part_side, float x, float y, float width, float height, float angle, char *ref_des, char *part_name, char *part_description, float part_height)
Add a Component to active cell. May be used after camlib_ActivateCell.