Model.hm_detectselfsymmetry#
- Model.hm_detectselfsymmetry(collection)#
Finds and returns a point on the plane of symmetry and the normal of the plane.
- Parameters:
collection (Collection) – The collection containing the input entities to find the self-symmetry for. Valid entities are elements and surfaces.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:centerString (str)
centerCoordinates (numpy.ndarray)
normalString (str)
normalVectorComponents (numpy.ndarray)
Examples#
Find the plane of symmetry of a given geometry#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_detectselfsymmetry(collection=hm.Collection(model, ent.Surface)) print("centerString", result.centerString) print("centerCoordinates", result.centerCoordinates) print("normalString", result.normalString) print("normalVectorComponents", result.normalVectorComponents)
Find the plane of symmetry of a given mesh#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_detectselfsymmetry(collection=hm.Collection(model, ent.Element)) print("centerString", result.centerString) print("centerCoordinates", result.centerCoordinates) print("normalString", result.normalString) print("normalVectorComponents", result.normalVectorComponents)