Week - 12 - Creating the locator, writing and reading the node data
Objective:
This challenge objective is to prepare 3 small but usefull script. First one - connector - is a script automating creatinon of RBE2 elements in certain component. Secon one - reading_nodes - takes as input .csv file and creates nodes from coordinates in input file. Third one - find_identic_comp - searches database of components with aim of displaying only those which have identical number of surfaces (what implies that they can be identical)
Problem Statement:
Creation of simmilar components as spotwelds can take large amount of time, creating script that facilitates that can save large amount of time. For x, y, z Locators it is important which degrees of freedom are fixed. Running script that takes as input .csv file is a very usefull action, input information can be prepared by fellow workers or made once and shared between simmilar projects. Csv file can have multiple values, default separator is space, but commas or any other sign can be used as delimiter. Last script finding components that potentially are indentical is very beneficial, user can easily estimate time needed for discretization of assembly. Having knowledge of how many components needed to mesh are identical can greatly reduce time needed for meshing.
Tcl command explanation:
In connector.tcl first button is used to create or clear existing and create all components used later. It runs CreateComps proc. Remaining buttons are linked with CreateConnector, and differ by input value, which is used by switch function. For Weld button all nodes are selected in one step, RBE2 element is created with indepenent node calculated automatically. For xLoc, yLoc and zLoc rigid link is created basing on two nodes provided by user. Degrees of freedom fixed: for xLoc are x translations and y,z rotations; for yLoc are y translations and x,z rotations; for zLoc are z translations and x,y rotations.
In reading_nodes.tcl input is selected to be .csv by default, after reading line it is printed to log, nodes are created.
In find_identic_comp.tcl first step is creating list of all displayed components then retrieving theri number of surfaces. Next user has to select component of intrest, its id and number of surface are kept in lists. Comparison is made by lsearch command, and foreach loop retrieves id numbers of components that match input component. Eventually all matched comp ids are isolated leaving only them in display. In command line exact number of compared components is printed and theri ids.
Conclusion:
All mentioned above scripts are usefull and give opportunity for further improvements. I had no problems with creating those thank to all the skills i gained during this course.
created by Adam