Import of point coordinates (.dat File) directly into Hypermesh possible?
Hi there!
I have the following issue: In order to model a 2D airfoil with the help of several points I would like to import a '.dat file' that contains all the point coordinates for the airfoil surface. Is there a possible way to import these data directly without any file transformation?
In addition, I would really like to know if it's possible, and if yes how, to connect all the airfoil surface points together with a SMOOTH and nice spline instead of strange linear splines?
Thank you very much for your help!
Kind regards
Martin
Answers
-
Can't you find a cad software to do that?
0 -
Hi tinh, thank you very much for your quick answer!
For the spline construction, a CAD software would be more appropriate, that's true. Nethertheless I would like to know if there is a way to import dat. file into Hypermesh?
Thank you and Greetings
Martin
0 -
Hypermesh can import STL data
if you have only coordinates x, y, and z, I think a bit modification is needed
like this:
*NODE
1,x1,y1,z1
2,x2,y2,z2
3,x3,y3,z3
...
=> import the file as LsDyna file
0 -
You can modify it easily in Excel
0 -
Or a simple tcl script can do it
example your original point_coord.dat file is:
x1 y1 z1
x2 y2 z2
x3 y3 z3
a script like this will generate key file
0 -
proc Dat2Key {FilePath} { set fpt [open $FilePath] set buf [read -nonewline $fpt] close $fpt set buf [string map [list \n \n1, ' ' ,] $buf] set fpt [open $FilePath.key w] puts -nonewline $fpt *NODE\n1, puts -nonewline $fpt $buf close $fpt }
0 -
Okay thank you! So one cannot avoid a modification of the data like this for the .dat file?
The key-file can be then imported to HyperMesh?
Again, thank you for your help!
0 -
Show your .dat file? your 'key-file'? LS-DYNA key ?
0 -
This is my dat-file (coordinates of points) which I would really like to import into HyperMesh with the least amount of effort/ data conversion...
0 -
Only Y-coordinate ?
A2_NASA_SC2_0712_t2c11,01.dat (y-Koordinaten des Ausgangs-Profils 'NASA_SC2_0712_t2c11,03.dat' mit Faktor 0,998323 multipliziert) 1,000000 -0,010655 0,993734 -0,009000 0,983123 -0,006276 0,971048 -0,003295 0,957627 -0,000136 0,943066 0,003118 0,927606 0,006405 0,911494 0,009675 0,894934 0,012885
0 -
0
-
Exactly, all z coords = 0.
Perfect, that picture shows the result I'm looking for.
Sorry for asking, but how should I apply the tcl file with my dat to import the data into HyperMesh?
Again, thank you all very much for the excellent support!
Regards
0 -
Here's complet script based on Tinh's script:
proc p_ReadCloudPointFile {FilePath} { set fpt [open $FilePath] set buf [string map {, .} [read $fpt]] close $fpt set lines [split $buf \n] foreach line $lines { if {[scan $line '%f %f' x y]==2} { *createnode $x $y 0 } } } set fileTypes { {'Data' {.dat} } {'All files' * } } set file_name [tk_getSaveFile -filetypes $fileTypes -title 'DataFile' ] p_ReadCloudPointFile $file_name;
0 -
Thank you so much! I just ran the script in HyperMesh and it worked /emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />
0 -
am facing the following problem, i couldnt import my iges file into my hypermesh 2017 version, please suggest me the solution for this problem.
0 -
Altair Forum User said:
am facing the following problem, i couldnt import my iges file into my hypermesh 2017 version, please suggest me the solution for this problem.
Try another format, like STEP, Parasolid,...
0