Extended Command Line Entity Specification

In addition to basic entity specification, entities may be specified using an extended expression. An extended expression identifies one or more entities using a set of entity criteria. These criteria describe properties of the entities one wishes to operate upon.

Extended Parsing Syntax

The most common type of extended parsing expression is in the following format:

{Entity_Type} With {Criteria}

Entity_Type is the name of any type of entity that can be used in a command, such as Curve, Hex, or SideSet. Criteria is a combination of entity properties (such as Length), operators (such as >=), keywords (such as Not), and values (such as 5.3) that can be evaluated to true or false for a given entity. Here are some examples:

curve with length <1

surface with is_meshed = false

node with x_coord > 10 And y_coord > 0

Keywords

These are the keyword defined by extended parsing

Keyword

Description

All, To, Step, By, Except, In, Common_To, Expand, Include

These keywords are used the same way as in basic entity specification. For example:

draw surface all

draw surface 1 to 5 step 2 curve 1 to 3 in body 4 to 8 by 2

draw hex in face in surface 2

draw face common_to volume 1 2

draw node in hex in face in surface 2 curve 1 2 5 to 50 except 2 3 4

draw volume 10 include similar

Not

Not flips the logical sense of an expression - it changes true to false and false to true. For example:

draw surface with not is_meshed

Of

The "of" operator is used to get an attribute value for a single entity, such as "length of curve 5". Only attributes that return a single numeric value may be used in an "of" expression. There must be only one entity specified after the "of" operator, but it can be identified using any valid entity expression. An example of a complete command which includes the "of" operator is:

list curve with length < length of curve 5 ids

And, Or

These logic operators determine how multiple criteria are combined.

draw surface with length > 3 or with is_meshed = false

< > <= >= = <>

These relational operators compare two expressions. You may use = or == for "equals". <> means "not equal". For example:

draw surface with x_max <= 3

draw volume with z_max <>12.3

+   -   *   /

These arithmetic operators work in the traditional manner.

draw surface with length * 3 + 1.2 > 10

( )

Parentheses are used to group expressions and to override precedence. When in doubt about precedence, use parentheses.

draw surface with length > 3 and ( with is_meshed = false or x_min > 1 )

Functions

The following functions are defined. Not all functions apply to all entities. If a function does not apply to a given entity, the function returns 0 or false.

Keyword Description
ID

the ID of an entity

Length

The length of a curve or edge

Area

The area of a surface.

Volume

The volume of a volume.

Exterior_Angle

Works for curves with an exterior angle greater than (>), less than (<), or equal to (=) a given angle in degrees. This is used if you want to do some operation, such as refinement, on all the reentrant curves or curves with surfaces that form a certain angle.

Radius

Radius of an arc or blend surface.

Is_Meshed

Whether a geometric entity has been meshed or not

Is_Spline

Whether a geometric entity is defined using a NURBS representation. Otherwise the entity has an analytic representation.

Is_Blend

Whether a geometric surface is a blend. Blends have a constant principal radius of curvature and meet two or more adjoining surfaces at an angle of approximately 180 degrees. "Fillets" are examples of blend surfaces.

Is_Chamfer

Whether a geometric surface is a chamfer. Chamfers are thin surfaces bounded by surfaces where the exterior angle is approximately 45 or 225 degrees.

Is_Plane

Whether a geometric surface is planar.

Is_Periodic

Whether a geometric surface is periodic, such as a sphere or torus.

Is_Sheetbody

A geometric entity is a sheetbody if it is a collection of surfaces that do not form a solid.

Element_Count

The number of elements owned by this geometric entity. Only elements of the same dimension as the entity are counted (number of hexes in a volume, number of faces on a surface, etc.)

Dimension

The topological dimension of an entity (3 for volumes, 2 for surfaces, etc.).

X_Coord, Y_Coord, Z_Coord

The x, y, or z coordinate of the point at the center of the entity's bounding box.

X_Min, Y_Min, Z_Min

The x, y, or z coordinate of the minimum extent of the entity's bounding box

X_Max, Y_Max, Z_Max

The x, y, or z coordinate of the maximum extent of the entity's bounding box

Is_Merged

Whether a geometry entity has a merge flag on. All geometric entities have one set by default.

Is_Virtual

A flag that specifies whether an entity is virtual geometry. An entity is virtual if it has at least one virtual (partition/composite) topology bridge.

Has_Virtual

An entity "has_virtual" if it is virtual itself, or has at least one child virtual entity

Is_Real

An entity "is_real" if it has at least one real (non-virtual) topology bridge.

Num_Parents

Used to specify geometry entities with a specified number of parent entities. May be used to find "free curves" where num_parents=0 or non-manifold curves where num_parents>2.

Is_Free

Used to specify geometry entities without parent entities. May be used to find free curves and vertices where num_parents=0 or free surfaces that do not form a solid (sheet bodies).

Block_Assigned

Used to specify elements which have been assigned to a block. This is also useful to find elements NOT assigned to a block by using "not block_assigned".

Has_Scheme

Used to specify geometry entities which have been assigned a specified scheme. The scheme name is specified with the keyword string used when setting the scheme. Wildcards can also be used when specifying the scheme name. For example, draw surface with has_scheme '*map' will draw surfaces with scheme map or submap.

Similar

Used with the include keyword. Compares a list of geometry entities and adds additional entities that are classified as similar. Implemented for curves, surfaces and volumes. Similar is defined as the same geometric length, area or volume using a tolerance of 0.1 percent, as well as the same number of child entities. For example, "draw volume 10 include similar" will draw all volumes with the same geometric volume and number child surfaces as volume 10.

Cavity

Used with the include keyword. Compares a list of surface entities and adds additional adjacent surfaces that are part of the same cavity. Implemented only for surfaces. A cavity is defined as the collection of surfaces bounded by curves where the exterior angle is greater than 180 degrees. For example, "draw surface 10 include cavity" will draw surface 10 along with the cavity to which it belongs.

Hole

Used with the include keyword. Compares a list of surface entities and adds additional adjacent surfaces that are part of the same hole. Implemented only for surfaces. A hole is a special case of a cavity that includes at least one cylindrical surface. For example, "draw surface 10 include hole" will draw surface 10 along with the hole to which it belongs.

Blend_Chain

Used with the include keyword. Compares a list of surface entities and adds additional adjacent surfaces that are part of the blend_chain. Implemented only for surfaces. A blend_chain is defined as the collection of attached surfaces that have the same minimum radius of curvature. For example, "draw surface 10 include blend_chain" will draw surface 10 along with the blend_chain to which it belongs.

Chamfer_Chain

Used with the include keyword. Compares a list of surface entities and adds additional adjacent surfaces that are part of the chamfer_chain. Implemented only for surfaces. A chamfer_chain is defined as the collection of attached surfaces that have the same width and are bounded by exterior angles of 135 and/or 225 degrees. For example, "draw surface 10 include chamfer_chain" will draw surface 10 along with the chamfer_chain to which it belongs.

Continuous

Used with the include keyword. Compares a list of curve or surface entities and adds additional adjacent entities that are continuous. Implemented for curves and surfaces. For surfaces, continuous is defined as the collection of attached surfaces that are bounded by curves where the exterior angle is approximately 180 degress (tolerance = 15 degrees). For curves, continuous is defined as the collection of attached curves that are bounded by vertices where the angle is approximately 180 degrees (tolerance = 15 degrees). For example, "draw surface 10 include continuous" will draw surface 10 along with other surfaces within the same continuous collection.

Nearby

Used with the include keyword. It will include additional geometry entities of the same dimension that are within a small distance of the specified entities. Implemented for curves, surfaces and volumes. The distance tolerance is automatically defined relative to the size of the entity(s). An example use case would be, "draw volume 10 include nearby" which will draw volume 10 along with volumes that are within a small distance of volume 10.

Precedence

For complicated expressions, which entities are referred to is influenced by the order in which portions of the expression are evaluated. This order is determined by precedence. Operators with high precedence are evaluated before operators with low precedence. You may always include parentheses to determine which sub-expressions are evaluated first. Here all operators and keywords listed from high to low precedence. Items listed together have the same precedence and are evaluated from left to right.

(, ) Expand Not *, / +, - <, >, <=, >=, <>, = And, Or Except In Of With

Because of precedence, the following two expressions are identical:

curve with length + 2 * 2 > 10 and length <= 20 in my_group

expand(curve with (((length + (2*2)) > 10 )and( length <= 20 ))) in ( my_group expand )