Schroff Development Corporation SilverScreen CAD Engine
Overview
SS_command
SilverEngine
Commands
SilverPlus
Icommands
SilverC
ToolKit
Functions
SiteMap
   
SilverScreen API Functions
 
 

 

Function Lists

This section contains lists of API functions that are available in SilverC and C++.  This is an abridged list.  The purpose of these lists is not to explain fully the working of each function.  Rather, the purpose is to demonstrate the range and depth of the functional support that is available in the engine.

 

Dialog Functions

These functions create a Windows dialog as a means for requesting information from the user.

A dialog is initiated by pm_initialize.  Up to 15 items may then be attached to the dialog by calling functions such as pm_text and pm_double.  The dialog is displayed by pm_execute.

Name Description
pm_initialize initialize current dialog
pm_execute display current dialog and accept user input
pm_box add a menu selection to the current dialog
pm_color add a color prompt to the current dialog
pm_comment add a comment field to the current dialog
pm_displacement add a displacement prompt to the current dialog
pm_distance add a distance prompt to the current dialog
pm_double add a prompt for a double value to the current dialog
pm_font add a prompt for a TrueType or SilverScreen font to the current dialog
pm_formatted add a prompt for a formatted double value to the current dialog
pm_generic add a generic item prompt to the current dialog
pm_icon add an icon prompt to the current dialog
pm_integer add a prompt for an integer value to the current dialog
pm_line_width add a prompt for an line width to the current dialog
pm_menu add a menu prompt to the current dialog
pm_rgb add a prompt for an RGB value to the current dialog
pm_text add a prompt for a text string to the current dialog
pm_xyz add a prompt for an XYZ value to the current dialog

 

Simple Prompting Functions

These functions ask for information from the user.  Some prompt for entities or primitives while others prompt for distances and locations.

Name Description
ask_multiple prompt for response according to button items
ask_yn prompt for yes/no response
fence_pgroup prompt for primitive group using fence
fence_qgroup prompt for entity group using fence
pick_entity prompt user for an entity using pick mode
pick_primitive prompt user for primitive using pick mode
prompt_color prompt for a color number
prompt_displacement prompt for a displacement value
prompt_distance prompt for a distance value
prompt_entity prompt for entity using either scan mode or pick mode
prompt_line_width prompt for a line width
prompt_pgroup prompt for primitive group using scan mode or pick mode
prompt_point prompt for XYZ location
prompt_primitive prompt for primitive using either scan mode or pick mode
prompt_qgroup prompt for entity group using scan mode or pick mode
prompt_rgb prompt for an RGB value
scan_entity prompt user for entity using scan mode
scan_primitive prompt user for primitive using scan mode

 

Direct Structure Access

These functions use pointers to entities and primitives to retrieve information.

Name Description
bos_extents calculate extents of an entity
bos_on_screen determine if an entity appears on the screen
color_of_edge return color number of object edge
get_bos return pointer to an entity
get_endpoints retrieve endpoints of a line or arc
get_prim return pointer to primitive
interference determine whether two entities interfere
make_path make path to entity given a pointer to the entity
primitive_plane retrieve plane equation of a primitive
rgb_of_edge return RGB values for given object edge
vertex1_of_edge return first vertex number of object edge
vertex2_of_edge return second vertex number of object edge
xyz_of_vertex return XYZ address of vertex number
xyz1_of_edge return first XYZ address of object edge
xyz2_of_edge return second XYZ address of object edge

 

Transformation Matrix Functions

These matrix functions are extremely useful when dealing with 3D geometric problems.

Name Description
tm_clear initialize transformation matrix to unity
tm_cspace retrieve c-space values into transformation matrix
tm_espace retrieve e-space values for an entity into transformation matrix
tm_extents compute entity or primitive extents relative to transformation matrix
tm_inverse compute transformation matrix inverse
tm_multiply multiply transformation matrices
tm_rotate_x generate x-axis rotation matrix
tm_rotate_y generate y-axis rotation matrix
tm_rotate_z generate z-axis rotation matrix
tm_scale_x generate x-axis scaling matrix
tm_scale_y generate y-axis scaling matrix
tm_scale_z generate z-axis scaling matrix
tm_to_2d create transformation matrix by moving two line segments to xy-plane
tm_to_plus_x create transformation matrix by moving line segment to x-axis
tm_to_plus_z create transformation matrix by moving line segment to z-axis
tm_transform transform point to another coordinate system using a transformation matrix
tm_transform_bos transform entity using a transformation matrix
tm_translate generate translation matrix based on XYZ

 

XYZ Arithmetic

These functions operate on the XYZ data type (three doubles).

Name Description
xyz_add add two XYZ's
xyz_angle compute the angle between threee XYZ's
xyz_clear set XYZ components to zero
xyz_distance compute distance between two XYZ's
xyz_div divide an XYZ by a double value
xyz_equal test whether two XYZ's are equal, within epsilon
xyz_mult multiply an XYZ by a double value
xyz_round round XYZ components to zero, based on epsilon
xyz_sub subtract two XYZ's
xyz_zero test whether XYZ components are zero, using epsilon

 

3D Geometry Support Functions

These matrix functions are extremely useful when dealing with 3D geometric problems.

Name Description
c_to_w convert a point from c-space to w-space
cross_product compute cross-product function of three points
dot_product compute dot_product function of two points
get_plane get plane equation for the plane formed by three points
intersect compute the intersection point between two line segments
intersect_3_plane compute the intersection point between three planes
intersect_line_plane compute the intersection point between a line and a plane
p_to_w compute world point from screen coordinates
point_on_line test whether a point lies on a line segment
point_on_plane test whether a point is on a plane
point_on_round test whether a point lies on an arc or circle
point_vs_plane compare a point against a plane
point_vs_polygon compare a point against a polygon
point_vs_solid compare a point against a solid
rel_distance compute relative distance
w_to_c convert a point from w-space to c-space
w_to_p compute screen coordinates from a world point

 

SilverScreen Interface Functions

This is a miscellaneous set of functions that interface with the current SilverScreen environment.

Name Description
clear_window clear current window to its background setting
count_windows count the number of windows in the current screen
cprintf execute a command
error_message display an error message
error_text copy SilverScreen error text into a buffer
eval_expression evaluate SilverScreen expression
get_cspace retrieve current c-space settings
get_tag retrieve tag value
get_group retrieve a group name
get_group_item retrieve an item name from a named group or the q-group
get_pgroup_item retrieve an item name from the q-group
get_version retrieve SilverScreen version information
get_view retrieve current view parameters
fetch_tag search drawing for BOS and tag name
mark_area mark an area in the current window
path_drawing copy drawing directory path into a buffer
path_execution copy execution directory path into a buffer
path_home copy home directory path into a buffer
path_library copy library directory path into a buffer
path_silver copy SilverScreen directory path into a buffer
path_temp copy temporary directory path into a buffer
sys_ablock copy the path of the current annotation block into a buffer
sys_block copy the path of the current block into a buffer
sys_drawing copy the name of the current drawing into a buffer
sys_drawing_fullname copy the full name, including path, of the current drawing into a buffer
sys_object copy the path of the current object into a buffer
sys_screen copy the name of the current screen into a buffer
sys_title copy the title of the current drawing into a buffer
sys_window return the current window number
view_file display a text file in a scrollable window

 

 

 
Schroff Development Corporation
P O Box 1334
Mission KS 66222
Email:   engine@schroff.com
Tel:   913-262-2664
Fax:  913-722-4936