*surfaceprimitivefrompoints

Create a primitive type surface from selected nodes or points.

Syntax

*surfaceprimitivefrompoints entity_type mark_id surf_type options tol

Type

HyperMesh Tcl Modify

Description

This command takes input nodes or points and uses them as target points to construct a surface of the specified primitive type. Optionally, a tolerance value can be specified to reject a surface that does not fit the input points.

Inputs

entity_type
Type of input target. Valid values are nodes or points.
mark_id
The mark of input nodes or points.
surf_type
The type of primitive surface to create. Valid values are:
1 – plane
2 – sphere
3 – cylinder
4 – cone
5 – general quadric surface
For surf_type 4, if a cylinder can be fit to the input entities, it will be created instead of a cone.
options
Flags that indicate different modes. Bit values are used and the value is calculated as (Bit0 + 2*Bit1).
Bit0
Tolerance usage mode. Valid values are:
  • 0 – Tolerance is not used, best possible surface is found for any input set of points.
  • 1 – Tolerance specified by tol parameter is used to reject surface that does not fit input points.
Bit1
Component mode. Used only when entity_type is points. Valid values are:
  • 0 – Surface is created in the current component.
  • 1 – Surface is created in the most common input points component.
tol
Tolerance value used to accept generated surface. Not used if options Bit0 is 0. Negative value can be set to specify that the global value of the geometry cleanup tolerance set using *cleanuptoleranceset should be used.

Examples

To create a cone surface that fits all displayed points in a best possible way:

*createmark points 1 "displayed"
*surfaceprimitivefrompoints points 1 4

To try to create sphere that fits nodes 1 through 8 with a deviation not larger than 0.02:

*createmark nodes 1 1-8
*surfaceprimitivefrompoints nodes 1 2 1 0.02

Errors

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

Version History

10.0