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. CGAL - Insert edge in a face
Forum Updated to NodeBB v4.3 + New Features

CGAL - Insert edge in a face

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 948 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.
  • N Offline
    N Offline
    nmya
    wrote on last edited by nmya
    #1

    0

    I'm creating an application using qt creator which read .off files as CGAL::Linear_cell_complex_for_combinatorial_map and preview it I want to make operations on the read mesh such as removing edge and restore it .
    I tried the following code but it doesn't do any action (insert/remove)

    void MainWindow ::insertCell()
    {
            dh1= lcc.darts().begin() ;
            dh2=lcc.darts().end();
    
       if (lcc.is_insertable_cell_1_in_cell_2( dh1, dh2) ){
            lcc.insert_cell_1_in_cell_2( dh1,dh2);
      }
          lcc.display_characteristics(std::cout) << ", valid=" <<
            lcc.is_valid() << std::endl;
    
     }
    
    
     void MainWindow ::removeCell()
     {    dh1= lcc.darts().begin() ;
         if( (lcc.is_removable<1>(dh1)) ){
        lcc.remove_cell<1>(dh1);
         }
    
         lcc.display_characteristics(std::cout) << ", valid="
                          << lcc.is_valid() << std::endl;
     
      }
    

    any help please?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Might be a silly question but did you ensure that these two methods are being called ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      N 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Might be a silly question but did you ensure that these two methods are being called ?

        N Offline
        N Offline
        nmya
        wrote on last edited by
        #3

        @SGaist
        sure they are called and execute the last line of method by printing :
        #Darts=16674, #0-cells=2775, #1-cells=8337, #2-cells=5558, #ccs=1, valid=1
        which is the same output of printing characteristics before call insert of remove method

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Ok, then the other thing that you don't take into account is that you don't print anything in the case the lcc.is_insertable_cell_1_in_cell_2 and the lcc.is_removable<1>(dh1) methods return false.

          So the lcc.insert_cell_1_in_cell_2 and and lcc.remove_cell<1>(dh1); might just not be called at all.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • N Offline
            N Offline
            nmya
            wrote on last edited by
            #5

            @SGaist said in CGAL - Insert edge in a face:

            hing that you don't take into account is that you don't print anything in the ca

            right
            I traced the program , it's skipped lcc.insert_cell_1_in_cell_2 and print the last line - I don't know why it isn't insertable
            but the remove method , it enter if statement scope and execute lcc.remove_cell<1>(dh1); whithout any removing action

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @nmya said in CGAL - Insert edge in a face:

              I traced the program , it's skipped lcc.insert_cell_1_in_cell_2 and print the last line - I don't know why it isn't insertable

              I don't know either. I never used that framework. It's up to you to find out why. Maybe your lcc object doesn't contain what is needed to allow insertion.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              N 1 Reply Last reply
              0
              • SGaistS SGaist

                @nmya said in CGAL - Insert edge in a face:

                I traced the program , it's skipped lcc.insert_cell_1_in_cell_2 and print the last line - I don't know why it isn't insertable

                I don't know either. I never used that framework. It's up to you to find out why. Maybe your lcc object doesn't contain what is needed to allow insertion.

                N Offline
                N Offline
                nmya
                wrote on last edited by
                #7

                @SGaist thank you for help :)

                1 Reply Last reply
                0

                • Login

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