*body_trim_with_templine

Trim selected solids or surfaces by sweeping line constructed from input coordinates in input direction.

Syntax

*body_trim_with_templine entity_type mark_id vector_id coords size options

Type

HyperMesh Tcl Modify

Description

This command uses coordinates specified by coords and size parameters to construct temporary line. Depending on “mode” setting in options parameter the line can be either smooth spline or a set of straight segments connecting points. The line is then used to construct cutting surface, which is then used to trim selected solids or surfaces. Depending on options parameter setting, the cutting surface itself either becomes part of the model or used only to produce trimming lines on surfaces it intersects. One more setting in options parameter controls whether the surface is generated exactly as specified by input vector and coordinates or it is also analytically extended to intersect as many surfaces from the input set as possible.

Inputs

entity_type
The type of entity selected for trimming. Surfaces and solids are supported.
mark_id
The mark of surfaces or solids selected for trimming.
vector_id
The ID of the vector defining the sweeping direction for generating the cutting surface using the temporary line, defined using the *createvector command. This must be set to 1.
coords
The ID of array of “double” type values specifying x, y, and z values of consecutive points used to generate temporary line.
size
Number of values in the array specified by coords.
options
The options to use for trimming the selected entities. Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3).
Bit0
0 – Trimming surface is created by connecting input points and sweeping obtained line in input direction.
1 – Trimming surface is also extended to trim as many input surfaces as possible.
Bit1
0 – Line is generated as a smooth spline through input points.
1 – Line is generated as a set of segments connecting input points.
Bit2
0 – Trimming surface becomes part of the model.
1 – Trimming surface is temporary and is only used to generate trimming lines on intersected surfaces.
Bit3
0 – Trimming surface becomes part of the model.
1 – Trimming surface is temporary and is only used to generate trimming lines on intersected surfaces.
Bit4
0 – Do not close open trimming line loop.
1 – Close trimming line loop.

Examples

To trim solid 111 by sweeping a smooth spline curve generated from three points with coordinates (0, 0.5, 11), (2, 0.5, 12), and (3, 0.7, 13) in the z-direction:
*createmark solids 1 111
*createvector 1 0 0 1
*createdoublearray 9 0 0.5 11 2 0.5 12 3 0.7 13
*body_trim_with_templine solids 1 1 1 9 0
To use the same points but extend the generated surface to ensure that the solid is split as a result of this trim:
*createmark solids 1 111
*createvector 1 0 0 1
*createdoublearray 9 0 0.5 11 2 0.5 12 3 0.7 13
*body_trim_with_templine solids 1 1 1 9 1

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}