Model.elementtestsizeratio#
- Model.elementtestsizeratio(input_collection, size_ratio, output_collection, dimension, contour, title)#
Tests 3D elements for whether or not they pass the neighbor size ratio element quality check, and puts those that fail on the specified
outputcollection.- Parameters:
input_collection (Collection) – The collection containing the element entities to test.
size_ratio (double) – The value to use as a threshold beyond which elements should be considered to have failed the test.
output_collection (Collection) – The collection containing the failed element entities.
dimension (int) –
A code telling to measure the dimension of:
4 - Measure 3D elements.
contour (int) –
A code telling if should:
0 - Display the results of the test normally.
1 - Display the elements color coded by their ratings.
2 - Build a histogram showing the distribution of ratings.
title (hwString) – The title to label the curve in the histogram.
Example#
Testing all displayed 3D elements for the neighbor size ratio value less than 0.1#import hm import hm.entities as ent model = hm.Model() elems1 = model.CreateCollectionByDisplayed(ent.Element) elems2 = hm.Collection(model, hm.FilterByEnumeration(ent.Element, ids=hm.hwUIntList([]))) model.elementtestsizeratio( input_collection=elems1, size_ratio=0.1, output_collection=elems2, dimension=4, contour=0, title="3D Neighbor Size Ratio" )