WWW.DANCAD3D.COM (sm): THE OFFICIAL DANCAD3D (tm) "BETA TEST" WEB SITE.

TERMS OF USE, HOME, INDEX, SHORTCUT, WHAT'S NEW, DOWNLOADS, GET MAIN ZIP, DOCUMENTATION, VIDEO, HOOKUP#1, #2, #3, KEYWORDS

FEATURE FILM 4K+ DIGITAL CINEMA UNCOMPRESSED EDITING AND SOUND MIXING
PLUS DIY MOVIE 35mm FILM SCANNING AND DIY 35mm FILM RECORDER SOFTWARE.
"FREEISH" DI (DIGITAL INTERMEDIATE) SOFTWARE TO DOWNLOAD FOR MAKING
FEATURE MOTION PICTURES FOR CINEMA THEATRE, ULTRA-HD, HD, AND BROADCAST.
WORKS WITH FOOTAGE FROM DIGITAL CINEMA CAMERAS AND MOVIE FILM SCANS.
HIGH DEPTH COLOR CORRECTION. FRAME ACCURATE EDITING. HI-FI SOUND MIXING.

DANCAD3D (tm) DRAWING EDITOR, click on image for more info. and larger images. 3D ROBOTIC ANIMATION, click on image for more info. and larger images. 3D CONTOUR SURFACE, click on image for more info. and larger images. 3D CAM TOOL PATH, click on image for more info. and larger images. STEPPER MOTORS FOR CAM, click on image for more info. and larger images. DANCAM.EXE (tm) OPERATING 3D MILL, click on image for more info. and video. IM HELP STATUS, click on image for more info. and IM address.
Kodak (tm) LAD film negative scan image made with Canon XTi (tm) DSLR. Kinema Edit list Grading Levels #1 color correction tool . Kinema Edit list Grading Curves #1 color correction tool. Kinema Edit list Grading chroma Masking tool Vector display. Kinema Edit list Grading chroma Masking tool Waveform display. Kinema Edit list Grading Sharp/Soft filter tool. Kodak (tm) LAD image color corrected positive.
Click on these thumbnails for related information about my current software, features, and IM support. Hold [Shift] and click [Reload] to refresh IM thumbnail.

If are helping "Beta Test" you should report bugs and feel free to ask questions about the program's commands, it is best to e-mail me at tempnulbox (at) yahoo (dot) com and put "DANCAD3D (tm) 24x7 SUPPORT SUBMISSION" in the email subject line so your mail is not deleted as junk. See Section: 8 for more information about support related issues. I want you to ask questions so long as they are on the subject and relate to the current program's commands. If you do not get some kind of reply assume I did not get your message and resend. All submissions and correspondence become the sole property of Daniel H. Hudgins to do with as he sees fit, so stay on subject.

SECTION: 3.4.64.0
Appendix N: Line and Triangle Attributes.
This Section, Overview of Line and Triangle Attributes, Steps to set "Free" Line Segment Attributes using Drawing Editor, Numeric format for Attributes, Detailed discussion of "Free" Line Segment Attributes, Detailed discussion of Triangle Attributes, Discussion of Mutated line Attributes and Discussion of Triangle Edge Shading Attributes.

Copyright (C) 1986-2011 by Daniel H. Hudgins, All Rights Reserved.

No part of "This Web Site" (HTML document), including associated files, may be: distributed, sublicensed, transmitted, copied, archived, mirrored, modified, bundled, embedded, sold, given away, rented, loaned, or shared in any form without express written permission in a formal Vendor agreement contract dated and signed in ink obtained directly from Daniel H. Hudgins by registered postal mail. All agreements for permission to distribute expire after a period no greater than one year from the date of the signing of the agreement by Daniel H. Hudgins. See the current "EULA" for information regarding limited copying and storage for the purpose of "Beta Testing" "This Web Site."

To view or use the current version of this Web page you may need to reload or refresh the display of this page by your browser. Just clicking on the browser's [Reload] or [Refresh] icon may not be enough to insure that all of the page's most current contents have been cached and displayed. Some browsers may have additional commands to help display the page's most current contents such as: holding down the [Shift] key and clicking on the [Reload] icon, holding down the [Control] key and clicking on the [Refresh] icon, holding down the [Control] and [Shift] keys and clicking on the [Refresh] icon, pressing the [Control] and [F5] keys, pressing [Control] and the [R] key, or some other combination of keys or clicks. Check to see which commands your HTML browser uses to load the most current page contents into its cache and then to display them onto the screen.

This Web site is dedicated to the thousands of "users" of my programs, those who have helped test my programs over the last 25 or so years, and especially those who shared their experiences with me.

You must read this notice: This is a licensed Web site (HTML document and associated files). You must read and agree to be legally bound in contract by the Terms of Use and conditions given in the End User License Agreement ("EULA"), Legal Notices, Instructions, Warnings, Disclaimers, and all other text in "SECTION: 0" of "This Web Site" (HTML document and associated files) before reading or using any of the information, software programs, and or files, contained in, linked to, and or associated with, "This Web Site" (HTML document and associated files). Any use or "Beta Testing" of "This Web Site" constitutes your acknowledgment of your full agreement with the current End User License Agreement ("EULA") and your decision to have this current license supersede all prior and contemporaneous agreements and understandings. Information and files in "This Web Site" (HTML document and associated files) have been placed here so that long time users of "The Author's" programs DANCAD3D.COM (tm) , DANCAD87.EXE (tm), DANCINEL.EXE (tm), DANCINES.EXE (tm) , DANCAM.EXE (tm) , or DANPLOT.EXE (tm) could help proofread the text of the documentation files or screens displayed, and also help test data files, example files, and or any software programs that might be made available from time to time, to aid "The Author" in finding mistakes, bugs, and other errors, omissions, defects, mistakes, and faults. Everything in "This Web Site" (HTML document and associated files) is "Beta Test", "Beta Code", Experimental, Preliminary, requires proofreading, or is being evaluated for possible revision, and is NOT warranted to be free of defect. To help "The Author" report any bugs, foul-ups, defects, or mistakes that you find, see "SECTION: 8" for instructions. "This Web Site" (HTML document and associated files) and all other files and programs by Daniel H. Hudgins are made available "AS IS" without warranty of any kind express, expressed, or implied. All offers and specifications are subject to change or discontinuation without notice of any kind. Please look over "SECTION: 8" of "This Web Site" before contacting "The Author."


Click here to go back to SECTION 3.0.0.0 Index for documentation pages..
Click here to go back to SECTION 3.4.0.0 Index for supplemental documentation pages..
Click here for top of DANCAD3D.COM (tm) Web site home page or here for home page INDEX.
Click here to check the current internet document if you are viewing this from a disk copy.
Note: If you want to go back to the previous link use the [Back] button in your browser.

This Section.

The text in this section was derived from the v2.5 CAD manual, and has been updated somewhat, but differences between different releases of v2.5, v2.6 and v2.7 may mean that some of the information may not apply to the version you are using. Some adjustment may be required for versions prior or subsequent to v2.7A.

You may not distribute, sell, rent, share, or give away these HTML documentation files or printed copies of them. You may not extract text from these HTML documentation files for distribution, sale, rent, sharing, or giving away. You can use the [Print] option in your browser to make one copy for yourself to mark up in order to help me proofread the text for mistakes.

Documents may be available to download from time to time, you can check SECTION: 9 to see what the current situation with regard to downloadable files is. The names of these documentation files may change, and they may be edited, combined, or eliminated in the future, without notice.

You may need to adjust your browser for best viewing of the pre- formatted text by changing the "font" size using the commands in your browser (see the help in your browser, or use the pull-down menus in your HTML browser.) If some letters in words on the screen appear to be missing or scrambled try changing the font size in your browser as this sometimes happens even though the words are spelled correctly in the HTML code.

Use the "Edit, Find in page Ctrl+F" or "Edit, Find (in this page)... Ctrl+F" command in your browser to search for keywords within the documentation text in this HTML page. You will need to search over again in the other pages in this HTML document for the same keyword since your browser may not search for a keyword beyond the current page that is loaded.

Click here to go back to the top of this page.

Overview of Line and Triangle Attributes.

My CAD, CAM, and Utility programs including and subsequent to DANCAD3D (tm) v2.0 work with drawings made from line segments. Elements of drawings such as "quasi circles," "quasi arcs," lettering, symbols, and other elements are made up of line segments of various lengths and directions. Each line segment has four attribute numbers in addition to the six numbers used for the point one and point two coordinates. In version 2.7 triangles were added in addition to the line segments. To make the triangles operate with many of the existing line editing commands the triangles are composed of two line segments and therefore have eight attribute numbers. The triangle is said to have a "first line" and a "second line" which refers to the two consecutive line segments used to define a triangle. Normally all of the "first lines of a triangle" are numbered odd from the start of the element, and all of the "second lines of a triangle" are numbered even from the start of an element. Triangle elements would obviously only have an even number of line segments. Since line elements can be made of lines of any count, the starting line number for a triangle element can be even or odd depending on if it is the first element or what is in the other elements in the workspace at that time, therefore the lines in a triangle element can be numbered with even or odd numbers relative to the start of the workspace depending on what is in the workspace at that time. The two lines that make up a triangle must be consecutive and in the same element.

Many of the CAD program macro commands, as well as the ASCII drawing file format, specify the drawing line attributes by using a set of four numbers associated with each line segment, i.e. color, width, shape, and style. So any line segment in a element made of "free" line segments can have a different color or width and such.

In general you should use the macro Output feature and the drawing editor to code the line attributes other than color and width. The shape and style attributes are complex since different bits in their value have special meanings.

For some "advanced users" knowing some of the details of how the line and triangle attributes are coded might be of interest. If you where going to write a program in some computer language to make element files for loading into my programs, knowing which bits do what might allow you to control more aspects of the element's display or processing. Likewise if you where going to write a program that would read element files saved from my programs, knowing something about the meaning of the file attributes might allow you to have your program do particular things when different attributes are detected in the elements saved. Attribute information might also be of interest for those who will be editing macro and ASCII files with the [W]rite command. Since many of the attributes where not meant to be manually assigned, they where only to be created by the programs themselves for their own internal use, many combinations of attributes are disallowed. To figure out which attributes are allowed you would need to make some example elements with the attributes you wish to use, and only set the attributes within the values that you see is valid. Error trapping for disallowed attribute bits may not be very good, and invalid attributes will probably cause problems with use or display of the elements, so do not try to set the attribute bits yourself unless you have looked at how the bits are used by the program version you have, and are willing to accept that your elements may get lost, erased, produce unexpected results, or make my or your programs crash. The meaning of the various attribute bits may change, so I do not recommend distributing programs that read or write them since you may need to edit your programs to work with any future versions of my programs, and versions of your programs in use would make or have problems with compatibility.

Appendix N describes the attributes that were used in v2.7A. If any future versions are released the attributes that are used may be altered, or have new meanings, so what is stated here may not be complete, or up to date, for versions subsequent to v2.7A.

DANCAD3D (tm) gives each line segment in a drawing an individual line attribute, when drawing you can make settings for the attributes of the next lines to be drawn. The line segment attribute determines how the line segment should be displayed in the finished drawing, or when the drawing will be printed. Each line segment attribute in v2.7 has four qualities: color, width, shape, and style. You can change the attribute of any line segment in a drawing at any time during the development of the drawing with the line editing commands in the [L]ines sub-menu of the drawing editor. You can also edit line segment attributes of the elements saved as an output macros or ASCII files with the CAD program's [W]rite command.

Since DANCAD3D (tm) automatically codes the line attributes for you when you select the commands from the program's menus you will probably not need to use the information in this Appendix N. This information is included because I have sometimes gotten inquiries from users who want to create ASCII files or macros that use the line attributes and want some reference information as to how the various line attributes have been computed.

The meaning of bits in the attribute bytes may change in any possible future version of the programs, so for the most part you might do better to keep the line segment attributes in your line segment elements to the ranges of: color=1 to 15, width=1, shape=0, and style=0, such limitation might make conversion of your stuff for use with some future version of my programs less complex. It is recommended that you not use line color = 0 and or line width = 0, since the definition of those values are in flux, particularly for files that will be used as tool path files in my CAM programs. The shape and style attributes should always be set to 0, unless you are sure that you need to assign some valid coded bits. The default attributes for line segments should be x1 y1 z1 x2 y2 z2 1 1 0 0 since all zeros, i.e. 0 0 0 0 0 0 0 0 0 0, flags end of file in the ASCII file format and the macro ENTER command, and just having the width = 0 may flag end of file by itself in some commands of my programs.

Click here to go back to the top of this page.

Steps to set "Free" Line Segment Attributes using Drawing Editor.

The [L]ine style command in the drawing editor lets you pick the attributes for lines in elements that you are drawing, or to change the line attributes of elements that you have drawn. The attributes for "free" line segment elements can be selected by using the [L]ine style command from on screen menus and prompts. The [L]ine style command also works on triangle elements to change the line or shaded face color or edge line width of the lines in the triangle element. The edge line width in triangle elements pertains mostly to printed drawings when display modes are used that show the edge outline lines, or on screen display for modes that display the edge outlines when the WYSIWYG is on, when the WYSIWYG is off the edge outlines are displayed as line width 1. For the edge line width to display properly the world scale and the display scale need to be set to the right values, as well as having the WYSIWYG on. Other attributes in triangle elements are controlled by the commands that generate or convert triangle elements.

Steps to carry out to setting Line Segment Attributes from Drawing Editor:

  1. Select [L]ine style from the drawing editors [L]ines edit sub- menu, or press [L] when in the [D]raw sub-menu of the drawing editor.

  2. Enter the "free" line segment attributes you want to use for the [N]ext lines to draw.

  3. Use the [D]raw sub-menu of the drawing editor to draw lines. You should not set the drawing line color to the same color as the background color, or when the lines are drawn by pressing the [MouseLeft] button or the [0/Ins] key the line you are drawing will blend into the background and seem invisible, see the [P]alette command in the [S]et-up sub-menu of the drawing editor to set or change the background color.

  4. Repeat steps 1 through 3 to change the line attributes for drawing additional "free" line segments.

Click here to go back to the top of this page.

Numeric format for Attributes.

In v2.7A the four line attributes for line segments, and the eight triangle attributes are stored as single bytes. When saved to the output macro or ASCII file each of the attribute bytes is represented as a decimal number, even though the binary bits within the byte may have different or more than one meaning. Because the attribute bits can describe more than four attributes or attribute combinations you need to know the role of each bit in the four attribute numbers associated with each line segment in order to figure out what the code numbers stand for in the macro and ASCII files.

Future program versions may use numbers larger or smaller than the unsigned byte range of 0 to 255 employed in v2.7A so if you write a program to read files saved by my programs, you should allow for numeric values out of the current range.

The full range of the attributes for each line segment would be, 0 0 0 0 to 255 255 255 255, except for the fact that some combinations are invalid, undefined, forbidden, unused, or reserved. The information below goes into more detail as to what the bits in the bytes do in v2.7A.

As was mentioned the attribute bytes are externally represented in Decimal number format, however it may be useful for you to use Hexadecimal and Binary arithmetic to manually code and read the attribute bytes. A hand calculator that can convert the current total between Decimal, Hexadecimal, and Binary can be helpful in such calculations.

In Hexadecimal a byte is represented by two places with "numbers" 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. So 0 in Decimal is 00 in Hexadecimal, and 255 in Decimal is FF in Hexadecimal.

In Binary a byte is represented by eight places with "numbers" 0 and 1, sometimes divided into two four bit nibbles. So 0 in Decimal is 00000000 or 0000 0000 in Binary, and 255 in Decimal is 11111111 or 1111 1111 in Binary.

My programs only read the Decimal format for the attributes from files, so be sure to convert Hexadecimal or Binary values to Decimal before you edit the new attributes into your files. When using my programs from the menus the menus generally let you select the attributes by the qualities from a list or by entering direct values for specific traits, so you do not generally need to do arithmetic of this sort when using the drawing editor.


-----------------------------------
|    NOTATION FOR BYTE VALUES     |
-----------------------------------
| DECIMAL |  HEX  |    BINARY     |
-----------------------------------
|     0   .   00  .   0000 0000   |
|     1   .   01  .   0000 0001   |
|     2   .   02  .   0000 0010   |
|     3   .   03  .   0000 0011   |
|     4   .   04  .   0000 0100   |
|     5   .   05  .   0000 0101   |
|     6   .   06  .   0000 0110   |
|     7   .   07  .   0000 0111   |
|     8   .   08  .   0000 1000   |
|     9   .   09  .   0000 1001   |
|    10   .   0A  .   0000 1010   |
|    11   .   0B  .   0000 1011   |
|    12   .   0C  .   0000 1100   |
|    13   .   0D  .   0000 1101   |
|    14   .   0E  .   0000 1110   |
|    15   .   0F  .   0000 1111   |
|         .       .               |
|    16   .   10  .   0001 0000   |
|    17   .   11  .   0001 0001   |
|    18   .   12  .   0001 0010   |
|    19   .   13  .   0001 0011   |
|    20   .   14  .   0001 0100   |
|    21   .   15  .   0001 0101   |
|    22   .   16  .   0001 0110   |
|    23   .   17  .   0001 0111   |
|    24   .   18  .   0001 1000   |
|    25   .   19  .   0001 1001   |
|    26   .   1A  .   0001 1010   |
|    27   .   1B  .   0001 1011   |
|    28   .   1C  .   0001 1100   |
|    29   .   1D  .   0001 1101   |
|    30   .   1E  .   0001 1110   |
|    31   .   1F  .   0001 1111   |
|         .       .               |
|    32   .   20  .   0010 0000   |
|    33   .   21  .   0010 0001   |
|    34   .   22  .   0010 0010   |
|    35   .   23  .   0010 0011   |
|    36   .   24  .   0010 0100   |
|    37   .   25  .   0010 0101   |
|    38   .   26  .   0010 0110   |
|    39   .   27  .   0010 0111   |
|    40   .   28  .   0010 1000   |
|    41   .   29  .   0010 1001   |
|    42   .   2A  .   0010 1010   |
|    43   .   2B  .   0010 1011   |
|    44   .   2C  .   0010 1100   |
|    45   .   2D  .   0010 1101   |
|    46   .   2E  .   0010 1110   |
|    47   .   2F  .   0010 1111   |
|         .       .               |
|    48   .   30  .   0011 0000   |
|    49   .   31  .   0011 0001   |
|    50   .   32  .   0011 0010   |
|    51   .   33  .   0011 0011   |
|    52   .   34  .   0011 0100   |
|    53   .   35  .   0011 0101   |
|    54   .   36  .   0011 0110   |
|    55   .   37  .   0011 0111   |
|    56   .   38  .   0011 1000   |
|    57   .   39  .   0011 1001   |
|    58   .   3A  .   0011 1010   |
|    59   .   3B  .   0011 1011   |
|    60   .   3C  .   0011 1100   |
|    61   .   3D  .   0011 1101   |
|    62   .   3E  .   0011 1110   |
|    63   .   3F  .   0011 1111   |
|         .       .               |
|    64   .   40  .   0100 0000   |
|    65   .   41  .   0100 0001   |
|    66   .   42  .   0100 0010   |
|    67   .   43  .   0100 0011   |
|    68   .   44  .   0100 0100   |
|    69   .   45  .   0100 0101   |
|    70   .   46  .   0100 0110   |
|    71   .   47  .   0100 0111   |
|    72   .   48  .   0100 1000   |
|    73   .   49  .   0100 1001   |
|    74   .   4A  .   0100 1010   |
|    75   .   4B  .   0100 1011   |
|    76   .   4C  .   0100 1100   |
|    77   .   4D  .   0100 1101   |
|    78   .   4E  .   0100 1110   |
|    79   .   4F  .   0100 1111   |
|         .       .               |
|    80   .   50  .   0101 0000   |
|    81   .   51  .   0101 0001   |
|    82   .   52  .   0101 0010   |
|    83   .   53  .   0101 0011   |
|    84   .   54  .   0101 0100   |
|    85   .   55  .   0101 0101   |
|    86   .   56  .   0101 0110   |
|    87   .   57  .   0101 0111   |
|    88   .   58  .   0101 1000   |
|    89   .   59  .   0101 1001   |
|    90   .   5A  .   0101 1010   |
|    91   .   5B  .   0101 1011   |
|    92   .   5C  .   0101 1100   |
|    93   .   5D  .   0101 1101   |
|    94   .   5E  .   0101 1110   |
|    95   .   5F  .   0101 1111   |
|         .       .               |
|    96   .   60  .   0110 0000   |
|    97   .   61  .   0110 0001   |
|    98   .   62  .   0110 0010   |
|    99   .   63  .   0110 0011   |
|   100   .   64  .   0110 0100   |
|   101   .   65  .   0110 0101   |
|   102   .   66  .   0110 0110   |
|   103   .   67  .   0110 0111   |
|   104   .   68  .   0110 1000   |
|   105   .   69  .   0110 1001   |
|   106   .   6A  .   0110 1010   |
|   107   .   6B  .   0110 1011   |
|   108   .   6C  .   0110 1100   |
|   109   .   6D  .   0110 1101   |
|   110   .   6E  .   0110 1110   |
|   111   .   6F  .   0110 1111   |
|         .       .               |
|   112   .   70  .   0111 0000   |
|   113   .   71  .   0111 0001   |
|   114   .   72  .   0111 0010   |
|   115   .   73  .   0111 0011   |
|   116   .   74  .   0111 0100   |
|   117   .   75  .   0111 0101   |
|   118   .   76  .   0111 0110   |
|   119   .   77  .   0111 0111   |
|   120   .   78  .   0111 1000   |
|   121   .   79  .   0111 1001   |
|   122   .   7A  .   0111 1010   |
|   123   .   7B  .   0111 1011   |
|   124   .   7C  .   0111 1100   |
|   125   .   7D  .   0111 1101   |
|   126   .   7E  .   0111 1110   |
|   127   .   7F  .   0111 1111   |
|         .       .               |
|   128   .   80  .   1000 0000   |
|   129   .   81  .   1000 0001   |
|   130   .   82  .   1000 0010   |
|   131   .   83  .   1000 0011   |
|   132   .   84  .   1000 0100   |
|   133   .   85  .   1000 0101   |
|   134   .   86  .   1000 0110   |
|   135   .   87  .   1000 0111   |
|   136   .   88  .   1000 1000   |
|   137   .   89  .   1000 1001   |
|   138   .   8A  .   1000 1010   |
|   139   .   8B  .   1000 1011   |
|   140   .   8C  .   1000 1100   |
|   141   .   8D  .   1000 1101   |
|   142   .   8E  .   1000 1110   |
|   143   .   8F  .   1000 1111   |
|         .       .               |
|   144   .   90  .   1001 0000   |
|   145   .   91  .   1001 0001   |
|   146   .   92  .   1001 0010   |
|   147   .   93  .   1001 0011   |
|   148   .   94  .   1001 0100   |
|   149   .   95  .   1001 0101   |
|   150   .   96  .   1001 0110   |
|   151   .   97  .   1001 0111   |
|   152   .   98  .   1001 1000   |
|   153   .   99  .   1001 1001   |
|   154   .   9A  .   1001 1010   |
|   155   .   9B  .   1001 1011   |
|   156   .   9C  .   1001 1100   |
|   157   .   9D  .   1001 1101   |
|   158   .   9E  .   1001 1110   |
|   159   .   9F  .   1001 1111   |
|         .       .               |
|   160   .   A0  .   1010 0000   |
|   161   .   A1  .   1010 0001   |
|   162   .   A2  .   1010 0010   |
|   163   .   A3  .   1010 0011   |
|   164   .   A4  .   1010 0100   |
|   165   .   A5  .   1010 0101   |
|   166   .   A6  .   1010 0110   |
|   167   .   A7  .   1010 0111   |
|   168   .   A8  .   1010 1000   |
|   169   .   A9  .   1010 1001   |
|   170   .   AA  .   1010 1010   |
|   171   .   AB  .   1010 1011   |
|   172   .   AC  .   1010 1100   |
|   173   .   AD  .   1010 1101   |
|   174   .   AE  .   1010 1110   |
|   175   .   AF  .   1010 1111   |
|         .       .               |
|   176   .   B0  .   1011 0000   |
|   177   .   B1  .   1011 0001   |
|   178   .   B2  .   1011 0010   |
|   179   .   B3  .   1011 0011   |
|   180   .   B4  .   1011 0100   |
|   181   .   B5  .   1011 0101   |
|   182   .   B6  .   1011 0110   |
|   183   .   B7  .   1011 0111   |
|   184   .   B8  .   1011 1000   |
|   185   .   B9  .   1011 1001   |
|   186   .   BA  .   1011 1010   |
|   187   .   BB  .   1011 1011   |
|   188   .   BC  .   1011 1100   |
|   189   .   BD  .   1011 1101   |
|   190   .   BE  .   1011 1110   |
|   191   .   BF  .   1011 1111   |
|         .       .               |
|   192   .   C0  .   1100 0000   |
|   193   .   C1  .   1100 0001   |
|   194   .   C2  .   1100 0010   |
|   195   .   C3  .   1100 0011   |
|   196   .   C4  .   1100 0100   |
|   197   .   C5  .   1100 0101   |
|   198   .   C6  .   1100 0110   |
|   199   .   C7  .   1100 0111   |
|   200   .   C8  .   1100 1000   |
|   201   .   C9  .   1100 1001   |
|   202   .   CA  .   1100 1010   |
|   203   .   CB  .   1100 1011   |
|   204   .   CC  .   1100 1100   |
|   205   .   CD  .   1100 1101   |
|   206   .   CE  .   1100 1110   |
|   207   .   CF  .   1100 1111   |
|         .       .               |
|   208   .   D0  .   1101 0000   |
|   209   .   D1  .   1101 0001   |
|   210   .   D2  .   1101 0010   |
|   211   .   D3  .   1101 0011   |
|   212   .   D4  .   1101 0100   |
|   213   .   D5  .   1101 0101   |
|   214   .   D6  .   1101 0110   |
|   215   .   D7  .   1101 0111   |
|   216   .   D8  .   1101 1000   |
|   217   .   D9  .   1101 1001   |
|   218   .   DA  .   1101 1010   |
|   219   .   DB  .   1101 1011   |
|   220   .   DC  .   1101 1100   |
|   221   .   DD  .   1101 1101   |
|   222   .   DE  .   1101 1110   |
|   223   .   DF  .   1101 1111   |
|         .       .               |
|   224   .   E0  .   1110 0000   |
|   225   .   E1  .   1110 0001   |
|   226   .   E2  .   1110 0010   |
|   227   .   E3  .   1110 0011   |
|   228   .   E4  .   1110 0100   |
|   229   .   E5  .   1110 0101   |
|   230   .   E6  .   1110 0110   |
|   231   .   E7  .   1110 0111   |
|   232   .   E8  .   1110 1000   |
|   233   .   E9  .   1110 1001   |
|   234   .   EA  .   1110 1010   |
|   235   .   EB  .   1110 1011   |
|   236   .   EC  .   1110 1100   |
|   237   .   ED  .   1110 1101   |
|   238   .   EE  .   1110 1110   |
|   239   .   EF  .   1110 1111   |
|         .       .               |
|   240   .   F0  .   1111 0000   |
|   241   .   F1  .   1111 0001   |
|   242   .   F2  .   1111 0010   |
|   243   .   F3  .   1111 0011   |
|   244   .   F4  .   1111 0100   |
|   245   .   F5  .   1111 0101   |
|   246   .   F6  .   1111 0110   |
|   247   .   F7  .   1111 0111   |
|   248   .   F8  .   1111 1000   |
|   249   .   F9  .   1111 1001   |
|   250   .   FA  .   1111 1010   |
|   251   .   FB  .   1111 1011   |
|   252   .   FC  .   1111 1100   |
|   253   .   FD  .   1111 1101   |
|   254   .   FE  .   1111 1110   |
|   255   .   FF  .   1111 1111   |
-----------------------------------

In the descriptions below of the use of the bit places in the attribute bytes the following convention for notation is used:


---------------------------------------------------------
|         BINARY BIT NOTATION FOR DEFINITIONS           |
---------------------------------------------------------
| SYMBOL |                  MEANING                     |
---------------------------------------------------------
|   0    | BIT IS SET TO 0, LOW, OR INACTIVE            |
|   1    | BIT IS SET TO 1, HIGH, OR ACTIVE             |
|   N    | BIT IS SET TO 0 OR 1 FOR THIS FUNCTION       |
|   *    | BIT IS SET TO 0 OR 1 FOR ASSOCIATED FUNCTION |
|   x    | BIT IS SET TO 0 OR 1 FOR ANOTHER FUNCTION    |
|   u    | BIT CURRENTLY UNDEFINED, SET IT TO 0         |
---------------------------------------------------------

The naming of the bits for the discussion is made from right to left naming the bits in the attribute byte one through eight with the right most being the first bit, and the left most byte the eighth bit, for example referring to the "forth bit in the style byte of the second line in a triangle" and such.


-----------------------------------------------
|    BINARY BIT NAMES FOR ATTRIBUTE BYTES     |
-----------------------------------------------
|     BIT     |              NAME             |
-----------------------------------------------
|  xxxx xxxN  |  FIRST BIT                    |
|  xxxx xxNx  |  SECOND BIT                   |
|  xxxx xNxx  |  THIRD BIT                    |
|  xxxx Nxxx  |  FORTH BIT                    |
|  xxxN xxxx  |  FIFTH BIT                    |
|  xxNx xxxx  |  SIXTH BIT                    |
|  xNxx xxxx  |  SEVENTH BIT                  |
|  Nxxx xxxx  |  EIGHTH BIT                   |
-----------------------------------------------

Each line segment, one that is a "free" line segment, or one that is one of the two line segments that are part of a triangle, has four attributes named: color, width (or line thickness), shape, and style. These names are used to refer to the line attribute bytes. The attribute bytes could also be referred to by their order, color being the first attribute byte, width being the second attribute byte, shape being the third attribute byte, and style being the forth attribute byte. In triangles there are eight attribute bytes, so the shape byte in the second line of a triangle might be referred to as the seventh attribute byte of the triangle. The actual meaning of the bits in the attribute bytes extends beyond their naming, the names are a legacy convention from past versions.


-----------------------------------------------------------------------------
|         ATTRIBUTE NAMES FOR DEFINITIONS FOR "FREE" LINE SEGMENTS          |
-----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |            NAME            |
-----------------------------------------------------------------------------
|  NNNN NNNN  xxxx xxxx  xxxx xxxx  xxxx xxxx  |  COLOR or FIRST ATTRIBUTE  |
|  xxxx xxxx  NNNN NNNN  xxxx xxxx  xxxx xxxx  |  WIDTH or SECOND ATTRIBUTE |
|  xxxx xxxx  xxxx xxxx  NNNN NNNN  xxxx xxxx  |  SHAPE or THIRD ATTRIBUTE  |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  NNNN NNNN  |  STYLE or FOURTH ATTRIBUTE |
-----------------------------------------------------------------------------

When doing notation of the attributes for triangles the eight attributes are written on two lines such that the color attribute of the first line of the triangle is written above the color byte of the second line of the triangle.


--------------------------------------------------------------------------------------------
|                     ATTRIBUTE NAMES FOR DEFINITIONS FOR TRIANGLES                        |
--------------------------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |            NAME                           |
--------------------------------------------------------------------------------------------
|  NNNN NNNN  xxxx xxxx  xxxx xxxx  xxxx xxxx  |  COLOR OF FIRST LINE or FIRST ATTRIBUTE   |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  |                                           |
|                                              |                                           |
|  xxxx xxxx  NNNN NNNN  xxxx xxxx  xxxx xxxx  |  WIDTH OF FIRST LINE or SECOND ATTRIBUTE  |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  |                                           |
|                                              |                                           |
|  xxxx xxxx  xxxx xxxx  NNNN NNNN  xxxx xxxx  |  SHAPE OF FIRST LINE or THIRD ATTRIBUTE   |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  |                                           |
|                                              |                                           |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  NNNN NNNN  |  STYLE OF FIRST LINE or FOURTH ATTRIBUTE  |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  |                                           |
|                                              |                                           |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  |  COLOR OF SECOND LINE or FIFTH ATTRIBUTE  |
|  NNNN NNNN  xxxx xxxx  xxxx xxxx  xxxx xxxx  |                                           |
|                                              |                                           |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  |  WIDTH OF SECOND LINE or SIXTH ATTRIBUTE  |
|  xxxx xxxx  NNNN NNNN  xxxx xxxx  xxxx xxxx  |                                           |
|                                              |                                           |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  |  SHAPE OF SECOND LINE or SEVENTH ATTRIBUTE|
|  xxxx xxxx  xxxx xxxx  NNNN NNNN  xxxx xxxx  |                                           |
|                                              |                                           |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  |  STYLE OF SECOND LINE or EIGHT ATTRIBUTE  |
|  xxxx xxxx  xxxx xxxx  xxxx xxxx  NNNN NNNN  |                                           |
--------------------------------------------------------------------------------------------

The attributes are associated with the point coordinates in the ASCII drawing file and with the ENTER and APPEND commands. For free line segments two points are associated with for attributes with the names for their places on each data line are as:


p1x p1y p1z p2x p2y p2z color width shape style

The three values, x, y, and z, for each point, are sometimes condensed so that when stated as p2 what is meant is the set of values p2x, p2y, and p2z, and such.

So you see ten numbers are used to describe each "free" line segment used in a drawing or tool path file.

In a triangle four points are used and eight attributes, named as:


p1x p1y p1z p2x p2y p2z 1st_color 1st_width 1st_shape 1st_style
p3x p3y p3z p4x p4y p4z 2nd_color 2nd_width 2nd_shape 2nd_style

The three values, x, y, and z, for each point, are sometimes condensed so that when stated as p4 what is meant is the set of values p4x, p4y, and p4z, and such.

So you see twenty numbers are used to describe each triangle used in a drawing file. See the additional information about the construction of triangles below. To simplify the discussion of the line and triangle attributes the six leading (to the left) point values are omitted and just the last four attribute numbers for each line segment are described.

Click here to go back to the top of this page.

Detailed discussion of "Free" Line Segment Attributes.

DANCAD3D.COM v2.7 (tm)'s drawing editor displays line segments in monochrome or color depending on the display mode that you selected and your video board type. The monochrome display modes may redraw the screen faster on some video boards. The menu Preview command and the macro command DISPLAY can display lines in color on CGA, EGA, VGA, or SVGA video boards. On the CGA video board you can display three colors and background, and on the EGA video board you can display fifteen colors, sixteen if you count the background color. On VGA and SVGA shades of the 16 "basic" color code numbers 0 to 15 can be displayed in some of the 256 palette mode color video modes. In v2.7 the background color can be selected with the [P]alette command in the drawing editor [S]et-up sub-menu or by using the macro PALETTE command. On pen plotters DANCAD3D (tm) can plot with up to 127 pen colors automatically, i.e. DANCAD3D (tm) color attribute is in the range of 1 to 127 color 0 and negative values are not valid for a pen plotter, the actual number of pens will depend on how many pens or pen numbers the plotter can select from.

In my CAM programs several features are controllable from the line color selected for lines in the tool path file. In v2.7 of my CAM program's configuration menu you can select which line color values select which of the CAM program features, such as feed rate speed, pause for operator, dwell for preset time, and switch relays on and off to control things on the automated machine.

See the definitions for the bit and byte descriptions higher up in this section.


-------------------------------------------
| DEFAULT CGA MODE C320C4 COLOR ATTRIBUTE |
-------------------------------------------
| DECIMAL | HEX |   BINARY  |   COLOR     |
-------------------------------------------
|    0    |  00 | u000 0000 |   BLACK     |
|    1    |  01 | u000 0001 |   CYAN      |
|    2    |  02 | u000 0002 |   MAGENTA   |
|    3    |  03 | u000 0003 |   WHITE     |
-------------------------------------------

There may be some difference between colors displayed on different EGA, VGA, and SVGA video boards or video modes on the same video board in the colors displayed, but the following will give you the standard default code numbers. If the contrast control on the monitor is not adjusted properly Light Gray may look darker than Dark Gray. The monitor can also shift some colors such as yellow to the red or green, so the monitor may need to be adjusted to have the colors "track" for all shades from dark to light.

In the programs the color numbers used in the color pallet can be re-assigned, so that the default color value for screen color 0 is not normally set to color 0, see the PALETTE macro command in Appendix B, or the [P]alette command in the drawing editor [S]et-up sub-menu to re-assigned the screen colors. The palette is used to set the actual screen color, for lines or triangles drawn with particular line color numbers. For instance if you have a tool path that only uses line color attributes 3, 4, and, 5 you could set line color 3 to screen color 4, line color 4 to screen color 11, and line color 5 to screen color 14 to make the display more to your preference. The palette color 0 is normally used for the background color in some display modes, so if you want black lines on a white background you would set palette color 0 to 15, and palette color 15 to 0. This will make more sense when you look at the [P]alette [S]et-up command in the drawing editor, and display some elements drawn using different line colors in the drawing editor, or main menu preview command using one of the 16 or 256 palette mode color display modes. The 256 palette mode's color display values are mapped and dithered to display dark to light values of up to the standard 16 colors. When the gray scale display modes are selected the color values pick and dither some gray tones of different levels of darkness.


--------------------------------------------------
| EGA VGA SVGA VIDEO BOARD STANDARD BASIC COLORS |
--------------------------------------------------
|  DECIMAL  |              COLOR                 |
--------------------------------------------------
|     0     |    BLACK                           |
|     1     |    BLUE                            |
|     2     |    GREEN                           |
|     3     |    CYAN                            |
|     4     |    RED                             |
|     5     |    MAGENTA                         |
|     6     |    YELLOW                          |
|     7     |    LIGHT GRAY                      |
|     8     |    DARK GRAY                       |
|     9     |    LIGHT BLUE                      |
|    10     |    LIGHT GREEN                     |
|    11     |    LIGHT CYAN                      |
|    12     |    LIGHT RED                       |
|    13     |    LIGHT MAGENTA                   |
|    14     |    LIGHT YELLOW                    |
|    15     |    WHITE                           |
--------------------------------------------------

DANCAD3D (tm) allows you to use color numbers up to 127, but some of the numbers over color 3 on CGA or 15 on EGA may come out as black, or "background" on the video screen. Most of the lines should show as bright on the B&W mode of the [P]review screen, but multiples of 16 may come out "black" or "background" color depending on the video mode, and the settings in the palette table.

Line segment color numbers from 128 to 255, or -1 to - 127 should not be used normally with v2.7, internally these extra color values have been used for "xor" colors, but I may assign a new meaning to the "eighth bit" for the color attribute in future or revised versions, so set the "eighth bit" of the color attribute to zero for now. Color values above 127 are not listed on the palette table, and should be considered invalid.

For display of elements on laser printers and dot matrix printers DANCAD3D (tm) lets you set the line width by the use of the line width attribute. Since wide line segments take longer to draw than narrow ones you can turn off the WYSIWYG (What You See Is What You Get) in the drawing editor with the WYSIWYG command in the [S]et-up sub-menu. The line width ranges from 1 which is a narrow as the printer driver will allow up to 255 which will print at about 0.5348 inch wide. The line width printed will be the width of the selected line width plus the minimum line width as selected by the printer or plotter driver. The minimum line width is about 0.004", a line width of 2 would be ((2-1)*0.0021")+0.004" or 0.0061", a line width of 3 would be ((3-1)*0.0021")+0.004" or 0.0082" and so on. The line width is independent of the display scale used to print the drawing, but the "world" scale in the main menu [C]hange command and the main menu [P]review must be set to the value that will be used for printing if the drawing editor WYSIWYG and the main menu [P]review WYSIWYG are used to show the line thicknesses properly on the screen.

If you are going to print a drawing with the scale set to 240, then you must set the scale in the main menu [P]review to 240 before you enter the drawing editor, or set the [W]YSIWYG world scale in the drawing editor's [S]et- up sub-menu, and turn on the [W]YSIWYG in the drawing editor [S]et-up menu. You can then zoom in or out (with [+] [*] or [-] [*]) and see how the wide lines look. If you do not have the main menu Preview scale set to the value that will be used when the drawing will be printed, the lines in the drawing editor will not show the correct line width on screen to correspond the print out.

If you want to change the line width of lines in an element use the commands in the [L]ines sub-menu of the drawing editor.

If a drawing is saved as a 2D-Real file with the scale set to what looks good when the workspace is viewed with the main menu [P]review command the file will be normalized to print at a scale of 1, and so in order to view the WYSIWYG if the 2D- Real file is loaded into the workspace the main menu [C]hange [S]cale command, or [P]review command scale, would need to be changed to 1.

The actual line width of lines printed will vary somewhat on different types of printers, e.g. dot matrix printers use 240 dots per inch and laser printers use 300 dots per inch. The core length of lines in DANCAD3D (tm) print out is uneffected by the printer type if the printer driver has been selected or installed properly, only the width of the line segments will vary slightly because of the different dot size used on different printers.


---------------------------------------------------
|             APPROXIMATE LINE WIDTHS             |
---------------------------------------------------
|  DECIMAL  |      WIDTH IN INCHES AND MM         |
---------------------------------------------------
|     0     .   Not used for line width setting.  |
|     1     .   0.0041"  (1/240")   0.10 mm       |
|     2     .   0.0061"  (1/150")   0.15 mm       |
|     3     .   0.0082"  (1/120")   0.20 mm       |
|     4     .   0.0103"  (1/100")   0.26 mm       |
|     5     .   0.0124"  (1/80")    0.31 mm       |
|     6     .   0.0145"             0.36 mm       |
|     7     .   0.0166"  (1/60")    0.42 mm       |
|     8     .   0.0187"             0.47 mm       |
|     9     .   0.0208"  (1/48")    0.52 mm       |
|           .                                     |
|    10     .   0.0229"             0.58 mm       |
|    11     .   0.0241"             0.61 mm       |
|    12     .   0.0263"             0.66 mm       |
|    13     .   0.0285"             0.72 mm       |
|    14     .   0.0307"             0.77 mm       |
|    15     .   0.0329"  (1/32")    0.83 mm       |
|    16     .   0.0351"             0.89 mm       |
|    17     .   0.0373"             0.94 mm       |
|    18     .   0.0395"             1.00 mm       |
|    19     .   0.0417"             1.05 mm       |
|           .                                     |
|    20     .   0.0439"  (1/24")    1.11 mm       |
|    21     .   0.0454"             1.15 mm       |
|    22     .   0.0475"             1.20 mm       |
|    23     .   0.0497"             1.26 mm       |
|    24     .   0.0519"             1.31 mm       |
|    25     .   0.0540"             1.37 mm       |
|    26     .   0.0562"             1.42 mm       |
|    27     .   0.0584"             1.48 mm       |
|    28     .   0.0605"             1.53 mm       |
|    29     .   0.0627"             1.59 mm       |
|           .                                     |
|    30     .   0.0649"  (1/16")    1.64 mm       |
|    31     .   0.0666"             1.69 mm       |
|    32     .   0.0687"             1.75 mm       |
|    33     .   0.0709"             1.80 mm       |
|    34     .   0.0730"             1.85 mm       |
|    35     .   0.0752"             1.91 mm       |
|    36     .   0.0773"             1.96 mm       |
|    37     .   0.0795"             2.02 mm       |
|    38     .   0.0816"             2.07 mm       |
|    39     .   0.0838"             2.13 mm       |
|           .                                     |
|    40     .   0.0859"             2.18 mm       |
|    41     .   0.0877"             2.23 mm       |
|    42     .   0.0898"             2.28 mm       |
|    43     .   0.0919"             2.34 mm       |
|    44     .   0.0941"             2.39 mm       |
|    45     .   0.0962"  (3/32")    2.44 mm       |
|    46     .   0.0983"             2.50 mm       |
|    47     .   0.1005"             2.55 mm       |
|    48     .   0.1026"             2.61 mm       |
|    49     .   0.1048"             2.66 mm       |
|           .                                     |
|    50     .   0.1069"             2.72 mm       |
|    51     .   0.1081"             2.74 mm       |
|    52     .   0.1102"             2.80 mm       |
|    53     .   0.1123"             2.85 mm       |
|    54     .   0.1144"             2.91 mm       |
|    55     .   0.1165"             2.96 mm       |
|    56     .   0.1187"             3.01 mm       |
|    57     .   0.1208"             3.07 mm       |
|    58     .   0.1229"             3.12 mm       |
|    59     .   0.1250"             3.18 mm       |
|           .                                     |
|    60     .   0.1271"  (1/8")     3.23 mm       |
|    61     .   0.1293"             3.28 mm       |
|    62     .   0.1314"             3.34 mm       |
|    63     .   0.1335"             3.39 mm       |
|    64     .   0.1356"             3.44 mm       |
|    65     .   0.1377"             3.50 mm       |
|    66     .   0.1399"             3.55 mm       |
|    67     .   0.1420"             3.61 mm       |
|    68     .   0.1441"             3.66 mm       |
|    69     .   0.1462"             3.71 mm       |
|           .                                     |
|    70     .   0.1483"             3.77 mm       |
|    71     .   0.1504"             3.82 mm       |
|    72     .   0.1526"             3.88 mm       |
|    73     .   0.1547"             3.93 mm       |
|    74     .   0.1568"             3.98 mm       |
|    75     .   0.1589"             4.04 mm       |
|    76     .   0.1610"             4.09 mm       |
|    77     .   0.1632"             4.14 mm       |
|    78     .   0.1653"             4.20 mm       |
|    79     .   0.1674"             4.25 mm       |
|           .                                     |
|    80     .   0.1695"             4.31 mm       |
|    81     .   0.1716"             4.36 mm       |
|    82     .   0.1738"             4.41 mm       |
|    83     .   0.1759"             4.47 mm       |
|    84     .   0.1780"             4.52 mm       |
|    85     .   0.1801"             4.57 mm       |
|    86     .   0.1822"             4.63 mm       |
|    87     .   0.1844"             4.68 mm       |
|    88     .   0.1865"             4.74 mm       |
|    89     .   0.1886"             4.79 mm       |
|           .                                     |
|    90     .   0.1907"  (3/16")    4.84 mm       |
|    91     .   0.1928"             4.90 mm       |
|    92     .   0.1949"             4.95 mm       |
|    93     .   0.1971"             5.01 mm       |
|    94     .   0.1992"             5.06 mm       |
|    95     .   0.2013"             5.11 mm       |
|    96     .   0.2034"             5.17 mm       |
|    97     .   0.2055"             5.22 mm       |
|    98     .   0.2077"             5.27 mm       |
|    99     .   0.2098"             5.33 mm       |
|           .                                     |
|   100     .   0.2119"             5.38 mm       |
|   101     .   0.2129"             5.41 mm       |
|   102     .   0.2150"             5.46 mm       |
|   103     .   0.2171"             5.51 mm       |
|   104     .   0.2192"             5.57 mm       |
|   105     .   0.2213"             5.62 mm       |
|   106     .   0.2234"             5.67 mm       |
|   107     .   0.2255"             5.73 mm       |
|   108     .   0.2276"             5.78 mm       |
|   109     .   0.2297"             5.84 mm       |
|           .                                     |
|   110     .   0.2318"             5.89 mm       |
|   111     .   0.2339"             5.94 mm       |
|   112     .   0.2361"             6.00 mm       |
|   113     .   0.2382"             6.05 mm       |
|   114     .   0.2403"             6.10 mm       |
|   115     .   0.2424"             6.16 mm       |
|   116     .   0.2445"             6.21 mm       |
|   117     .   0.2466"             6.26 mm       |
|   118     .   0.2487"             6.32 mm       |
|   119     .   0.2508"             6.37 mm       |
|           .                                     |
|   120     .   0.2529"  (1/4")     6.42 mm       |
|   121     .   0.2550"             6.48 mm       |
|   122     .   0.2571"             6.53 mm       |
|   123     .   0.2592"             6.58 mm       |
|   124     .   0.2613"             6.64 mm       |
|   125     .   0.2634"             6.69 mm       |
|   126     .   0.2656"             6.75 mm       |
|   127     .   0.2677"             6.80 mm       |
|   128     .   0.2698"             6.85 mm       |
|   129     .   0.2719"             6.91 mm       |
|           .                                     |
|   130     .   0.2740"             6.96 mm       |
|   131     .   0.2761"             7.01 mm       |
|   132     .   0.2782"             7.07 mm       |
|   133     .   0.2803"             7.12 mm       |
|   134     .   0.2824"             7.17 mm       |
|   135     .   0.2845"             7.23 mm       |
|   136     .   0.2866"             7.28 mm       |
|   137     .   0.2887"             7.33 mm       |
|   138     .   0.2908"             7.39 mm       |
|   139     .   0.2930"             7.44 mm       |
|           .                                     |
|   140     .   0.2951"             7.49 mm       |
|   141     .   0.2972"             7.55 mm       |
|   142     .   0.2993"             7.60 mm       |
|   143     .   0.3014"             7.66 mm       |
|   144     .   0.3035"             7.71 mm       |
|   145     .   0.3056"             7.76 mm       |
|   146     .   0.3077"             7.82 mm       |
|   147     .   0.3098"             7.87 mm       |
|   148     .   0.3119"             7.92 mm       |
|   149     .   0.3140"             7.98 mm       |
|           .                                     |
|   150     .   0.3161"             8.03 mm       |
|   151     .   0.3182"             8.08 mm       |
|   152     .   0.3204"             8.14 mm       |
|   153     .   0.3225"             8.19 mm       |
|   154     .   0.3246"             8.24 mm       |
|   155     .   0.3267"             8.30 mm       |
|   156     .   0.3288"             8.35 mm       |
|   157     .   0.3309"             8.40 mm       |
|   158     .   0.3330"             8.46 mm       |
|   159     .   0.3351"             8.51 mm       |
|           .                                     |
|   160     .   0.3372"             8.57 mm       |
|   161     .   0.3393"             8.62 mm       |
|   162     .   0.3414"             8.67 mm       |
|   163     .   0.3435"             8.73 mm       |
|   164     .   0.3456"             8.78 mm       |
|   165     .   0.3478"             8.83 mm       |
|   166     .   0.3499"             8.89 mm       |
|   167     .   0.3520"             8.94 mm       |
|   168     .   0.3541"             8.99 mm       |
|   169     .   0.3562"             9.05 mm       |
|           .                                     |
|   170     .   0.3583"             9.10 mm       |
|   171     .   0.3604"             9.15 mm       |
|   172     .   0.3625"             9.21 mm       |
|   173     .   0.3646"             9.26 mm       |
|   174     .   0.3667"             9.31 mm       |
|   175     .   0.3688"             9.37 mm       |
|   176     .   0.3709"             9.42 mm       |
|   177     .   0.3730"             9.48 mm       |
|   178     .   0.3752"             9.53 mm       |
|   179     .   0.3773"             9.58 mm       |
|           .                                     |
|   180     .   0.3794"  (3/8")     9.64 mm       |
|   181     .   0.3815"             9.69 mm       |
|   182     .   0.3836"             9.74 mm       |
|   183     .   0.3857"             9.80 mm       |
|   184     .   0.3878"             9.85 mm       |
|   185     .   0.3899"             9.90 mm       |
|   186     .   0.3920"             9.96 mm       |
|   187     .   0.3941"            10.01 mm       |
|   188     .   0.3962"            10.06 mm       |
|   189     .   0.3983"            10.12 mm       |
|           .                                     |
|   190     .   0.4004"            10.17 mm       |
|   191     .   0.4026"            10.22 mm       |
|   192     .   0.4047"            10.28 mm       |
|   193     .   0.4068"            10.33 mm       |
|   194     .   0.4089"            10.39 mm       |
|   195     .   0.4110"            10.44 mm       |
|   196     .   0.4131"            10.49 mm       |
|   197     .   0.4152"            10.55 mm       |
|   198     .   0.4173"            10.60 mm       |
|   199     .   0.4194"            10.65 mm       |
|           .                                     |
|   200     .   0.4215"            10.71 mm       |
|   201     .   0.4236"            10.76 mm       |
|   202     .   0.4257"            10.81 mm       |
|   203     .   0.4278"            10.87 mm       |
|   204     .   0.4300"            10.92 mm       |
|   205     .   0.4321"            10.97 mm       |
|   206     .   0.4342"            11.03 mm       |
|   207     .   0.4363"            11.08 mm       |
|   208     .   0.4384"            11.13 mm       |
|   209     .   0.4405"            11.19 mm       |
|           .                                     |
|   210     .   0.4426"            11.24 mm       |
|   211     .   0.4447"            11.30 mm       |
|   212     .   0.4468"            11.35 mm       |
|   213     .   0.4489"            11.40 mm       |
|   214     .   0.4510"            11.46 mm       |
|   215     .   0.4531"            11.51 mm       |
|   216     .   0.4552"            11.56 mm       |
|   217     .   0.4573"            11.62 mm       |
|   218     .   0.4595"            11.67 mm       |
|   219     .   0.4616"            11.72 mm       |
|           .                                     |
|   220     .   0.4637"            11.78 mm       |
|   221     .   0.4658"            11.83 mm       |
|   222     .   0.4679"            11.88 mm       |
|   223     .   0.4700"            11.94 mm       |
|   224     .   0.4721"            11.99 mm       |
|   225     .   0.4742"            12.04 mm       |
|   226     .   0.4763"            12.10 mm       |
|   227     .   0.4784"            12.15 mm       |
|   228     .   0.4805"            12.21 mm       |
|   229     .   0.4826"            12.26 mm       |
|           .                                     |
|   230     .   0.4847"            12.31 mm       |
|   231     .   0.4869"            12.37 mm       |
|   232     .   0.4890"            12.42 mm       |
|   233     .   0.4911"            12.47 mm       |
|   234     .   0.4932"            12.53 mm       |
|   235     .   0.4953"            12.58 mm       |
|   236     .   0.4974"            12.63 mm       |
|   237     .   0.4995"            12.69 mm       |
|   238     .   0.5016"            12.74 mm       |
|   239     .   0.5037"            12.79 mm       |
|           .                                     |
|   240     .   0.5058"  (1/2")    12.85 mm       |
|   241     .   0.5079"            12.90 mm       |
|   242     .   0.5100"            12.95 mm       |
|   243     .   0.5121"            13.01 mm       |
|   244     .   0.5143"            13.06 mm       |
|   245     .   0.5164"            13.12 mm       |
|   246     .   0.5185"            13.17 mm       |
|   247     .   0.5206"            13.22 mm       |
|   248     .   0.5227"            13.28 mm       |
|   249     .   0.5248"            13.33 mm       |
|   250     .   0.5269"            13.38 mm       |
|           .                                     |
|   250     .   0.5269"            13.38 mm       |
|   251     .   0.5290"            13.43 mm       |
|   252     .   0.5311"            13.48 mm       |
|   253     .   0.5332"            13.54 mm       |
|   254     .   0.5353"            13.59 mm       |
|   255     .   0.5374"            13.65 mm       |
---------------------------------------------------

The actual line width you get will depend on the kind of printer you are using, and the printer driver used and how the printer driver is set up. The setting of the "darkness" control in the printer, or the number of strikes can also effect the line width somewhat.

DANCAD3D (tm)'s line shape attribute controls the shape of the ends of line segments that are thicker than line width one (1.) When drawing in line width one (1) and when drawing rectangles that are parallel to the major axis you should use the square line end caps, when drawing other shapes and lettering you should use the round line end caps. The line cap options other than square and round are for decorative effects.

The best way to code the line attributes into macro commands is to use the automatic [O]utput macro feature and answer the menu prompts while using DANCAD3D (tm). You can figure the attributes manually if you wish, or make a note of the code numbers of some attribute you use repeatedly by looking at the output macro and reading the code numbers generated.

If you wish to manually compute the line shape and style attributes you can assign the shape attribute bits in the table below. For "free" line segments the buts marked x would normally all be set to 0, but for triangle elements the bits marked x may be set to 1 or 0 depending on what type of triangle it is, and if the line is the first or second line in the triangle. In general for triangles you should just set the first line of the triangle's end cap shape bits to "square and equal" or "round and equal" i.e. 1st_shape = 1st_shape "OR" 16.


-------------------------------------------------
| LINE END CAP TYPES SHAPES FOR SHAPE ATTRIBUTE |
-------------------------------------------------
|    SHAPE NAME     | DECIMAL | HEX |  BINARY   |
-------------------------------------------------
| SQUARE and EQUAL  |      0  |  00 | xxx0 x000 |
| SQUARE and TALL   |      1  |  01 | xxx0 x001 |
| SQUARE and WIDE   |      2  |  02 | xxx0 x010 |
| SQUARE and RIGHT  |      3  |  03 | xxx0 x011 |
| SQUARE and LEFT   |      4  |  04 | xxx0 x100 |
| Undefined         |      5  |  05 | xxx0 x101 |
| Undefined         |      6  |  06 | xxx0 x110 |
| Undefined         |      7  |  07 | xxx0 x111 |
|                   |         |     |           |
| ROUND and EQUAL   |     16  |  10 | xxx1 x000 |
| ROUND and TALL    |     17  |  11 | xxx1 x001 |
| ROUND and WIDE    |     18  |  12 | xxx1 x010 |
| ROUND and RIGHT   |     19  |  13 | xxx1 x011 |
| ROUND and LEFT    |     20  |  14 | xxx1 x100 |
| Undefined         |     21  |  15 | xxx1 x101 |
| Undefined         |     22  |  16 | xxx1 x110 |
| Undefined         |     23  |  17 | xxx1 x111 |
-------------------------------------------------

For the line style attribute the SPACING of the dots on the dotted type line style can range from 1 to 31.


---------------------------------------------------
|    APPROXIMATE DOT SPACING DISTANCE VALUES      |
---------------------------------------------------
|  DECIMAL  |      SPACING IN INCHES AND MM       |
---------------------------------------------------
|     1     .   0.0083"  (1/120")   0.21 mm       |
|     2     .   0.0166"  (1/60")    0.42 mm       |
|     3     .   0.0250"  (1/40")    0.63 mm       |
|     4     .   0.0333"  (1/30")    0.84 mm       |
|     5     .   0.0416"  (1/24")    1.05 mm       |
|     6     .   0.0450"             1.14 mm       |
|     7     .   0.0583"             1.48 mm       |
|     8     .   0.0666"  (1/15")    1.69 mm       |
|     9     .   0.0750"             1.90 mm       |
|    10     .   0.0833"  (1/12")    2.11 mm       |
|    11     .   0.0916"             2.32 mm       |
|    12     .   0.1000"  (1/10")    2.54 mm       |
|    13     .   0.1083"             2.75 mm       |
|    14     .   0.1166"             2.96 mm       |
|    15     .   0.1250"  (1/8")     3.17 mm       |
|    16     .   0.1333"             3.38 mm       |
|    17     .   0.1416"             3.59 mm       |
|    18     .   0.1500"             3.81 mm       |
|    19     .   0.1583"             4.02 mm       |
|    20     .   0.1666"  (1/6")     4.23 mm       |
|    21     .   0.1750"             4.44 mm       |
|    22     .   0.1833"             4.65 mm       |
|    23     .   0.1916"             4.86 mm       |
|    24     .   0.2000"  (1/5")     5.08 mm       |
|    25     .   0.2083"             5.29 mm       |
|    26     .   0.2166"             5.50 mm       |
|    27     .   0.2250"             5.71 mm       |
|    28     .   0.2333"             5.92 mm       |
|    29     .   0.2416"             6.13 mm       |
|    30     .   0.2500"  (1/4")     6.35 mm       |
|    31     .   0.2583"             6.56 mm       |
---------------------------------------------------

Multiply the decimal dot spacing code by eight and add the style code number to get the complete line style attribute code number. For example for a dashed line with a spacing of 10 you would use a Style attribute set with 2 + (10 * 8) = 82.


---------------------------------------------------
|            ATTRIBUTES OF LINE STYLES            |
---------------------------------------------------
|    SOLID..... STYLE = 0                         |
|    DOTTED.... STYLE = 1 + (SPACING * 8)         |
|    DASHED.... STYLE = 2 + (SPACING * 8)         |
|    COMBO..... STYLE = 3 + (SPACING * 8)         |
---------------------------------------------------

The bit places for the dot spacing are shown in the table below. Remember that you must "OR" (or add) the dot spacing DECIMAL x8 value with (to) the end cap DECIMAL value, e.g. add the dashed value of 2 to the spacing x8 value of 96 (spacing x1 of 12 equals x8 value of 96) and you get style attribute of 98 which produces a dashed line with a spacing 12 or about 0.1".


-------------------------------------------------------
|      JUST DOT SPACING BITS FOR STYLE ATTRIBUTE      |
-------------------------------------------------------
|  DECIMAL SPACING  | DECIMAL x8 | HEX x8 | BINARY x8 |
-------------------------------------------------------
| 0 for solid only  |         0  |    00  | 0000 0u00 |
|        1          |         8  |    08  | 0000 1uNN |
|        2          |        16  |    10  | 0001 0uNN |
|        3          |        24  |    18  | 0001 1uNN |
|        4          |        32  |    20  | 0010 0uNN |
|        5          |        40  |    28  | 0010 1uNN |
|        6          |        48  |    30  | 0011 0uNN |
|        7          |        56  |    38  | 0011 1uNN |
|        8          |        64  |    40  | 0100 0uNN |
|        9          |        72  |    48  | 0100 1uNN |
|       10          |        80  |    50  | 0101 0uNN |
|       11          |        88  |    58  | 0101 1uNN |
|       12          |        96  |    60  | 0110 0uNN |
|       13          |       104  |    68  | 0110 1uNN |
|       14          |       112  |    70  | 0111 0uNN |
|       15          |       120  |    78  | 0111 1uNN |
|       16          |       128  |    80  | 1000 0uNN |
|       17          |       136  |    88  | 1000 1uNN |
|       18          |       144  |    90  | 1001 0uNN |
|       19          |       152  |    98  | 1001 1uNN |
|       20          |       160  |    A0  | 1010 0uNN |
|       21          |       168  |    A8  | 1010 1uNN |
|       22          |       176  |    B0  | 1011 0uNN |
|       23          |       184  |    B8  | 1011 1uNN |
|       24          |       192  |    C0  | 1100 0uNN |
|       25          |       200  |    C8  | 1100 1uNN |
|       26          |       208  |    D0  | 1101 0uNN |
|       27          |       216  |    D8  | 1101 1uNN |
|       28          |       224  |    E0  | 1110 0uNN |
|       29          |       232  |    E8  | 1110 1uNN |
|       30          |       240  |    F0  | 1111 0uNN |
|       31          |       248  |    F8  | 1111 1uNN |
-------------------------------------------------------

The binary bits used to select the line style end cap type are shown in the table below. Remember to combine the dot spacing bits with the end cap mode bits, when the modes other than solid are used, since a spacing value of 0 is not allowed for dotted, dashed, or combo.


----------------------------------------------
| JUST LINE END CAP BITS FOR STYLE ATTRIBUTE |
----------------------------------------------
|  MODE NAME     | DECIMAL | HEX |  BINARY   |
----------------------------------------------
|  SOLID         |      0  |  00 | 0000 0u00 |
|  DOTTED        |      1  |  01 | NNNN Nu01 |
|  DASHED        |      2  |  02 | NNNN Nu10 |
|  COMBO         |      3  |  03 | NNNN Nu11 |
----------------------------------------------

An important point to remember is that when you are going to use the Negative option to reverse the pixels in a page file to produce white lines on a black background (e.g. for PWB or PCB negatives) is that black areas always "bleed" into white areas on printers. Since the black areas in the print out spread about 0.005" to 0.010" you should use a larger width value for line segments that are to appear as white lines on a black background.

When making lettering that will print larger than 0.125 inch high you should set the line width to a value larger than one. With the commands in the [L]ines sub-menu you can change the line width of a lettering element without having to erase the element and do the lettering command again.

It is important that the shape and style attributes have valid values, otherwise your lines may not display properly or at all. In general the value of the attributes should only be figured by the program through use of the commands in the program's menus, in particular the commands in the [L]ines sub-menu of the drawing editor.

When using a [L]ettering font file that makes parallel lines for characters that have wide lines, you should set the line width attribute to a width that will make the parallel lines "run together" by an amount appropriate to the height that the characters will be printed out at. These type of font files are meant for use in engraving, and because the engraving cutter has a diameter that is about 0.05 to 0.01 the height of the characters the parallel "strokes" used to make the lines wider in parts of the characters can have gaps that will be taken out by the width of the cutter. When you display such fonts on the video screen or in print out on a dot matrix or on a laser type printer the line width attribute needs to be used to get the line width that comes naturally in cuts made by the width of the diameter of the engraving cutter.

If any new codes are added to DANCAD3D (tm) to allow for additional features the attributes values may be altered. So any bits not used by the above described attributes should always be set to 0 if you are generating style attribute code numbers for DANCAD3D (tm) drawing data in some other program you have written.

Click here to go back to the top of this page.

Detailed discussion of Triangle Attributes.

This information relating to the attribute bytes used for defining triangles is preliminary and subject to change without notice. I do not recommend distributing programs that read or write element files using these triangle attributes since the use of, or assignment of, the attributes may change in revised versions of my programs and your files or programs could become invalid.

See the definitions for the bit and byte descriptions higher up in this section.

In order to have DANCAD3D (tm) and DANCAD87 (tm) work with elements that have surfaces for 3D hidden line display and for making some kinds of 3D surface tool path, an element type made of triangles rather than just "free" line segments was required. Since the CAD programs up to v2.6 had just been designed to work with line segments I needed to find a way to store triangles in the workspace that only used line segments. In addition to the three lines of the triangle edges a forth line "normal" to one face of the triangle is also required for some aspects of processing the surfaces made of triangles. I could have just used four line segments in the workspace to define each triangle and its normal, but in order to conserve file space, and speed processing I found that only two of the line segments actually needed to be stored, the other two could be implied from the two that where stored.

The triangle and its normal can be defined by four points, and these four points can be described by two line segments in the workspace. The first line segment goes from point 1 to point 2 of the triangle, and the second line segment goes from point 3 of the triangle to the end point of the normal line drawn perpendicular to the corner of the face of the triangle at point 3 to point 4. The two implied line segments from point 2 to point 3, and from point 3 to point 1 are generated internally by the program when needed.

Since some of the attribute bits for the line segments where not being used in v2.6 I was able to make new definitions for those bits in order to flag some essential qualities for the triangles. The attribute bits used by triangles are what is described in this part of this section. Some of the bits used for the attributes of "free" line segments where retained or extended for triangles, such as the line color attribute of the first line segment controlling the triangle fill color in some display modes, and the line width controlling the display line width for the edge outline line segments in some hidden line triangle display modes.


----------------------------------------------------------------------------
|           BITS IN LINE ATTRIBUTE BYTES AVAILABLE FOR TRIANGLES           |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  NNNx Nxxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  NNNN Nxxx  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

The color, width, and other line attributes are normally to be taken from the attributes of the first line in the triangle, so the operation or effect of many of the bits in the second line of the triangle is "up in the air" (undefined) at this point. To avoid possible conflicts with the operation of some commands the bits not used by the hidden line triangle control bits should be set to valid "free" line values, generally the same as in the first line of the triangle, except where there are conflicts of use in the bits, when the triangle use for bits takes president. You can probably also set 2nd_color and 2nd_width to 1, and do a logical OR upon zero with the triangle bits for the 2nd_shape and 2nd_style attribute. When the LINETYPE command resets the attributes in a triangle element it skips over the second lines in the triangles and leaves the original values. Extreme care should be exercised when using the ALTER command on lines in triangles, since you will need to assign both valid and correct line and triangle attributes for any line in the workspace that you alter. The line from p3 to p4 is the normal line of the triangle and is not normally displayed (except for special display modes where the color and width of the first line of the triangle would probably be used for the display of the p3 to p4 line), so the p3 to p4 line color and width attributes are not normally used. I may change how the attributes are used from the second line in the triangles someday, so these issues are still evolving and have not been settled upon as yet.

Although both "free" line and triangle elements can be in the workspace at the same time, "free" lines and the triangle's line pairs should not be mixed in a single element. If element 0 (all elements in the workspace) is selected for some display modes or commands all of the elements in the workspace would need to be of only the same type, i.e. "free" line or triangle type, not mixed. To screen for potential problems that could result from mixing the data types the program looks for some aspects of the element to try to see if it is a "free" line or triangle element. If you edit data manually you can produce errors by introducing abnormal combinations of attributes and line orders, so be careful.

The bits used for the triangle attributes have different meanings in the first and second lines in a triangle, so look at the line order to figure out if the attributes are assigned to the right line segment. The first line of the triangle is normally ordered odd from the first line of the triangle, i.e. lines 1, 3, and 5 in a triangle element would be first lines of a triangle. Likewise lines 2, 4, and 6 counting from the start of the element would be second lines of a triangle. You see that triangle elements should have an even number of line segments. The starting line of a triangle element in the workspace can be even or odd depending on if there are any line elements in the workspace with an element number less than the triangle element in question, so the actual line numbers for the lines in the triangle may be even or odd for first or second line segments, you need to consider the line count from the first line in the element made of triangles.

To distinguish between triangle and "free" line elements the sixth bit in the shape byte in the first line of the triangle is used to indicate that that line is the first line of a triangle. The seventh shape bit in the first line of a triangle is normally set to 0 since that seventh bit is used to flag the second line of a triangle.


----------------------------------------------------------------------------
|           BITS USED FOR FLAGGING THE FIRST LINE IN A TRIANGLE            |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  *01x *xxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  **** *xxx  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

Although it might seem unnecessary to flag the second line of a triangle, a bit has been set up for that purpose in order to allow for screening of out of order line segments from triangles. To this end the seventh bit in the shape attribute of the second line in the triangle is set high and the sixth bit is set low.


----------------------------------------------------------------------------
|           BITS USED FOR FLAGGING THE SECOND LINE IN A TRIANGLE           |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  ***x *xxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  *10* *xxx  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

So if you test the shape byte by (((SHAPE AND 96) = 0) = TRUE) you can tell that the line segment is a "free" line segment, and not part of a triangle.

The programs distinguish between different kinds of triangles for processing with the THICKEN command and for various display modes. Triangles can be classed by one or more of their their edge lines as: outside edge, inside junction, or surface. Surface and junction triangles do not normally create new faces in the direction of thickening with the THICKEN command, they only make duplicates on the thicken new face. Surface triangles are set not to show an outline of the edges of the triangle in some display modes, Junction triangles may display one or two of their edges. Outside Edge triangles normally are set so they will display at least one or two edges in display modes that display edges.

The eighth bit of the first line shape attribute flags that a triangle is on an outside edge for the THICKEN command. This bit would normally be 0 for surface or inside junction triangles.


----------------------------------------------------------------------------
|        BITS USED FOR FLAGGING A OUTSIDE EDGE TRIANGLE FOR THICKEN        |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  101x *xxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  **** *xxx  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

The forth bit of the first line shape attribute flags that a triangle a surface triangle with no side on the edge of the element. This bit would normally be 0 for outside edge or inside junction triangles.

If a triangle is flagged as a surface triangle it will not normally display any of its edges even if the edge display bits are set in the second line shape attribute, in some display modes, so you need to keep in mind that these control bits need to be set in a pattern that makes sense to the program, the bits may not work independently.


----------------------------------------------------------------------------
|                 BITS USED FOR FLAGGING A SURFACE TRIANGLE                |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  *01x 1xxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  **** *xxx  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

The eighth bit of the second line shape attribute selects display of the line that goes from point one to point two of the triangle. The direction of the point one to point two line segment determines the direction the triangle is facing and what side of the triangle the normal line extends from.


----------------------------------------------------------------------------
|         BITS USED FOR FLAGGING DISPLAY P1 TO P2 LINE OF TRIANGLE         |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  ***x *xxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  110* *xxx  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

The fifth bit of the second line shape attribute selects display of the line that goes from point two to point three of the triangle.


----------------------------------------------------------------------------
|         BITS USED FOR FLAGGING DISPLAY P2 TO P3 LINE OF TRIANGLE         |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  ***x *xxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  *101 *xxx  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

The forth bit of the second line shape attribute selects display of the line that goes from point three to point one of the triangle.


----------------------------------------------------------------------------
|         BITS USED FOR FLAGGING DISPLAY P3 TO P1 LINE OF TRIANGLE         |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  ***x *xxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  *10* 1xxx  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

Below is an example combination of bit values, such as would be used for the three types of triangles. The two shape bytes are the ones most relevant to the triangles properties, the color and width bytes of the second line segment are mostly place holders in v2.7.


----------------------------------------------------------------------------
|             ATTRIBUTE BITS USED FOR EXAMPLE EDGE TRIANGLE                |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  0000 1111  0000 0101  1011 0000  0000 0000  |  FIRST LINE OF TRIANGLE   |
|  0000 0001  0000 0001  1100 0000  0000 0000  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

In the above edge triangle example the first shape byte has bits set to true for: edge triangle bit, flag first line of a triangle bit, round line end caps bit. The second shape byte has bits set true for: show p1 to p2 line for some modes bit, and flag second line of a triangle. Sometimes the bits to "display" the p2 to p3 line or the p3 to p1 line might also be set, and such.

As a general rule lines of an edge triangle that are not set to display, should only abut (run along) lines of other triangles that are also set to not display. The edge lines that are set to display should only line up with other edge or junction lines that are also set to display. If you mix up the triangle edges that are set to display or not to display you may get lines on your surfaces or pieces of the edges missing in some display modes.

Junction triangles are like Edge triangles, except that the "displayed" edge(s) do not create new surfaces when the element is thickened with the THICKEN command.


----------------------------------------------------------------------------
|             ATTRIBUTE BITS USED FOR EXAMPLE JUNCTION TRIANGLE            |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  0000 1111  0000 0101  0011 0000  0000 0000  |  FIRST LINE OF TRIANGLE   |
|  0000 0001  0000 0001  1100 0000  0000 0000  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

In the above edge triangle example the first shape byte has bits set to true for: flag first line of a triangle bit, round line end caps bit. The second shape byte has bits set true for: show p1 to p2 line for some modes bit, and flag second line of a triangle. Sometimes the bits to "display" the p2 to p3 line or the p3 to p1 line might also be set, and such.

The "displayed" triangle lines of a junction triangle are used to make "seams" or "bends" on surfaces where two triangles meet, and you want a line to show up in those display modes that show the junction line segments. The non-display lines of a junction triangle should abut the non-display lines of edge or surface triangles. The display line of junction triangles should abut the display lines of other junction triangles, or sometimes the display lines of edge triangles.

Surface triangles are used to fill space between edge and or junction triangles when you do not want the triangle outlines to show in some display modes, and you do not want THICKEN to make new surfaces from the surface triangle edges.


----------------------------------------------------------------------------
|             ATTRIBUTE BITS USED FOR EXAMPLE SURFACE TRIANGLE             |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  0000 1111  0000 0101  0011 1000  0000 0000  |  FIRST LINE OF TRIANGLE   |
|  0000 0001  0000 0001  0100 0000  0000 0000  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

In the above edge triangle example the first shape byte has bits set to true for: flag first line of a triangle bit, round line end caps bit, and flag this is a surface triangle. The second shape byte has bits set true for: only flag second line of a triangle. The bits for the "display" of the triangle's outline are generally ignored for surface triangles, but should be set to false anyway. The round line end caps bit would be ignored by most of the display modes since none of this surface triangles outlines would normally be displayed.

In a surface triangle none of the triangle's edges should make up an outside edge or boundary of an element's face, they are just for filling space in the "middle" of an external surface face.

The line color attribute in the above examples was set to 15 since the brighter colors generally look better in the display modes that show the triangles as filled in by the line color indicated for the p1 to p2 line segment. The color display may be altered by the palette table, so check the palette settings with the [P]alette command in the drawing editor [S]et-up sub-menu.

The line width was set to 5 since a heavier outline looks better in the printout using a LaserJet (tm) type printer. Do not set the line width to zero.

The round line end cap bit was set using the LINESTYLE command so that the "corners" of the 3D elements would look more balanced even for elements rotated to various angles in the printout.

When importing 3D triangle data that you do not have correct information for the p4 data, the p4 coordinates should be set to the same values as p3, and the CORRECT command used to generate new normal data, i.e. assign p4 values, from the p1, p2, and p3 locations. Remember that the direction of the p1 to p2 line determines the side of the triangle the normal line points to, so if all your triangles are "inside-out" try swapping the p1 and p2 point data.

There may be changes to these attribute bytes and how they are used in any possible future versions of the programs, so keep in mind that all specifications are subject to change without notice.

Click here to go back to the top of this page.

Discussion of Mutated Line Attributes.

The MUTATE command can be used to turn drawing lines into 3D line like shapes made of triangles so that line elements can be displayed as part of an image that includes triangle elements. This has a different effect from displaying lines into the Z- BUFFER since the mutated lines can be in the 3D workspace along with the triangle elements, rotated to various 3D perspective angles and such, whereas ordinary free lines displayed to the Z-BUFFER would be superimposed over the image already in the Z-BUFFER and not part of the 3D composition.

The program needs to know which triangle elements have been mutated from line elements in order to give the mutated elements special treatment while they are being displayed.


----------------------------------------------------------------------------
|       BIT IN TRIANGLE ATTRIBUTE BYTES FOR MUTATED FROM LINES FLAG        |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  xxxx xxNx  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

The second bit of the triangle's second line shape attribute is used to flag that a triangle has been mutated from a free line. There is no command to change the mutation flag bit, other than when the MUTATE command is used originally to make the mutated element. You could change the MUTATE bit by editing an ASCII file of the element, but I cannot think of much of a reason for doing so. When the second bit of the triangle's second line shape attribute is high the triangle was mutated, and low the triangle is ordinary.

The MUTATE command has several options for controlling the setting of the mutated flag bit. The MUTATE command has modes for use with the hidden line display modes. The Mutated element can be flagged for special treatment in some display modes. Mode 1 is now like mode 102. Mode 100 is like the old mode 1, that is the mutated triangles are not flagged as mutated. Mode 102 flags the triangles as mutated by setting the second bit of the triangle's second line's shape attribute. Mode 103 flags the triangle as both mutated and to be displayed with shaded edge outlines in display modes that shade the edge outlines, by setting both the first and second bits of the triangle's second line's shape attribute.


# 1 MUTATE 1    ; Convert free lines to triangles, like mode 102 in v2.7G
# 2 MUTATE 2    ; like in v2.7E
# 2 MUTATE 3    ; like in v2.7E
# 1 MUTATE 100  ; line mode 1 in v2.7E
# 1 MUTATE 102  ; lines to triangles, flag as mutated
# 1 MUTATE 103  ; like 102 but also flag for shade by depth

Mutate mode 100 is not generally recommended since the shine of the surface reflection from the light sources can show up in the rendering depending on the angle of the element and the display mode.

Mutate mode 102 sets the second bit of the second line in each triangle's shape byte so that the program knows that the triangles have been mutated from free lines and can give them special treatment.

Mutate mode 103 sets the first and second bits of the second line in each triangle's shape byte so that the program will shade the mutated element by depth in display modes, such as perspective display mode 64, that support that option. Although you might want to use this feature to have the mutated lines shade along with the other elements in a 3D rendering, because the lines going toward the back of the display space when rotated can get very dark, you might prefer to use mutate mode 102 to keep the line color constant at all depths. These mutate modes are available through the Mutate command in the drawing editor, and the MUTATE macro command.

The LINETYPE command was also modified so as to bypass the second bit of the triangle's second shape attribute byte, so that the element mutated from a free line flag bit, the second bit in the second shape byte, would not get changed when you use the LINETYPE command to alter the color or edge line width of a triangle element. You should not edit triangle elements made in, or to be used in v2.7F or later, in versions or revisions of the CAD programs prior to v2.7F since the presence of these control flag bits in triangle elements was not defined in those versions, and the bits may get improperly altered or have undesirable effects. In general, drawings or elements made in a newer version or revision should not be used in older versions or revisions since the code that supports newer features is not the same or even present in older versions.

Since the LINETYPE command is set to bypass the mutated flag bit, you cannot use it to alter the mutated flag bit. This is probably not a problem since that bit is only used to flag mutated triangle elements. If you need to alter that bit you can save the element as an ASCII file and use the search and replace in the Write command or some other text editor to change the second shape byte's values, you can edit the automatic output macro you saved while drawing and change the mutate mode so that when you regenerate the drawing the mutate bit is not set, or you can try to mutate the triangles back into free lines and then mutate them back into triangles but use a different mode the second time.

Click here to go back to the top of this page.

Discussion of Triangle Edge Shading Attributes.

The triangle edges can be flagged to be displayed as outlined. The triangle Edge Shading attribute bit lets you flag a triangle so that when it is displayed, in some of the display modes, the edge outlines are to be shaded by depth, or are not to be shaded at all.


----------------------------------------------------------------------------
|        BIT IN TRIANGLE ATTRIBUTE BYTES FOR SHADE EDGE LINES FLAG         |
----------------------------------------------------------------------------
|          ATTRIBUTE BITS IN BYTES             |           NAME            |
----------------------------------------------------------------------------
|    COLOR      WIDTH      SHAPE      STYLE    |     LINE IN TRIANGLE      |
----------------------------------------------------------------------------
|  uxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xuxx  |  FIRST LINE OF TRIANGLE   |
|  uxxx xxxx  xxxx xxxx  xxxx xxxN  xxxx xuxx  |  SECOND LINE OF TRIANGLE  |
----------------------------------------------------------------------------

The one bit of the triangle's second line shape attribute flags that you want the triangle edges to be displayed with depth shading when a display mode is selected, such as mode 63, that can display shaded triangle edge outlines. There is no special command for setting this bit from the menus, but you can select "Tall" shape with the Lines edit Line style command in the drawing editor in order to set the one bit of the shape attributes for the element to high and so activate this feature. When the one bit of the second line shape attribute is low the edge outlines are displayed without shading even in modes that can display shaded outlines. You can select "Equal" shape with the Lines edit Line style command in the drawing editor in order to set the one bit of the shape attributes for the element to low so edge shading is not activate in that element.

The way the LINETYPE command processes triangle elements was revised so that the first bit of the second line of the triangles' shape byte could be set in order to flag that you want the edge outlines shaded in some display modes, and also to bypass the second bit of the second shape byte so that the mutated element flag bit would not be changed when you alter the other attributes.

Click here to go back to the top of this page.

TERMS OF USE, HOME, INDEX, SHORTCUT, WHAT'S NEW, DOWNLOADS, GET MAIN ZIP, DOCUMENTATION, VIDEO, HOOKUP#1, #2, #3, KEYWORDS

WWW.DANCAD3D.COM (sm): THE OFFICIAL DANCAD3D (tm) "BETA TEST" WEB SITE.

This copy of this page was compiled on or around: Y2011.M11.D23, you might check the "On-Line" version, or come back later, to see if there is a newer compile.