validate <level> {, <elist> ... }
Validate graphic entities.
<level>
The level of validation to be performed. This is a numeric value with the required
validation check level. For non-polygons, a value of 1 is sufficient. For polygons,
a level of 1,2 or 3 is permitted
(see polygon_validation
for an explanation).
<elist>
A group/entity list defining which entities are to be validated. If omitted, the current contents
of the these group are shifted.
-a
Combined with the -of switch, use append
mode to add to an existing text file.
-c
Combined with the -of switch, if <file>
exists, prompt for confirmation before it is replaced.
-ef=<filter>
A filter to be applied to all entities within <elist>,
further qualifying which entities are to be validated. If omitted, the filter
current_filter is used.
-of=<file>
Output polygon error information to a text file. If any polygons are found
to be invalid, related invalidity information is output.
Typically, entity validation is performed whenever new entities are added, or when existing entities are modified. However it is sometimes a requirement to re-validate existing entities without having to recreate them. This command does that.
The entity attributes entity.valid and entity.invalidity are set for all entities processed by this command.
When the -of switch is present, invalid polygon information
is dumped as a series of invalidities, 1 per line.
Each invalidity comprises 8 items separated by | characters.
Item
Data Type
Description
1
numeric
The type of invalidity. One of the following:
0 - point coplanarity error,
1 - sliver,
2 - coincident points,
4 - edge crossover,
8 - edge overlap,
16 - hole/parent edge crossover,
32 - hole/parent edge overlap
see entity.invalidity2
point
The point at which the invailidity/error occurred.
3
string
The name (or ue handle) of the entity with the invalidity.
4
numeric
The start vertex of the invalid edge within the entity (Item 3).
Vertex numbering starts at 1.5
numeric
The finish vertex of the invalid edge within the entity (Item 3)
or 0 if the invalidity refers to a point rather than an edge.
Vertex numbering starts at 1.6
string
The name (or ue handle) of another entity which may be part of the invalidity,
e.g. a hole polygon. This may be the same value as Item 3, or empty.7
numeric
The start vertex of the invalid edge within the entity (Item 6),
or 0 if it does not apply.8
numeric
The finish vertex of the invalid edge within the entity (Item 6),
or 0 if it does not apply.
Validate all entities in the these group.
validate 1
Validate all polygons with a validation level of 3.
validate 3,polygon_filter
Validate a polygon and direct error output to a file.
For the purposes of this example, the polygon is intentionally invalid.
entity myent = polygon { (0,0), (100,100), (100,0), (0,100), (100,100), } string fnam = "c:/temp/valdata.txt" validate 3,pn,-of=fnam type fnam
This produces the following file:
4|(50,50,0)|myent|1|2|myent|3|4
2|(100,100,0)|myent|2|0|myent|5|0
1|(0,0,0)|myent|1|0||0|0
Commands: |
|
Identifiers: |
polygon_validation (numeric) |
Structures: |