DMM Varkon® Tutorial
A Beginner's Guide to the Varkon Parametric Modeling and CAD Application Development System
By David M. MacMillan


B.2. Color Error in Hidden Line Removal in the BASIC Coordinate System

! boxnorot.MBS  
! 
! Draw a rectilinear (unrotated) box
!
! Use the same coloring for the lines defining the box as is used for
! demonstration axes in vcl.MBS:   
!  X = red, Y = green, Z = blue  (RGB == XYZ)
!

local geometry module boxnorot(
   float dx; 
   float dy; 
   float dz;
   float xoffset;
   float yoffset;
   float zoffset
);

   vector lbb;     ! left back bottom; origin
   vector lbt;     ! left back top
   vector lft;     ! left front top
   vector lfb;     ! left front bottom

   vector rbb;     ! right back bottom; origin
   vector rbt;     ! right back top
   vector rft;     ! right front top
   vector rfb;     ! right front bottom

beginmodule

   lbb := vec (0 + xoffset,  0 + yoffset,  0 +zoffset);
   lbt := vec (0 + xoffset, dy + yoffset,  0 +zoffset);
   lft := vec (0 + xoffset, dy + yoffset, dz +zoffset);
   lfb := vec (0 + xoffset,  0 + yoffset, dz +zoffset);

   rbb := vec (dx + xoffset,  0 + yoffset,  0 +zoffset);
   rbt := vec (dx + xoffset, dy + yoffset,  0 +zoffset);
   rft := vec (dx + xoffset, dy + yoffset, dz +zoffset);
   rfb := vec (dx + xoffset,  0 + yoffset, dz +zoffset);

   lin_free (#1, lfb, lbb: PEN=4);
   lin_free (#2, lft, lbt: PEN=4);
   lin_free (#3, lfb, lft: PEN=3);
   lin_free (#4, lbb, lbt: PEN=3);

   lin_free (#5, rfb, rbb: PEN=4);
   lin_free (#6, rft, rbt: PEN=4);
   lin_free (#7, rfb, rft: PEN=3);
   lin_free (#8, rbb, rbt: PEN=3);

   lin_free (#9,  lbb, rbb: PEN=2);
   lin_free (#10, lfb, rfb: PEN=2);

   lin_free (#11, lbt, rbt: PEN=2);
   lin_free (#12, lft, rft: PEN=2);

   b_plane (#13, lbt, lft, rft, rbt: BLANK=0);
   b_plane (#14, rbt, rft, rfb, rbb: BLANK=0);

endmodule

BASIC GEOMETRY MODULE test3d();
VECTOR neworigin1;
BEGINMODULE
  part(#1,vclb(15, 0, 0));
  neworigin1:=vec(0, 0, 0);
  csys_1p(#2,"lcs1", neworigin1, 0, 0, 0);
  part(#3,boxnorot(8, 2, 4, 0, 0, 0),#2);
  part(#4,boxnorot(5, 5, 5, 0, 0, 0),#2);
ENDMODULE

BASIC coordinate system inconsistency

BASIC coordinate system inconsistency


Legal Matters

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 dmm@lemur.com if you believe that the recognition of a trademark has been overlooked.


Version 1.2, 1998/06/17. Feedback to dmm@lemur.com
http://www.database.com/~lemur/vk-bughide.html


Go to the: