*cut_hole
Creates holes of a predefined shape on selected mesh or surfaces.
Syntax
*cut_hole basetype=<value> basemark=<value> type=<value> planenormal=<value> ?<option1>=<value1>? ?<option2>=<value2>? ... ?<optionN>=<valueN>?
Type
HyperMesh Tcl Modify Command
Description
Cuts holes of type circle, rectangle, polyline, or slot on selected mesh or surfaces. Optionally, it rebuilds the mesh around the hole.
Inputs
- basetype=<value>
- The type of the entities on which hole is cut. Valid values are elements or surfaces.
- basemark=<value>
- The ID of the mark containing the input elements or surfaces. Valid values are 1 and 2.
- type=<value>
- The type of the hole to be cut. Valid values are circle, polyline, rectangle, or slot.
- count=<value>
- The number of holes. If not specified, a single hole is assumed.
- planenormal="<value1x> <value1y> <value1z> ?<value2x> <value2y> <value2z>? ... ?<valueNx> <valueNy> <valueNz>?"
- The coordinates of the normal direction of the plane on which hole shapes are sketched. You can provide a single set of vector coordinate values (three floating point values) or as many sets as the number of holes. This is mandatory.
- centerpoints="<value1x> <value1y> <value1z> ?<value2x> <value2y> <value2z>? ... ?<valueNx> <valueNy> <valueNz>?"
- The coordinates of the center points of the circles or slots according to the number of holes. Applicable for types ‘circle’ and ‘slot’. If type=circle, the expected number of center points is equal to the value of count. If type=slot, each hole needs to have a center line, which can be defined by the centerlines argument, or as a straight line whose end points can be provided by the centerpoints argument. The expected number of center point coordinates is twice as many as the count value.
- num_centerpoints={value1 value2 … ?<valueN>?}
- The number of center points per hole. Applicable for type ‘slot’. If a curved center line of the slot is required, you can supply more than two center points per slot hole. In that case a smooth line would be fitted among the given points and used as the center line.
- centerlines={id1 id2 … ?idN?}
- The ID of the center line for the slot hole. Applicable for type ‘slot’. Each slot hole requires a center line which can be defined either by the centerlines argument, or as a straight line whose end points are provided by the centerpoints argument. The expected number of center lines is equal to the count value. Either centerpoints or centerlines is mandatory if type=slot.
- radius={value1 value2 … ?<valueN>?}
- The radius of the circle or slot holes with uniform radius. Applicable only for types ‘circle’ and ‘slot’. If a single value is given, it is used for all holes. If the holes have different radii, the number of the radius values should match the count value.
- radius1={value1 value2 … ?<valueN>?}
- The radius of the slot hole at the start of the center line (or at the first center point). Applicable only for type ‘slot’. If a single value is given, it is used for all the holes. If the holes have different radii, the number of the radius values should match the count value.
- radius2={value1 value2 … ?<valueN>?}
- The radius of the slot hole at the end of the center line (or at the second center point). Applicable only for type ‘slot’. If a single value is given, it is used for all the holes. If the holes have different radii, the number of radius values should match the count value.
- cappedends=<value>
- Determines the shape of the ends of the hole. Applicable only for type ‘slot’.
- num_vertices={value1 value2 … ?<valueN>?}
- The number of vertices for each polygonal hole. Applicable only for type ‘polyline’. The number of values should be equal to the count value.
- vertexpoints="<value1x> <value1y> <value1z> ?<value2x> <value2y> <value2z>? ... ?<valueNx> <valueNy> <valueNz>?"
- The coordinates of the vertices for the polygonal hole. Applicable only for type ‘polyline’. The expected number of coordinate sets should be equal to the num_vertices value.
- origin="<value1x> <value1y> <value1z> ?<value2x> <value2y> <value2z>? ... ?<valueNx> <valueNy> <valueNz>?"
- The coordinates of the origin of the rectangle. Applicable only for type ‘rectangle’ and mandatory for this type. The number of coordinate sets should be equal to the count value.
- x_axis="<value1x> <value1y> <value1z> ?<value2x> <value2y> <value2z>? ... ?<valueNx> <valueNy> <valueNz>?"
- The coordinates of the local x axis of the rectangle. Applicable only for type ‘rectangle’ and mandatory for this type. The number of coordinate sets should be equal to the count value.
- y_axis="<value1x> <value1y> <value1z> ?<value2x> <value2y> <value2z>? ... ?<valueNx> <valueNy> <valueNz>?"
- The coordinates of the local y axis of the rectangle. Applicable only for type ‘rectangle’ and mandatory for this type. The number of coordinate sets should be equal to the count value.
- length={value1 value2 … ?<valueN>?}
- The length of the rectangle along the x axis. Applicable only for type ‘rectangle’ and mandatory for this type. The number of values should be equal to the count value.
- width={value1 value2 … ?<valueN>?}
- The length of the rectangle along the y axis. Applicable only for type ‘rectangle’ and mandatory for this type. The number of values should be equal to the count value.
- dorebuild=<value>
- This activates the rebuild algorithm when remeshing the area around the hole. Applicable only if the input selection is elements.
- scaleparams=<value>
- This activates scaling of the size values in the criteria or parameter file according to the local mesh size. Applicable only if dorebuild is set to 1.
Examples
*createmark elems 1 all
*cut_hole type=circle centerpoints= {-0.173848 5.205146 0.000000} planenormal= {0.000000 0.000000 1.000000} radius= 11.180340 basetype=elems basemark=1 dorebuild=1 scaleparams=1
*createmark elems 1 all
*cut_hole type=slot cappedends=1 centerpoints= {-35.173848 0.205146 0.000000 -0.173848 15.205146 0.000000} planenormal= {0.000000 0.000000 1.000000} radius1= 5.000000 radius2= 5.000000 basetype=elems basemark=1
*createmark elems 1 all
*cut_hole type=slot cappedends=1 num_centerpoints=3 centerpoints= {-35.173848 0.205146 0.000000 -25.173848 15.205146 0.000000 -0.173848 15.205146 0.000000} planenormal= {0.000000 0.000000 1.000000} radius1= 5.000000 radius2= 5.000000 basetype=elems basemark=1
*createmark surfs 1 all
*cut_hole type=polyline planenormal= {0.000000 0.000000 1.000000} num_vertices=3 vertexpoints= {9.598048 -4.267573 0.000000 25.146962 20.321110 0.000000 39.839792 -9.780474 0.000000} basetype=surfs basemark=1
*createmark surfs 1 all
*cut_hole type=slot count=3 centerpoints= {-30.531465 12.062099 0.000000 -14.816232 18.348192 0.000000 19.729055 9.224565 0.000000 34.923248 6.185727 0.000000 -15.173848 -4.794854 0.000000 4.826152 -4.794854 0.000000} length= {26.925824 25.495098 30.000000} planenormal= {0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000} radius1= {5.000000 5.000000 5.000000} radius2= {5.000000 5.000000 5.000000} basetype=surfs basemark=1
*createmark surfs 1 all
*cut_hole type=rectangle length= 30.000000 origin= {-15.173848 15.205146 0.000000} planenormal= {-0.000000 -0.000000 -1.000000} width= 20.000000 x_axis= {1.000000 0.000000 0.000000} y_axis= {0.000000 -1.000000 -0.000000} basetype=surfs basemark=1
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
2021.2