Model.hm_proximitymarksourceproximityelements#

Model.hm_proximitymarksourceproximityelements(collection)#

Registers into collection all the source elements within proximity to the given component collection.

This must be preceded by a call to Model.hm_proximityinit() and followed by a call to Model.hm_proximityend().

Parameters:

collection (Collection) – The collection of the entities to which the elements will be placed.

Returns:

Example#

Output the source proximity elements to a collection and highlight them#
import hm
import hm.entities as ent

model = hm.Model()

components_collection = hm.Collection(model, ent.Component)
model.hm_proximityinit(components_collection, max_distance=2.5)

elemFromComps = hm.Collection(model, ent.Element, populate=False)
model.hm_proximitymarksourceproximityelements(elemFromComps)

model.hm_highlightmark(collection=elemFromComps, highlight="h")
model.hm_proximityend()