Command: validate

Syntax

validate <level> {, <elist> ... }

Description

Validate graphic entities.

Parameters

Switches

Notes

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.invalidity

2

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.

Examples

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

See Also

Commands:

polygon

Identifiers:

polygon_validation (numeric)

Structures:

entity.valid, entity.invalidity