Model.imprint_pointchain#
- Model.imprint_pointchain(baseCollection, isHard=hwIntList(), numChains=0, numPoints=hwIntList(), points=hwDoubleList(), saveToUserList=False)#
Imprints chains of points to the mesh.
- Parameters:
baseCollection (Collection) – The collection containing the input entities on which the points will be imprinted on. Valid entities are elements and components.
isHard (hwIntList) – The list of values indicating if a point will be retained in the final mesh (1) or not (0). The number of values in the list should match the number of points across all the chains.
numChains (int) – The number of chains to imprint.
numPoints (hwIntList) – The list of number of points in each chain. The number of values in the list should be equal to
numChains.points (hwDoubleList) – The list defining the x, y, z coordinates of each of the point in each of the chain.
saveToUserList (bool) – If set to 1/
True, the element IDs representing the imprinted lines are placed on the user mark.
Example#
Imprint two chains of points with the first chain having 5 points and the second chain having 3 points respectively. The total number of points are 5 + 3 = 8, and each point has x, y, and z coordinates so you need to supply 3 times 8 = 24 real values following thepointsargument. Certain points needed to be marked as hard, hence theisHardargument is supplied with 8 entries of 1 or 0 values.#import hm import hm.entities as ent model = hm.Model() element_collection = hm.Collection(model, ent.Element) model.imprint_pointchain( baseCollection=element_collection, numChains=2, numPoints=[5, 3], points=[ 8.16239357, 16.63461494, 0.44266832, 8.16239357, 10.38461494, 0.44266832, 8.16239357, 4.13461494, 0.44266832, 1.91239357, 4.13461494, 0.44266832, -4.33760643, 4.13461494, 0.44266832, 20.66239357, 4.13461494, 0.44266832, 14.41239357, 4.13461494, 0.44266832, 8.16239357, 4.13461494, 0.44266832, ], isHard=[1, 0, 1, 0, 1, 1, 0, 1], )