Difference between revisions of "FaceProperty Script"
Line 18: | Line 18: | ||
Notice that this script runs a matlab file but doesn't open the matlab GUI. The statement /opt/matlab/R2013a/bin/matlab may need to be changed if the matlab is updated to a new version in the future - keep this in mind. | Notice that this script runs a matlab file but doesn't open the matlab GUI. The statement /opt/matlab/R2013a/bin/matlab may need to be changed if the matlab is updated to a new version in the future - keep this in mind. | ||
*change "/users/jema6380/Models/TrapWing/FaceProperty_Debug/" to the full path of your working directory. | *change "/users/jema6380/Models/TrapWing/FaceProperty_Debug/" to the full path of your working directory. | ||
+ | |||
+ | *open MatchFaceID.m | ||
+ | This script compares the minimum and maximum x,y,z coordinates of all vertices (6 pieces of information) for each face and will call faces a "match" if all 6 agree within a certain tolerance. There is a variable called "tol", which is currently set to 1e-5. Feel free to play around with this number, but 1e-5 has worked the best so far. |
Revision as of 12:56, 20 July 2013
The purpose of this script is to automate the creation of a new BLattr.inp file for a new parasolid model. You need a previous model that is very nearly the same as the new model, with the exception of a few new changes. You also need the BLattr.inp corresponding to the previous model, and your new geometric model for which you want to create a new BLattr.inp
- connect to either viz001 or viz002
- cd to the working directory where your model is saved (i.e. for Boeing, it might be Open26_12jets). Copy the old geometric model to this directory and call it geom2_old.xmt_txt, and the old BLattr.inp. Also copy over the new geometric model and call it geom2_new.xmt_txt. Make sure you have saved the native parasolid model that was generated in spaceclaim from ThreeDViewer.
- copy these files to the same working directory:
/users/jema6380/Executables/MatchFaceID.m
/users/jema6380/Executables/runMatchFaceID.sh
/users/jema6380/Executables/SwitchAttribFileFaces.rb
- open runMatchFaceID.sh with vim
Notice that this script takes 3 arguments, specified at the top in the following order: the old model file, the new model file, and the old BLattr.inp
Notice that this script runs a matlab file but doesn't open the matlab GUI. The statement /opt/matlab/R2013a/bin/matlab may need to be changed if the matlab is updated to a new version in the future - keep this in mind.
- change "/users/jema6380/Models/TrapWing/FaceProperty_Debug/" to the full path of your working directory.
- open MatchFaceID.m
This script compares the minimum and maximum x,y,z coordinates of all vertices (6 pieces of information) for each face and will call faces a "match" if all 6 agree within a certain tolerance. There is a variable called "tol", which is currently set to 1e-5. Feel free to play around with this number, but 1e-5 has worked the best so far.