Model.hm_getuvvectors_bypoint#
- Model.hm_getuvvectors_bypoint(surf_entity, point_entity, scaled=0)#
Returns the parametric uv derivative vectors at a point on the referenced surface.
This function is only valid for single surfaces or surfaces generated by trimming one original surface and suppressing edges. It is not valid for the generic case of surfaces composed from different parametric patches by suppressing edges only (for example, two separate surfaces stitched together, then edges suppressed).
- Parameters:
surf_entity (Entity) – The object describing the input surface entity.
point_entity (Entity) – The object describing the point entity of interest. The point must either be associated to the input
surf_entity, or to no surface at all. If it is not associated to any surface, it is projected internally onto the surface.scaled (int) –
Optional argument used when the referenced surface is a trimmed surface.
If the value is set to 0 (default), the uv vectors returned will be in reference to the parametric space of original untrimmed surface.
If the scale value is set to 1, the uv vectors returned will be in reference to the parametric space of the trimmed surface.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:uTangent (numpy.ndarray) - The u-direction derivative vector. The vector is relative to the global coordinate system
vTangent (numpy.ndarray) - The v-direction derivative vector. The vector is relative to the global coordinate system
Example#
Get the uv vectors at point with ID 100 on surface with ID 1#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getuvvectors_bypoint( surf_entity=ent.Surface(model, 1), point_entity=ent.Point(model, 100) ) print("The u-direction derivative vector:", result.uTangent) print("The v-direction derivative vector:", result.vTangent)