Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.
We redeclare this function only so that the more derived return type is available without casting.
This function provides some measure of how curved the area around this node is. For flat areas, it returns 1. For curved areas, it will return less than 1, but more than -1. The further this value is from 1, the greater the curvature at this node.
Precondition
The node normal index must be set before this call.
Returns
, where is the largest angle between the node normal and all attached shell elements' normals. If this is a free node, the function will return 1.
The set of nodes that should support node normals.
Ensures that nodes supports the node normals, which means that the nodes have a state with the name "normal". Once this is done, the index of this state is returned.
The square of the distance below which an element edge is considered to effectively have zero length.
Apart from taking the squared value, this function differs from getSmallEdgeLength() in one other important way. It relies on the tolerance having been set by a call to setSmallEdgeLength(), or at least the updateTolerances() function being called after the small edge length tolerance has been changed by some other means. Clients would use getSmallEdgeLengthSq() when they expect to need the squared distance frequently but cannot easily cache the returned value itself. The squared value is explicitly stored internally by the MeshFeatureIdentifier class, so it is made available by this function mostly as a quicker alternative to getSmallEdgeLength.
A corner is taken as an edge having an angle of more than the currently set free edge corner angle limit from straight. Note that no attempt is made to test if the edge is planar, so this may influence the angle test.
Precondition
node is assumed to be on a free edge.
The mesh is assumed to be well-formed, meaning that there are no multiple intersects of the shell mesh at this node. Another way of saying this is that there must be exactly two other edge nodes attached to this one via shell elements.
The internal tolerances must be current for this function to work properly. This can be ensured by a call to updateTolerances(), but this is not a trivial function call due to the internal calculations involved. Once it has been called, it does not need to be called again until something modifies the tolerance angles without using the setFreeEdgeCornerAngleRad or setFreeEdgeCornerAngleDeg function.
True if the curvature at node is less than the currently set feature tolerance. The feature tolerance is simply the cosine of the feature angle.
Precondition
The internal tolerances must be current for this function to work properly. This can be ensured by a call to updateTolerances(), but this is not a trivial function call due to the internal calculations involved. Once it has been called, it does not need to be called again until something modifies the tolerance angles without using the setFeatureAngleRad or setFeatureAngleDeg function.
True if curvature is less than the currently set feature tolerance. The feature tolerance is simply the cosine of the feature angle.
Precondition
The internal tolerances must be current for this function to work properly. This can be ensured by a call to updateTolerances(), but this is not a trivial function call due to the internal calculations involved. Once it has been called, it does not need to be called again until something modifies the tolerance angles without using the setFeatureAngleRad or setFeatureAngleDeg function.
The feature angle defines the largest angle between the node normal and each attached shell element normal before the node is considered to be on a topological feature. Note that this is not the angle between two adjacent shell elements. The default is 15 degrees.
The free edge corner angle defines the largest angle from straight along a free edge before it is considered a corner. The normals of the shell elements making up the edge are not considered when determining this. The default value is 30 degrees. Smaller angles will result in more edges being deemed to have corner nodes, whereas larger edges will result in more edges being considered straight.
The distance below which an element edge is considered to effectively have zero length. This tolerance is used to test for two nodes being essentially in the same location, which generally means that an element with those two nodes as an edge has zero area or is a quad that looks like a tri.
The node normal is calculated as an angle-weighted average of the attached shell elements' normals. The angle weighting is achieved by multiplying each normal by the vertex angle formed at this node. When the node normal vector is scaled to unit length, the angle-weighting has already been conveniently incorporated into the calculation.
Returns
True if the normal was successfully calculated. It will return false if there were any attached degenerate elements (ie elements with coincident nodes), the node has no shells attached, or the attached shells have normal vectors such that an angle weighted sum results in a zero vector. This last case could occur if elements have normals at 180 degrees to each other, such as being squashed such that all attached elements are in the same plane but some with opposing normals. It will also return false if the node normal index has not been set.
Update the normal vector for all nodes in nodes. For normals that cannot be calculated, a zero normal is assigned. If necessary, this function adds a state to nodes for node normals.