Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    delete specific vertex

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 484 Views
    Loading More Posts
    • 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.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 21/06/2008 at 07:31, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.5 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hey guys,

      Since I am operating on a polygon object, I can simply add vertices by adding it word-space position at index v.

      > `

        
      \>  Vector *padr;  
      \>  padr[v] = Vector(pos_x,pos_y,pos_z);  
      \>  
      

      `

      But how is a vertex delete from the Vector ? Setting its position to triple zero does not delete this entry from the structure.
      While beeing in the object manager's stucture tab, I can delete a vertex easily.

      How to do this by c++ code ?!

      Cheers and have a nice weekend
      Sascha

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 22/06/2008 at 07:18, xxxxxxxx wrote:

        Sunny Sunday folks,

        after diggin' nearly 6 hours in the examples, this forum and the doc, I managed to figure out how to delete a specific vertex.

        > `

          
        \>  AutoAlloc<Modeling> engine;  
        \>  if(!engine->InitObject(op)) return FALSE;  
        \>  engine->DeletePoint(pObject,vertexToDelete);  
        \>  engine->Commit(pObject,MODELING_COMMIT_UPDATE,NULL);  
        \>  
        

        `

        Now comes the but: It seems the modeling engine requires a LOT of C4D-resources. Does anyone know another (less ressource expensive) solution ?

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 22/06/2008 at 08:54, xxxxxxxx wrote:

          I'd take a look at VariableChanged in the SDK documentation.

          One thing to consider is that if you remove a point from a polygonal object, you'll have to do something about the 'gap' in the vertex array (shift the vectors with higher index to the left one) as well as the change the vertex indexing for the polygons in the polygonal array. You'll also need to consider what to do with polygons that may no longer be closed or leave holes as a result of removing the point.

          Basically, adding (appending) points is simple while removing them can get complex.

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 22/06/2008 at 09:09, xxxxxxxx wrote:

            As an alternative to VariableChanged for deletion of points or polygons you make want to look into SendModelingCommmand() with MCOMMAND_DELETE and ModelingCommandData using MODIFY_POINTSELECTION or MODIFY_POLYGONSELECTION.

            The points or polygons to be deleted must be selected on the object. I'm not exactly sure offhand how to select them programmatically. I tend to be using selection tags for this type of thing.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 22/06/2008 at 10:40, xxxxxxxx wrote:

              I use a bundle of traversion algorithms setting up a triangle strip. To that triangle strip vertex points are appended with CPolygon(prelast,last,v). So i just have to deal with the gap in the vertex array. The longer I think about the Modeling, the more I believe in Allocating and Feeing it manually when it is needed -> around the modelingprocess. After removing a point there is no need for the Modeling anymore. Hmm I have to test a few things with that type...

              Cheers
              Sascha

              1 Reply Last reply Reply Quote 0
              • First post
                Last post