Model.wadlines_hardpartzone#
- Model.wadlines_hardpartzone(collection, double_array, vector, search_distance)#
Creates the hard part zone by duplicating and trimming the vehicle outer components with test zone boundaries.
- Parameters:
collection (Collection) – The collection containing the component entities.
double_array (hwDoubleList) – A list of doubles that contains the 3D coordinates of the vertices defining the test zone.
vector (hwTriple) – The hwTriple object defining the vector components. User can also supply a Python list of three doubles.
search_distance (double) – The perpendicular distance from the test zone boundary used to select elements from the vehicle outer components.
Example#
Create a hard part zone around the displayed components with a tolerance of 10.0 and the perpendicular direction be along z axis#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the displayed components collection_disp_components = hm.CollectionByDisplayed(model, ent.Component) # Creating a list that contains the 3D coordinates of the vertices defining the test zone double_list = [ 1343.514343661, 709.91761797527, 973.43251742578, 1334.7036682323, 703.07456401521, 973.15886027621, 1327.8482379749, 697.4142871779, 972.93366355648, 1323.86674249, 694.00118686161, 972.79787178914, ] model.wadlines_hardpartzone( collection=collection_disp_components, double_array=double_list, vector=[0.0, 0.0, 1.0], search_distance=10.0, )