DMM Varkon® Tutorial
A Beginner's Guide to the Varkon Parametric Modeling and CAD Application Development System
By David M. MacMillan
The following MBS module shows a vertical stack of width 0 (i.e., as thin as possible) lines through a range of lfonts (line styles). Lines are displayed with the lfont number on the left.
The calling syntax is:
showlfonts (firstlfont, numlfonts, lfontspacing, lfontlength);
All parameters are integers.
! Draw examples of all lfonts (line fonts, which are line styles)
global drawing module showlfonts(
vector start, stop;
float x1, y1;
float x2, y2;
float dx, dy;
dx := lfontlength;
dy := lfontspacing;
x1 := 0;
y1 := 0;
x2 := x1 + dx;
y2 := 0;
for ix := firstlfont to (firstlfont + numlfonts - 1) do
y1 := y1 + dy;
y2 := y2 + dy;
start := vec (x1, y1);
stop := vec (x2, y2);
textpos := vec (x1 - 5, y1);
text (#3, textpos, 0, str(ix, 2, 0): tsize=2);
lin_free (#4, start, stop: width=0, lfont=ix);
To invoke this module to display the lfonts from 0 to 4 (5 lines total), use, for instance, an active module containing:
GLOBAL DRAWING MODULE test2d();
part(#1,showlfonts(0, 5, 5, 40));
lfonts greater than the highest lfont defined default to blank. (They plot blank as well.) In this example, lfont 3 is the highest numbered lfont defined.
With the exception of any material noted as being in the public domain, the text, images, and encoding of this document are copyright © 1998 by David M. MacMillan.
The author has no relationship with Microform AB, and this Tutorial is neither a product of nor endorsed by Microform AB.
"Varkon" is a registered trademark of Microform AB, Sweden.
This document is licensed for private, noncommercial, nonprofit viewing by individuals on the World Wide Web. Any other use or copying, including but not limited to republication in printed or electronic media, modification or the creation of derivative works, and any use for profit, is prohibited.
This writing is distributed in the hope that it will be useful, but "as-is," without any warranty of any kind, expressed or implied; without even the implied warranty of merchantability or fitness for a particular purpose.
In no event will the author(s) or editor(s) of this document be liable to you or to any other party for damages, including any general, special, incidental or consequential damages arising out of your use of or inability to use this document or the information contained in it, even if you have been advised of the possibility of such damages.
In no event will the author(s) or editor(s) of this document be liable to you or to any other party for any injury, death, disfigurement, or other personal damage arising out of your use of or inability to use this document or the information contained in it, even if you have been advised of the possibility of such injury, death, disfigurement, or other personal damage.
All trademarks or registered trademarks used in this document are the properties of their respective owners and (with the possible exception of any marks owned by the author(s) or editor(s) of this document) are used here for purposes of identification only. A trademark catalog page lists the marks known to be used on these web pages. Please e-mail firstname.lastname@example.org if you believe that the recognition of a trademark has been overlooked.
Feedback to email@example.com
Go to the: