Import of point coordinates (.dat File) directly into Hypermesh possible?

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

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

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • tinh
    tinh Altair Community Member
    edited June 2018

    Can't you find a cad software to do that?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2018

    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

  • tinh
    tinh Altair Community Member
    edited June 2018

    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

  • tinh
    tinh Altair Community Member
    edited June 2018

    You can modify it easily in Excel

  • tinh
    tinh Altair Community Member
    edited June 2018

    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

  • tinh
    tinh Altair Community Member
    edited June 2018
     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  }

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2018

    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!

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited June 2018

    Show your .dat file? your 'key-file'? LS-DYNA key ?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2020

    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...

    Unable to find an attachment - read this blog

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited June 2018

    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

     

  • tinh
    tinh Altair Community Member
    edited June 2018

    Maybe all z coords are zero

    Try this proc :  

     

    Capture.PNG.ad95c3ab10a2e85d4e1cbf558a4c3166.PNG

     

    Unable to find an attachment - read this blog

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2018

    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

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited June 2018

    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;

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2018

    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' /> 

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2018

    am facing the following problem, i couldnt import my iges file into my hypermesh 2017 version, please suggest me the solution for this problem.

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited June 2018

    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,...

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.