Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to read .NC1 file (.nc1file) from QT ?

How to read .NC1 file (.nc1file) from QT ?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Pranit PatilP Offline
    Pranit PatilP Offline
    Pranit Patil
    wrote on last edited by
    #1

    Im trying to read .NC1 file (.nc1file) from QT but didnt get any result
    can anyone help me in this.

    An NC1 file is a numerical control file created by Mastercam, a suite of CAD programs used for designing and manufacturing components. It contains instructions for directing a machine tool, such as a laser cutter, nester, welder, or drill, during production.

    System Details
    windows 10 pro
    64bit

    Qt Details
    Desktop qt 5.5.0 MinGw 32bit

    @Embedded Software Developer
    God has given you one face, and you make yourself another.

    jsulmJ ODБOïO 2 Replies Last reply
    0
    • Pranit PatilP Offline
      Pranit PatilP Offline
      Pranit Patil
      wrote on last edited by
      #4

      thanks @jsulm and @LeLev

      I reading a file as normal reading file like .pdf or .ini and got data which i want.
      following code is working for me.

      QString filename="8VB202.nc1";
      QFile file(filename);
      if(!file.exists()){
          qDebug() << "->file exists  "<<filename;
      }else{
          qDebug() << filename<<"->file not exists";
      }
      ui->textBrowser->clear();
      if (file.open(QIODevice::ReadOnly | QIODevice::Text)){
          QTextStream stream(&file);
          ui->textBrowser->setText(stream.readAll());
          }
      file.close(); 
      

      output of file
      Screenshot_1.png

      once again thank you

      @Embedded Software Developer
      God has given you one face, and you make yourself another.

      1 Reply Last reply
      1
      • Pranit PatilP Pranit Patil

        Im trying to read .NC1 file (.nc1file) from QT but didnt get any result
        can anyone help me in this.

        An NC1 file is a numerical control file created by Mastercam, a suite of CAD programs used for designing and manufacturing components. It contains instructions for directing a machine tool, such as a laser cutter, nester, welder, or drill, during production.

        System Details
        windows 10 pro
        64bit

        Qt Details
        Desktop qt 5.5.0 MinGw 32bit

        jsulmJ Online
        jsulmJ Online
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @Pranit-Patil said in How to read .NC1 file (.nc1file) from QT ?:

        but didnt get any result

        What did you do? What did not work?
        I don't think Qt supports this format, you will need either to implement your own parser or search for a library.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        3
        • Pranit PatilP Pranit Patil

          Im trying to read .NC1 file (.nc1file) from QT but didnt get any result
          can anyone help me in this.

          An NC1 file is a numerical control file created by Mastercam, a suite of CAD programs used for designing and manufacturing components. It contains instructions for directing a machine tool, such as a laser cutter, nester, welder, or drill, during production.

          System Details
          windows 10 pro
          64bit

          Qt Details
          Desktop qt 5.5.0 MinGw 32bit

          ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by
          #3

          @Pranit-Patil isn't it plain text file ? ISO 6983
          Reading it is simple using QFile
          What you want to do after reading ?

          1 Reply Last reply
          2
          • Pranit PatilP Offline
            Pranit PatilP Offline
            Pranit Patil
            wrote on last edited by
            #4

            thanks @jsulm and @LeLev

            I reading a file as normal reading file like .pdf or .ini and got data which i want.
            following code is working for me.

            QString filename="8VB202.nc1";
            QFile file(filename);
            if(!file.exists()){
                qDebug() << "->file exists  "<<filename;
            }else{
                qDebug() << filename<<"->file not exists";
            }
            ui->textBrowser->clear();
            if (file.open(QIODevice::ReadOnly | QIODevice::Text)){
                QTextStream stream(&file);
                ui->textBrowser->setText(stream.readAll());
                }
            file.close(); 
            

            output of file
            Screenshot_1.png

            once again thank you

            @Embedded Software Developer
            God has given you one face, and you make yourself another.

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved