The file data consists of ASCII formatted text, which can be used by different operating systems, languages, and application programs.
ME10 User's Guide
explains how to create 2D geometry,
and then store it as an MI file using the STORE MI
command from the FILE screen menu. You can look at the
contents of the file using the
EDIT_FILE
command.
MI is normally used for 2D applications, but a third dimension can be specified for closed contours such as circles and rectangles. This can be used, for example, by NC machines that need a Z-value to specify a milling depth. This Z-value is ignored by ME10 during load.
MI can be easily extended to 3D in future revisions.
Using suitable translators, many of these systems can use the information provided in an MI file.
Many systems now process geometric data. The problem of transferring data from one system to another increases as the number of systems increase. If there is no standard method for representing geometric data, two translators are needed for data transfer between each pair of systems: one translator is needed in one direction, and one translator in the other direction.
The following figure shows the number of translators needed for five systems to communicate with each other. Since data is transferred in both directions between each pair of systems, the number of arrows represents the number of translators. So, 20 translators are needed for five systems.
The number of translators can be reduced by using the Model Interface as a standard method of representing geometry. Each system then communicates only with the Model Interface, as shown in the next figure:
The number of translators is reduced from 20 to 10.
For direct communication between systems, the number of translators is n(n-1) where n is the number of systems. Using MI, the number of translators is reduced to 2n.
ME10 has two translators: one for translating all the information produced by ME10 into MI format, and one for reading an MI file and translating the data into a form usable by ME10.
MI is not the only method of representing geometry for transfer between systems. For example, there is the Initial Graphic Exchange Specification (IGES), which may be suitable for some users.
Translators are available for data transfer between MI and IGES. So, if your systems are already communicating with IGES, you don't have to write additional translators to allow them to communicate with MI.
#~1
)
#~2
)
#~3
)
#~41
)
#~42
)
#~5
)
The next list shows the remainder of the sections in the MI file. Again, not all of these sections will appear in a file. But the sections that do appear will appear once for each part or subpart in the model.
#~6
)
#~61
)
#~62
)
#~63
)
#~71
)
#~72
)
#~81
)
#~82
)
#~31
)
The previous group of items is referred to as the part definition. There is one part definition for each part. If there is more than one part, then these sections are repeated:
#~6
)
#~61
)
Each file section begins with #~
symbols. For
example, the Table of Contents always begins with
#~2
, and the Setup section always begins with
#~3
.
A full description of all the file sections is given in the following chapters, but we will give a few examples here.
Since any MI file is complex, we have tried to reduce the complexity by keeping each file as short as possible. Only a few specific points are shown in each example; the example on assemblies contains no dimensions, text, or hatching; the example on hatching contains no assemblies, and so on. In each example, we usually only discuss those parts of the file that are different from previous examples.
The first example shows the MI file for a blank screen. This allows us to discuss the Start section, the Table of Contents Section, and the Setup section without mentioning geometry, properties, or parts structure. In later examples, the first three sections will not be mentioned again.
STORE MI
with the screen
completely empty: no geometry, text, dimensions, or hatching.
Start-of-section marker for Section 2 #~2 There will be two TC entries immediately following 2 The sequence number of the first entity in Section 41 is 1 TC41:1 The sequence number of the first entity in Section 5 is 2 TC5:2 Name of the part Top Number of TC entries for the part called "Top" 1 Sequence Number of last entity for the part called "Top" PLAST:2 Sequence Number of last entity in the MI file LAST:2
Refer to Table of Contents Section (#~2) while you are studying this section of the file.
The first line in the file, #~2
, is the
start-of-section marker for Section 2, the Table of Contents. You
saw earlier, in the
list of file sections in MI File Structure, that the first section
in an MI file should be the Start Section (#~1).
What happened to Section 1? The answer is that the Start Section
does not appear in MI files produced by ME10; this section is
reserved for text that the user may wish to add after the file is
created. Here is an example of text that could be added to our
example file:
#~1 This file is an example for the MI manual. The file contains no geometry, text, dimensions, or hatching so it shows the minimum possible file.
Now let's get back to our discussion of Section 2. Section 2 is the Table of Contents section. This section gives information about the number of sections in the MI file and the number of "entities". You will learn more about entities later, but for the moment you can think of an entity as being a block of information about some part of a drawing, for example text or dimensions. Most entities have a known size, depending on which file section they are in, so the information in the Table of Contents section allows the processor to calculate the approximate amount of memory needed for the MI file.
Here are some additional comments on the Table of Contents listing, shown earlier.
Line 3 | Section 41 is the Simple Properties section. |
Line 4 | Section 5 is the Assembly Hierarchy section. |
Line 5 | Even an empty screen has a name. This is the name you see at the top left of your ME10 screen. |
The Setup Section contains information that applies to the entire drawing. Examples are: length units, angle units, and whether the geometry is 2D or 3D. You will recognize that many of these values are set using the SETUP menu on your ME10 screen. Refer to Setup Section (#~3) while you are studying this section of the file.
The Setup Section for the blank screen is shown here:
#~3 Start-of-section marker for Section 3 blank_screen User-specified filename during"STORE MI" These 6 blank lines are not used in this MI revision . . . . 21-Nov-01 Date of file update 9:59:21 Time of file update Name of person who updated the file ME10 Rev. 0x.xx MI File Creating System 2.80 MI version 2D Indicates that geometry points are 2D 0 These six values represent the 0 X, Y, and Z-values of a 0 window that just fits the 0 drawing. Since we stored a 0 blank screen, there is 0 no window 1 Unique partname A1 Drawing format 1 Factor for units of length mm Abbreviation for units of length RAD Units of angle 1E-12 Minimum resolution of MI file-writing system 0.0001 Precision of dimension values 32 Used to calculate the maximum permissible integer 0 Not used in this version of MI (2.80) 0 Not used in this version of MI (2.80) 1 These 16 lines are the transformation 0 matrix 0 . 0 . 0 . 1 . 0 . 0 . 0 . 0 . 1 . 0 . 0 . 0 . 0 . 1 . 4 Entity definitions will contain four attributes 1 Points redundancy-free flag 0 Elements redundancy-free flag 0 Elements overlap-free flag 3.5 Arrowhead size in current units
The transformation matrix in this file is:
[1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1]
The Simple Properties section contains property entities. In our
blank_screen
file, there is only one property entity:
#~41 Start-of-section marker for Section 41 PSTAT Name of entity (Part Status Property) 1 Entity sequence number 0 The part contains original geometry (default) 0 Part will be scaled if drawing scale is changed |~ End-of-entity marker
Line 2 | An entity always begins with the abbreviation for
the entity name, for example PSTAT , and ends with the
end-of-entity marker (|~). There is a Part Status Property
entity for
each part. The entity indicates whether the corresponding part
contains original geometry, a detailed view, or a perspective
view. Since we have a blank screen, the default is 0 (see
line 4).
|
Line 3 | Since this is the first (and only) entity in the
file, the Entity Sequence Number is 1 .
|
Line 6 | Every entity ends with this marker (|~). |
This section contains an entity for each part. Each entity contains the following:
#~6
as the
Start-of-Section marker.
PSTAT
.
PSTAT
:
Here is the Hierarchy section for blank_screen
.
#~5 Start-of-section marker for Section 5 ASSE Name of entity (Assembly) 2 Entity sequence number 1 Property count 1 Pointer to entity sequence number1
(PSTAT
) Top Pointer to part definition having this name 1 Drawing scale of part 0 X-Value of Offset Vector 0 Y-Value of Offset Vector 0 X-coordinate of reference point 0 Y-coordinate of reference point 0 Number of subparts |~
The remainder of the file contains part definitions for each
part. Since a blank screen contains a single empty part
called Top
, there is only one part definition in this
example. Here are the remaining sections of the MI file for
blank_screen
:
#~6 Start-of-section marker for Section 6 (Part Name) Top This is the file entry being pointed to by anASSE
#~62 Start-of-section marker for Section62
#~71 Start-of-section marker for Section71
#~72 Start-of-section marker for Section72
##~~ End-of-MI-data marker
You can see that the file for a blank_screen contains sections
for Geometry Elements (#~62
), Annotation Elements (#~71
),
and
Composite Annotation (#~72
), even although these sections
contain no data.
Line 6 | Note that ##~ marks the
end of MI data. The marker is not the same as "end-of-file"
that will be familiar to programmers. After the end-of-MI-data
marker, there can be other data that is not related to MI. Such
data is ignored by ME10.
|
This completes our discussion of Example 1. In the following
examples, we will make no further reference to the Start section
(#~1
), the Table of Contents section
(#~2
), or the Setup section (#~3
).
The only items in the Setup section that are likely to change in the following examples are:
LIN
) contains
pointers to two point entities (P
), and a pointer to
associated
text (ASSP
). The associated text indicates which layer
the
line is in. (For further information on layers, refer to the ME10 User's Guide.)
The first part of this file is shown here. In this example, and all the following examples, we will ignore the Table of Contents section, and the Setup section.
#~41 PSTAT Part Status Property 1 & Entity sequence number 0 0 |~ ASSP Associated text property 2 & Entity sequence number 1 Number of associated text strings LAYER: 1 This is the text string |~ ASSP Associated text property 3 & Entity sequence number 1 Number of associated text strings Z_LEVEL: 0 This is the text string |~ ASSP Associated text property 4 & Entity sequence number 1 Number of associated text strings PD_ZONE This is the text string |~ #~5 Assembly Hierarchy Entity ASSE Entity sequence number 5 Property count 1 * Pointer toPSTAT
1 * Pointer to part definition Top Drawing scale of part 1 X-Value of Offset Vector 0 Y-Value of Offset Vector 0 X-coordinate of reference point -30 Y-coordinate of reference point -30 Number of subparts 0 |~ #~6 & Part name. Top Start of Geometry Points section #~61 Point P & Entity sequence number 6 X-coordinate of point -25 Y-coordinate of point 0 |~ Point P & Entity sequence number 7 X-coordinate of point 25 Y-coordinate of point 0 |~ Start of Geometry Elements section #~62 Line LIN Entity sequence number 8 Color (white) 7 Line type (solid) 0 Line width 0 Display 0 Property count 3 * Pointer toASSP
2 * Pointer toASSP
3 * Pointer toASSP
4 * Pointer to begin point of line,P
6 * Pointer to end point of line,P
7 |~ #~71 #~72 ##~~
We have introduced some new notation in the comments to this example:
C programmers will realize that we have borrowed the C pointer notation.
Line 3 | This line is being pointed to. At the moment, we do not know which line or lines are pointing to this line. |
Line 8/13/18 | This line is being pointed to. |
Line 10/15/20 | Note that "associated text" is different from the text that you display on a drawing. For more information about layers and associated text refer to ME10 User's Guide. |
Line 24 | Not all entity sequence numbers are pointed to. The ASSE for
the top part is never pointed to. Example 3 will show that ASSE s
for subparts are pointed to by higher ASSE s.
|
Line 25 | This ASSE has only one property. That property can be found
by using the pointer that follows on the next line.
|
Line 26 | 1 is a pointer. The pointer is pointing to the entity whose
sequence number is 1 .
|
Line 27 | This line is a pointer to a part in a part definition. This
pointer differs from the pointer on the previous line in two ways:
|
Line 33 | The processor looks for a part definition for the top part
(the part definition begins with #~6; ), and a part
definition for each subpart. Since the number of subparts in this
example is zero, there will be only one part definition in this file.
|
Line 36 | The pointer on line 27 points here. |
Most of the pointers that we see will point backward to
entity sequence numbers. The only forward pointer is a
character pointer in the ASSE
. This points forward to a
part definition.
line
file. The following conventions are
used:
These conventions are used in all examples describing pointers for an MI file.
When we describe bubbles in the text, we use terms such as 5/ASSE
, and
8/LIN
. The meaning of these terms should be clear from the
following figure.
In Figure 3 you can see that entity 5/ASSE
contains a pointer
to 1/PSTAT
in the Simple Properties section, and a pointer to
the part definition for the part called Top
.
The part definition contains entities 8/LIN
, 6/P
, and
7/P
. Entity 8/LIN
contains pointers to 6/P
and 7/P
,
and 2/ASSP
, 3/ASSP
and 4/ASSP
(associated text property).
6/P
refers to the begin point of the line, (-25,0).
7/P
refers to the end point of the line, (-25,0).
Note that there is no pointer to 8/LIN
. We know that it is related to
the part called Top
because it appears in the part definition for
Top
. In later examples, we will see that it is possible for a geometry
element in a part definition to be pointed to.
The following figure shows how the geometry entities relate to the straight line:
This example shows an assembly consisting of a triangle called
tri
and two circles, cir1
and cir2
. The
part hierarchy is as follows:
tri_cir_assy [~1] [1:1] [*] cir_assy [~3] [1:1] cir2 [~5] [1:1] cir1 [~4] [1:1] tri [~2] [1:1]
This example shows how the hierarchical structure is stored in the MI file. Following our usual custom of keeping examples simple, we have used the minimum amount of geometry. A triangle is represented by three lines and three points. A circle is represented by only two points: the center point and a point on the circumference. The assembly is shown in the next figure.
You will notice that we have constructed the circles by placing each center on a vertex of the triangle, with the circumference point on another vertex. In this way, our figure consists only of three points! We want to show how these three points are stored in the MI file.
Some of the comments for this example need more than one line. This means that there are some blank lines to allow room for the comments. It is important to note that these blank lines do not appear in the actual file. Only the Setup section and some text entities contain blank lines.
#~41 PSTAT Part status property 1 Entity Sequence Number 0 0 |~ ASSP Associated text property 2 Entity Sequence Number 1 LAYER: 1 |~ ASSP Associated text property 3 Entity Sequence Number 1 Z_LEVEL: 0 |~ ASSP Associated text property 4 Entity Sequence Number 1 PD_ZONE |~ Associated text property #~5 ASSE Assembly Hierarchy Entity 5 Entity Sequence Number 1 1 * Pointer toPSTAT
cir2`~1 * Pointer to part definition 1 Drawing scale of part 0 X-Value of Offset Vector 0 Y-Value of Offset Vector -2.360679774997898 X-coordinate of reference point 7.639320225002102 Y-coordinate of reference point 0 Number of subordinateASSE
s |~ ASSE Assembly Hierarchy Entity 6 Entity Sequence Number 1 1 * Pointer toPSTAT
cir1`~2 * Pointer to part definition 1 Drawing scale of part 0 X-Value of Offset Vector 0 Y-Value of Offset Vector 7.639320225002102 X-coordinate of reference point -12.3606797749979 Y-coordinate of reference point 0 Number of subordinateASSE
s |~ ASSE Assembly Hierarchy Entity 7 Entity Sequence Number 1 1 * Pointer toPSTAT
cir_assy`~3 * Pointer to part definition 1 Drawing scale of part 0 X-Value of Offset Vector 0 Y-Value of Offset Vector -2.360679774997898 X-coordinate of reference point -12.3606797749979 Y-coordinate of reference point 2 Number of subordinateASSE
s 0 Attribute 1 0 Attribute 2 0 Attribute 3 3 Property Count 2 * Pointer toASSP
3 * Pointer toASSP
4 * Pointer toASSP
5 * Pointer to subordinateASSE
(cir2
) 1 Transformation Matrix (3x3) 0 0 0 1 0 0 0 1 5 Unique parts name/number 0 Attribute 1 0 Attribute 2 0 Attribute 3 3 Property Count 2 * Pointer toASSP
3 * Pointer toASSP
4 * Pointer toASSP
6 * Pointer to subordinateASSE
(cir1
) 1 Transformation Matrix (3x3) 0 0 0 1 0 0 0 1 4 Unique parts name/number |~ ASSE Assembly Hierarchy Entity 8 Entity Sequence Number 1 1 * Pointer toPSTAT
tri`~4 * Pointer to part definition 1 Drawing scale of part 0 X-Value of Offset Vector 0 Y-Value of Offset Vector 10 X-coordinate of reference point 10 Y-coordinate of reference point 0 Number of subordinateASSE
s |~ ASSE Assembly Hierarchy Entity 9 Nothing points to here 1 1 * Pointer toPSTAT
tri_cir_assy * Pointer to part definition 1 Drawing scale of part 0 X-Value of Offset Vector 0 Y-Value of Offset Vector 0 X-coordinate of reference point 0 Y-coordinate of reference point 2 Number of subordinateASSE
s 0 Attribute 1 0 Attribute 1 0 Attribute 1 3 Property Count 2 * Pointer toASSP
3 * Pointer toASSP
4 * Pointer toASSP
7 * Pointer to subordinateASSE
(cir_assy
) 1 Transformation Matrix (3x3) 0 0 0 1 0 0 0 1 3 Unique parts name/number 0 Attribute 1 0 Attribute 1 0 Attribute 1 3 Property Count 2 * Pointer toASSP
3 * Pointer toASSP
4 * Pointer toASSP
8 * Pointer to subordinateASSE
(tri
) 1 Transformation Matrix (3x3) 0 0 0 1 0 0 0 1 2 Unique parts name/number |~ #~6 The part definition forcir2
starts here and continues to the line before the next#~6
cir2`~1 & Part name #~61 Start-of-section marker for Geometry Points section P Point 10 Entity Sequence Number 20 30 |~ P Point 11 Entity Sequence Number 10 10 |~ #~62 Start-of-section marker for Geometry Elements section CIR Circle 12 Nothing points to here 7 Color (white) 0 Line type (solid) 0 Line width 0 Display 3 Property count 2 * Pointer toASSP
3 * Pointer toASSP
4 * Pointer toASSP
10 * Pointer to the center point forcir2
11 * Pointer to the circumference point forcir2
|~ #~71 #~72 #~6 The part definition forcir1
starts here and continues to the line before the next#~6
cir1 & #~61 P Point 13 & 30 10 |~ P Point 14 & 20 30 |~ #~62 Start-of-section marker for Geometry Elements section CIR Circle 15 Nothing points to here 7 Color (white) 0 Line type (solid) 0 Line width 0 Display 3 Property count 2 * Pointer toASSP
3 * Pointer toASSP
4 * Pointer toASSP
13 * Pointer to the center point forcir1
14 * Pointer to the circumference point forcir1
|~ #~71 #~72 #~6 The part definition forcir_assy
starts here and continues to the line before the next#~6
cir_assy`~3 & #~62 #~71 #~72 #~6 The part definition fortri
starts here and continues to the line before the next#~6
tri`~4 & #~61 P Point 16 & 20 30 |~ P Point 17 & 10 10 |~ P Point 18 & 30 10 |~ #~62 LIN Line 19 Nothing points to here 7 0 0 0 3 2 3 4 17 18 |~ LIN Line 20 Nothing points to here 7 0 0 0 3 2 3 4 18 16 |~ LIN Line 21 Nothing points to here 7 0 0 0 3 2 3 4 16 17 |~ #~71 #~72 #~6 The part definition fortri_cir_assy
starts here and continues to the line before the next#~6
tri_cir_assy & #~62 #~71 #~72 ##~~
tri_cir_assy
is shown in the next figure.
Note how we have shown the pointers to 1/PSTAT
and 2/ASSP
. We
use this method to prevent the entity tree from looking like a ball of
spaghetti. For 1/PSTAT
, the circle round the 5
means that
that 5/ASSE
points to 1/PSTAT
. For 2/ASSP
, there are
two sevens with circles. This means that there are two
pointers from 7/ASSE
to 2/ASSP
.
Entities 5
, 6
, and 8
do not have pointers to ASSP
.
The entities containing information about associated text for
entities 5
and 6
are pointed to by entity 7
, the parent
entity for 5
and 6
. The entity containing information about
associated text for entity 8
is pointed to by entity 9
, the
parent for entity 6
.
At the start of this example, we said that tri_cir_assy
consists only of three points. You may have noticed from the MI
file or the entity tree that there are seven point entities
in the MI file.
Points 10/P
and 11/P
are stored in the part definition for
cir2
. Points 13/P
and 14/P
are stored in the part definition
for cir1
. 16/P
, 17/P
, and 18/P
are stored in the
part definition for tri
.
In fact 10/P
, 14/P
, and 16/P
all represent the same point,
(20,30). 11/P
, and 17/P
represent the same point (10,10). 13/P
,
and 18/P
represent the same point (30,10).
Before we explain the logic behind the storing of points, let's
smash all the subparts in tri_cir_assy
(see
ME10 User's Guide for more details on smashing the
subparts of an assembly). This means that the three separate
parts tri
, cir1
, and cir2
are merged into the
previously empty part called tri_cir_assy
. The empty part
cir_assy
no longer exists. The new tree structure is only one
line, as follows:
[*] tri_cir_assy
Here is the MI file:
#~6 tri_cir_assy & #~61 P Point 6 & 20 30 |~ P Point 7 & 10 10 |~ P Point 8 & 30 10 |~ #~62 LIN Line 9 7 0 0 0 3 2 3 4 6 * Pointer toP
7 * Pointer toP
|~ LIN Line 10 7 0 0 0 3 2 3 4 8 * Pointer toP
6 * Pointer toP
|~ LIN Line 11 7 0 0 0 3 2 3 4 7 * Pointer toP
8 * Pointer toP
|~ CIR Circle 12 7 0 0 0 3 2 3 4 6 * Pointer to the center point (P
) 7 * Pointer to the circumference point (P
) |~ CIR Circle 13 7 0 0 0 3 2 3 4 8 * Pointer to the center point (P
) 6 * Pointer to the circumference point(P
) |~ #~71 #~72 ##~~
You can see that we still have two CIR
entities and three
LIN
entities. But now we only have three P
entities.
From these two files for tri_cir_assy
, it may be clear what
is happening.
All points associated with a part are stored in the
part definition for that part. For example, the part definition for
cir1
contains only the points (30,10) and (20,30). The point
(10,10) does not appear, because this point is only used by tri
.
tri_cir_assy
, the point (20,30) appears only once. But this
point is used once by the triangle and once by each of the two
circles.
tri_cir_assy
, the point
(20,30) appears in the part definitions for tri
, cir1
,
and cir2
.
We use entities in MI files to save space. If information is contained in one entity, several other entities can point to this entity.
In the examples for tri_cir_assy
, we saw several examples of
space saving. In the case of geometry, we saw that several
elements can share one point.
For properties, there is a much
greater space saving. Each ASSE
needs the scaling and
geometry information contained in a PSTAT
entity. If this
information were stored with each ASSE
, the same information
would appear five times in the MI file, rather than once. Of
course, it is possible that the PSTAT
information is not the
same for each ASSE
. In this case, more than one PSTAT
entity would be required. However, there is still likely to be a
saving in space, especially with a complex file.
With ASSP
, we have used a single entity to store information
that would need to be stored nine times if information were
stored with each ASSE
.
This example uses one straight line and one dimension, as shown in the next figure. Although the figure is simple, the dimension is complex. This allows us to show many of the MI features. In this example, we will see some valid pointers pointing to valid entities, but these entities are not used by ME10.
In all our discussions on dimensions, we use the terminology explained in ME10 User's Guide.
#~41 DTA Dimension text attributes 1 & 8 Parameter count hp_i3098_v Primary text font name hp_symbols Secondary text font name 0 Character slant angle 0 Size flag 3 Character height 1 Character height/ratio 3 Text color code (3
=yellow, default) 0 Bracket flag |~ DTF Dimension text format 2 & 4 Parameter count 5 Decimal inch (with unit abbreviation = ") 2 Sign and zero suppression code (leading zeros suppressed) 3 Fractional resolution (number of digits after decimal point) 0 Radix marker |~ DTF Dimension text format 3 & 4 1 1 2 0 |~ DAF Dimension arrow format 4 & 5 Parameter count 1 Arrowhead type code (1
= closed triangular arrowhead) 0 Arrowhead no fill flag (0
= fill) 1 Arrowhead relative size flag 1 Arrowhead relative length parameter 0.26 Arrowhead width parameter (0.26
is ME10 default) |~ DDA Dimension display attribute 5 & 1 Parameter count 0 Display (0
= displayed, default) |~ DLA Dimension line attributes 6 & 10 Parameter count 2 Dimension text relative position code (2
= on dimension line) 0 Dimension text relative orientation code (0
= parallel) 0 Offset point. Gap between end of extension line andgeometry point 2 Arrow gap. Gap between arrow and dimension line 2 Gap between dimension text box side and dimension line 2 Gap between dimension text box end and dimension line 2 Arrow line offset 3 Dimension line color code (3
= yellow) 0 Dimension line width 1 Connect flag |~ PSTAT Part Status Property 7 & 0 0 |~ ASSP Associated text property 8 & 1 LAYER: 1 |~ ASSP Associated text property 9 & 1 Z_LEVEL: 0 |~ ASSP Associated text property 10 & 1 PD_ZONE |~ #~42 Start-of-section marker for Composite Properties DTV Dimension tolerance value 11 & 7 Parameter count 0.01968503937007874 Upper tolerance value -0.003937007874015749 Lower tolerance value 3 Tolerance valid and edited code (3
= lower and uppertolerances are valid 2.382 Upper tolerance text 2.358 Lower tolerance text 2 * Pointer toDTF
(This data is used) 1 * Pointer toDTA
(This data is used) |~ DTV Dimension tolerance value 12 & 7 0.5 -0.1 3 60.5 59.9 3 * Pointer toDTF
(This data is used) 1 * Pointer toDTA
(This data is used) |~ #~5 ASSE Assembly Hierarchy Entity 13 1 7 Top 1 0 0 0 0 0 |~ #~6 Top & #~61 P Point 14 & 0 0 |~ P Point 15 & 60 0 |~ #~62 LIN Line 16 & 7 0 0 0 3 8 * Pointer toASSP
9 * Pointer toASSP
10 * Pointer toASSP
14 * Pointer toP
15 * Pointer toP
|~ #~71 Start-of-section marker for annotation elements BAL Balloon 17 & 3 Color (3
= yellow) 1 Line type (1
= dash) 0 Line width 0 Display 0 Property count 6.873737972188675 X-coordinate of upper left corner of imaginary box 30.425 Y-coordinate of upper left corner of imaginary box 6.873737972188675 X-coordinate of lower left corner of imaginary box 9.574999999999999 Y-coordinate of lower left corner of imaginary box 53.12626202781132 X-coordinate of lower right corner of imaginary box 9.574999999999999 Y-coordinate of lower right corner of imaginary box 53.12626202781132 X-coordinate of upper right corner of imaginary box 30.425 Y-coordinate of upper right corner of imaginary box 2 Box type (balloon) 10.425 Blend radius |~ #~72 Start-of-section marker for Composite Annotation DSGL Single dimension entity 18 3 Property count 8 * Pointer toASSP
9 * Pointer toASSP
10 * Pointer toASSP
16 * Pointer toLIN
14 * Pointer toP
16 * Pointer toLIN
15 * Pointer toP
0 Dimension line reference orientation code 0 * Pointer to reference line entity 0 Inclination angle 30 X-coordinate of dimension text imaginary box 20 Y-coordinate of dimension text imaginary box 46.25252405562265 Length vector for dimension text box 0 Length vector for dimension text box 0 Height vector for dimension text box 20.85 Height vector for dimension text box 0 Dimension text box displacement vector 0 Dimension text box displacement vector 0 Dimension text box relative angle 5 * Pointer toDDA
17 * Pointer toBAL
3 * Pointer toDTF
(This data is not used) 1 * Pointer toDTA
(This data is not used) 60 Main dimension value 60 Main dimension text (Not displayed for limit dimensioning) 0 Relative X-coordinate of main text box 0 Relative Y-coordinate of main text box 0 Edit flag for main text (0=text not edited) 3 Main dimension tolerance code (3
= limit) 12 * Pointer toDTV
-5.5875 Relative X-coordinate of the text box for the main upper tolerance 6 Relative Y-coordinate of the text box for the main upper tolerance -5.5875 Relative X-coordinate of the text box for the main lower tolerance 1.5 Relative Y-coordinate of the text box for the main lower tolerance 1 Second dimension flag (1=dual dimensioning) 2 * Pointer toDTF
(This data is not used) 1 * Pointer toDTA
(This data is not used) 60 Secondary dimension value 2.362 Secondary dimension text (Not displayed for limit dimensioning) 0 Relative X-coordinate of secondary text box 0 Relative Y-coordinate of secondary text box 0 Edit flag for secondary text (0=text not edited) 3 Secondary dimension tolerance code (3
= limit) 11 * Pointer toDTV
-6.9375 Relative X-coordinate of secondary upper tolerance text -4.5 Relative Y-coordinate of secondary upper tolerance text -6.9375 Relative X-coordinate of secondary lower tolerance text -9 Relative Y-coordinate of secondary lower tolerance text 2 Dimension arrow count 0 Arrow position mode count (0
= arrows outside dimension lines) 1 Draw/Nodraw 4 * Pointer toDAF
-30 Relative X-coordinate of dimension arrow 0 Relative Y-coordinate of dimension arrow 0 Arrow orientation angle 1 Draw/Nodraw 4 * Pointer toDAF
30 Relative X-coordinate of dimension arrow 0 Relative Y-coordinate of dimension arrow 3.141592653589793 pi 6 * Pointer toDLA
2 Dimension line count 25.12626202781132 X-coordinate of line begin point 0 Y-coordinate of line begin point 30 X-coordinate of line end point 0 Y-coordinate of line end point -30 X-coordinate of line begin point 0 Y-coordinate of line begin point -25.12626202781133 X-coordinate of line end point 0 Y-coordinate of line end point 2 Extension line count 0 Extension line angle 30 X-coordinate of extension line begin point -20 Y-coordinate of extension line begin point 30 X-coordinate of extension line end point 2 Y-coordinate of extension line end point -30 X-coordinate of extension line begin point -20 Y-coordinate of extension line begin point -30 X-coordinate of extension line end point 2 Y-coordinate of extension line end point 1 Extra dimension line count -6.9375 X-coordinate of line begin point 0 Y-coordinate of line begin point 3.9375 X-coordinate of line end point 0 X-coordinate of line end point 0 Dimension arc count 0 Extra text string count 1 Dimension prefix string count PRE Prefix text string -16.5375 X-coordinate of prefix text imaginary box -1.5 Y-coordinate of prefix text imaginary box 1 * Pointer toDTA
1 Dimension postfix string count POST Postfix text string 5.4375 X-coordinate of postfix text imaginary box -1.5 Y-coordinate of postfix text imaginary box 1 * Pointer toDTA
0 Dimension superfix string count 0 Dimension subfix string count |~ ##~~
The entity tree for the dimensioned line is shown in the next figure. The assembly hierarchy is not shown.
In the tree, we have shown entity 1/DTA
three times. This is to
indicate that the same entity has been used to describe the
appearance of the main dimension text, the secondary dimension text
and also the prefix and postfix text.
DSGL
points to:
12/DTV
).
11/DTV
).
1/DTA
and 3/DTF
).
1/DTA
and 2/DTF
).
In turn, 11/DTV
points to two entities describing the text for
the secondary tolerance (1/DTA
and 2/DTF
).
12/DTV
points to two entities describing the text for the
main tolerance (1/DTA
and 3/DTF
).
Note that there are two pointers to 16/LIN
. This is the first
time that we have seen pointers to LIN
. Normally, LIN
is
contained within a part definition and no pointers are required.
In this example, pointers to LIN
are used to indicate which
lines are being dimensioned. Look at the entity definition for
DSGL
in Composite Annotation Section (#~72). You can see that the MI file must
contain:
In our case, the first geometry element is 16/LIN
and the
first geometry point is 14/P
.
The second geometry element is also 16/LIN
, because we are
dimensioning a single line, rather than dimensioning between two
lines. Our second geometry point, 15/P
, is simply a point at
the other end of the line.
The pointers from 18/DSGL
to 1/DTA
, 2/DTF
, and 3/DTF
are shown on dashed lines. This is because these pointers are
not used in this type of dimension. Let's explain this:
18/DSGL
to 1/DTA
and 2/DTF
is to describe the appearance of the secondary dimension text.
11/DTV
to 1/DTA
and 2/DTF
is to describe the appearance of the secondary tolerance text.
60.5
and 2.382
are considered to be
tolerances, not dimensions. Since there is no dimension text, the
pointers from 18/DSGL
appear in the MI file, but they are not used.
A similar explanation applies to the pointers from 18/DSGL
to
1/DTA
and 3/DTF
The next figure shows our drawing. As usual, we keep geometry to a minimum by using circles. The outer contour is a circle. There are three inner contours: a circle, a dimension, and text.
The MI file is shown here. The assembly hierarchy is not shown.
The only lowest-level entity to be shown is 7/HAPP
, because
we have not seen this entity previously.
#~41 . . . |~ Hatch pattern property HAPP & Entity sequence number 7 Block count 1 Normalized offset 0 Hatch distance factor 1 Hatch offset angle 0 Hatch line color (7
= white) 7 Hatch line type (0
= solid 0 |~ . . . #~62 Circle CIR & 17 7 0 0 0 3 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
10 * Pointer to circle center point 13 * Pointer to circumference point 12 |~ Circle CIR & 18 7 0 0 0 3 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
10 * Pointer to circle center point 15 * Pointer to circumference point 14 |~ #~63 Composite curve COC & 20 Color (white) 7 Line type (solid) 0 Line width 0 Display 0 Property count 3 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
10 Closed flag) 1 Z-value of curve 0 Pointer count 1 * Pointer toCIR
17 |~ Composite curve COC & 21 7 0 0 0 3 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
10 1 0 1 * Pointer toCIR
18 |~ #~71 Hatch HAT & 22 Line color (white) 7 Line type (solid) 0 Line width 0 Display 0 Property count 1 * Pointer toHAPP
7 X-coordinate of reference point 0 Y-coordinate of reference point 0 Hatch line angle 0.7853981633974483 Hatch line distance 3 |~ Composite Annotation section #~72 Text block TEX & 23 Color (white) 7 Line type (solid) 0 Line width 0 Display 0 Property count 3 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
10 Text adjust position 2 Transformation matrix 1.
0.
0.
0.
1.
-20.
0.
0.
1 Text font index 0 * Pointer to user-defined font entity (null) 0 Text font name hp_i3098_v * Pointer toBAL
(null) 0 Leader arrow count 0 Character width 3.5 Character height 3.5 Text slant 0 Line distance factor 2.2 Character fill flag (0
= unfilled) 0 String count 1 First string SECTION A Underline flag (0
= not underlined) 0 |~ Radius dimension entity DRAD & 24 Property count 3 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
10 * Pointer toCIR
17 Dimension line flag (1=dimension line 1 is drawn) X-coordinate of imaginary box for 14.6978155339806 dimension text Y-coordinate of imaginary box for 4.88592233009709 dimension text X-coordinate of length vector of imaginary 8.967497629537899 box for dimension text Y-coordinate of length vector of imaginary 2.981021010364095 box for dimension text X-coordinate of height vector of imaginary -1.104081855690406 box for dimension text Y-coordinate of height vector of imaginary 3.32129541834737 box for dimension text X-coordinate of delta vector of imaginary 0 box for dimension text Y-coordinate of delta vector of imaginary 0 box for dimension text Delta angle of imaginary box for dimension 0 text * Pointer toDDA
4 * Pointer toBAL
(null) 0 * Pointer toDTF
2 * Pointer toDTA
1 Main dimension value 30 Main text value 30 Relative X-coordinate of main text box 0.05384661509309691 Relative Y-coordinate of main text box -1.826259987527246 Edit text flag (0
= text not edited) 0 Main dimension tolerance code 0 (0
= no tolerance) Second dimension flag 0 (0
= single dimension) Dimension arrow count 1 Arrow position mode code 0 Draw/Nodraw flag (1
= arrow is drawn) 1 * Pointer toDAF
3 X-coordinate of dimension arrow 13.77043090899686 Y-coordinate of dimension arrow 4.57763643296353 Arrow orientation angle 3.462525546680513 * Pointer toDLA
5 Dimension line count 2 X-coordinate of line begin point -14.6978155339806 Y-coordinate of line begin point -4.88592233009709 X-coordinate of line end point -6.381631910967444 Y-coordinate of line end point -2.121414422719421 X-coordinate of line begin point 6.381631910967448 Y-coordinate of line begin point 2.121414422719422 X-coordinate of line end point 13.77043090899686 Y-coordinate of line end point 4.57763643296353 Extension line count 0 Extra dimension line count 0 Dimension arc count 0 Extra text string count 0 Dimension prefix string count 1 Prefix text string R X-coordinate of prefix text box -3.931707886923747 Y-coordinate of prefix text box -3.151158214355733 * Pointer toDTA
1 Dimension postfix string count 0 Dimension superfix string count 0 Dimension subfix string count 0 |~ Faces section #~81 Planar face PFA Nothing points to here 25 Property count 3 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
10 * Pointer toHAT
22 * Pointer toCOC
20 Number of inner contours 3 * Pointer toDRAD
24 * Pointer toTEX
23 * Pointer toCOC
21 |~ ##~~
Note that there are several null pointers in this file. The MI format demands that these fields contain pointers, but the pointers need not point to anything.
The entity tree for automatic hatching is shown in the next figure:
Automatic hatching is controlled by the Faces entity, 25/PFA
.
25/PFA
points to an outer contour, three inner contours, and
a hatch entity (22/HAT
).
The next figure shows how these entities relate to the actual drawing:
Our drawing for manual hatching is shown in the next figure:
The MI file is shown here, without the assembly hierarchy. All pointers are shown, but the lowest entities are not shown.
#~62 PLN Polyline 13 & 7 Color (white) 0 Line type (solid) 0 Line width 0 Display 3 Property count 3 * Pointer toASSP
4 * Pointer toASSP
5 * Pointer toASSP
1 Hatch flag (1
= polyline used for hatching) 4 Number of points in polyline 9 Pointer to first point of polyline 1 Pen up flag (1
= pen is up) 10 Pointer to second point of polyline 1 Pen up flag 11 Pointer to second point of polyline 1 Pen up flag 9 Pointer to second point of polyline 1 Pen up flag |~ PLN Polyline 14 & 7 0 0 0 3 Property count 3 * Pointer toASSP
4 * Pointer toASSP
5 * Pointer toASSP
1 4 7 * Pointer toP
1 8 * Pointer toP
1 12 * Pointer toP
1 7 * Pointer toP
1 |~ #~63 COC Composite curve 15 & 7 Color (white) 0 Line type (solid) 0 Line width 0 Display 3 Property count 3 * Pointer toASSP
4 * Pointer toASSP
5 * Pointer toASSP
1 Closed flag) 0 Z-value 1 Number of pointers 13 * Pointer toPLN
|~ COC Composite curve 16 & 7 0 0 0 3 3 * Pointer toASSP
4 * Pointer toASSP
5 * Pointer toASSP
1 0 1 14 * Pointer toPLN
|~ #~71 HAT Hatch 17 & 7 0 0 0 1 2 * Pointer toHAPP
0 0 0.7853981633974483 3 |~ #~72 #~81 Faces section PFA Planar face 18 Nothing points to here 3 3 * Pointer toASSP
4 * Pointer toASSP
5 * Pointer toASSP
17 * Pointer toHAT
16 Pointer to outer contour (COC
) 1 Number of inner contours 15 Pointer to inner contour (COC
) |~ ##~~
The entity tree for manual hatching is shown in the next figure:
The next figure shows the drawing we use for our example.
The best way to explain what this figure contains is to describe how to create it:
We refer to the circle on the left as the real circle, and the circle on the right as the virtual circle. When we examine the MI file, you will see why we are entitled to use this convenient terminology.
We have included a dimension to show how MI handles a dimension between a real part and a virtual part.
Here is the MI file. The assembly hierarchy is shown, but the lowest level entities are not shown. (Numbers 1 ... n are identifiers.)
#~5 ASSE Assembly Hierarchy Entity 10 & 1 6 * Pointer toPSTAT
cir1`~S`~1 * Pointer to Part Definition 1 Drawing scale of part 0 X-Value of Offset Vector 0 Y-Value of Offset Vector -10 -10 0 Number of subordinateASSE
s |~ ASSE Assembly Hierarchy Entity 11 1 6 * Pointer toPSTAT
cir_assy 1 0 0 0 0 2 <lineno id=noasse> Number of subordinateASSE
s 0 <lineno id=offset1> Virtual offset 0 0 3 7 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
10 <lineno id=ptrasse1> * Pointer to subordinateASSE
1 <lineno id=vtlcrcbn> Transformation matrix for the virtual circle 0.
30.
0.
1.
0.
0.
0.
1 <lineno id=vtlcrcend>.
3 Unique partname 3 <lineno id=offset2> Virtual offset 0 0 3 7 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
10 <lineno id=ptrasse2> * Pointer to subordinateASSE
1 <lineno id=realcrcbn> Transformation matrix for the real circle 0.
0.
0.
1.
0.
0.
0.
1 <lineno id=realcrcend>.
2 Unique partname |~ #~6 Part name cir1`~S`~1 <lineno id=sharedname> & #~61 P Point 12 & 0 0 |~ P Point 13 & 10 0 |~ #~62 CIR Circle 14 7 0 0 0 3 7 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
12 * Pointer to circle center point 13 > * Pointer to circle circumference point |~ #~71 #~72 #~6 cir_assy & #~62 #~71 #~72 DSGL Single dimension entity 18 & 3 7 * Pointer toASSP
8 * Pointer toASSP
9 * Pointer toASSP
17 <lineno id=virtelem> * Virtual pointer to first geometry element (CIR
) 15 <lineno id=virtpnt> * Virtual pointer to first geometry point (P
) 14 * Pointer to second geometry element (CIR
) 12 * Pointer to second geometry point (P
) 0 0 * Pointer to reference line entity 0 15 15 5.25 0 0 3.5 0 0 0 4 * Pointer toDDA
0 * Pointer toBAL
2 * Pointer toDTF
1 * Pointer toDTA
30 30 -2.625 -1.75 0 0 0 2 0 1 3 * Pointer toDAF
-15 0 0 1 3 * Pointer toDAF
15 0 3.141592653589793 5 * Pointer toDLA
2 4.625 0 15 0 -15 0 -4.625 0 2 0 15 -15 15 2 -15 -15 -15 2 0 0 0 0 0 0 0 |~ ##~~
Here are some additional comments on the previous MI file:
Lines 25 and 43 | The virtual offset is discussed when we look at the entity tree for the shared parts. |
Line 24 | The number of subordinate ASSE s is 2 ,
which is what we would expect. After all, there are two
circles in the assembly.
|
Lines 32 and 50 | The pointers to
subordinate ASSE s are both pointing to the same entity,
10/ASSE .
|
Line 63 | The naming of shared parts is discussed in Part Name Section (#~6). |
Line 103 | This is referred to as a virtual pointer,
because the entity 17 does not exist: it is a
virtual entity.
|
Line 105 | Another pointer to a virtual entity. |
The entity tree for the shared parts is shown in the next figure.
The following entities are not shown in this figure: 1/DTA
,
2/DTF
, 3/DAF
, 4/DDA
, 5/DLA
, 6/PSTAT
, 7/ASSP
,
8/ASSP
, 9/ASSP
and 10/ASSE
.
You can see that 11/ASSE
has two pointers to subordinate
ASSEs. In this case, only one entity is being pointed to:
10/ASSE
. In turn, 10/ASSE
points to a single part
definition, so the geometry is stored once only. For the
location of the geometry on the screen, the transformation
matrices are used.
The transformation matrix for the real circle is shown in lines
51 through 59 in the
previous file. You can see that this is a unity matrix, so the
real circle is located exactly by the points 12/P
and 13/P
.
(Transformation matrices are discussed later in chapter 2.)
The transformation matrix for the virtual circle is shown in
lines 33 through 41
in the previous file. Without doing any complex calculations, you can
see that the value 30
appears in the transformation matrix. This
means that the virtual circle will be located 30 mm to the right of the
real circle.
Now let's talk about how MI handles a dimension between a real part and a virtual part.
From the MI tree, you can see that the dimension entity, 18/DSGL
,
points to a real geometry element, 14/CIR
, and a real geometry point,
12/P
. There are also two virtual pointers to entities 17
and 15
. We use the term virtual pointers because, as you can
see from the MI file, there are no entities 17
or 15
!
Here is what happens. Look at line 43 in the MI file, and
you will see that there is a virtual offset of 3. ME10
knows that there are no entities 16
or 17
. When the
pointer to entity 16
is seen, ME10 subtracts the value
of the virtual offset, 3
. This gives a value of 13
, which
is a pointer to 13/P
. Similarly, by subtracting 3
from
17
, we get the pointer to the geometry element 14/CIR
.
This explains the bubbles 17-3
and 16-3
in the entity
tree, and the dashed lines showing the virtual pointers.
Remember that the geometry of shared parts is stored only once. This is one of the advantages of shared parts: space is saved in the MI file. We can see immediately that if the geometry is stored only once, then any change to the geometry causes all the other shared parts to be changed simultaneously. It is also clear that if you want to modify or delete a shared part independently of the other shared parts, you must first UNSHARE the required part.
Although the geometry is stored only once, there is a "gap" in
the MI file equal to the length of the stored geometry. The
geometry consists of three entities, 12/P
, 13/P
, and
14/CIR
. So three entity sequence numbers are missing in the
file: 15
, 16
, and 17
. Note that there is no
physical gap in the file: only the entities are missing.
So the virtual offset for the virtual circle is 3
.
If there were a third shared circle, there would be a
further three missing entities in the file. The virtual offset of
this virtual circle would be 6
. The entity sequence number of
the DSGL
entity would then be 21
.
The real circle has a virtual offset of 0
, as you can see
from line 25 in the file.
At this point, it may be clear why we have used the terms real
and virtual circles in this discussion. For the first circle we
drew (the left circle), the transformation matrix is unity. This
means that the geometry described by 12/P
and 13/P
is not
rotated or translated. In other words, 12/P
and 13/P
exactly describe the circle. We are entitled to call the left
circle a real circle.
The circle on the right has no geometry (remember that there are three missing entities in the file). To locate this circle on your ME10 screen, the geometry of the real part must be rotated and translated using the transformation matrix. So we use the term virtual circle.
The terms real and virtual are very convenient when discussing MI files. For the ME10 user, there is no need to distinguish between real and virtual parts. As far as the user is concerned, all parts are real, and no confusion can occur.