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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Neighbor example?

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 1.5k 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 17/03/2011 at 11:13, xxxxxxxx wrote:

      Hi,

      I'm trying to get the polygons that are attached to point index[1] of  a cube. But I can't figure out how to instantiate the Neighbor class.

      Does anyone have an example of this?

      -ScottA

      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 17/03/2011 at 11:22, xxxxxxxx wrote:

        The neighbor class contains a Init method. In combination with Neighbor.GetPointPolys( pnt ) you san get the neighbor polygons.
        Cheers, Sebastian

        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 17/03/2011 at 11:44, xxxxxxxx wrote:

          And maybe this Open Source plugin helps you.

          Open Edges - Py4D Open Source plugin - nux95 - cgsociety

          Greets, Niklas

          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 17/03/2011 at 12:33, xxxxxxxx wrote:

            Thanks nux.
            That's exactly what I needed. 🍺

            This is an example of all I was trying to do with it:

            import c4d  
            from c4d import gui,utils  
              
            def main() :  
                
              obj = doc.GetActiveObject()  
              AllPoints = obj.GetPointS() # Gets all the points   
              PointIndex = AllPoints.Select(1) # Gets point index #1   
              c4d.EventAdd()    
              nb = utils.Neighbor() # Assigns neighbor to a variable  
              nb.Init(obj) # Instantiates the neighbor class   
              
              selected = nb.GetPointPolys(PointIndex) # Gets the id's of those neighboring polygons  
              print selected  
                
              c4d.EventAdd()  
              
              
            if __name__=='__main__':  
              main()  
            

            I'm sure the SDK about this makes sense to people with years of coding experience. But I couldn't figure out what it was was trying to tell me on how to use this class.

            Thanks a lot for the for the example file.
            -ScottA

            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 17/03/2011 at 14:19, xxxxxxxx wrote:

              In my opinion, the Init() function is described very well.
              I started Coffee 3 months ago and Python about 1 month ago. 🙂

              Greetings,
              Niklas

              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 17/03/2011 at 15:40, xxxxxxxx wrote:

                I'm sure it is.
                But what do you do if you suck at reading SDK's. And can't find any tutorials to teach you how to read them?

                Welcome to my world. Tongue
                -ScottA

                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 17/03/2011 at 15:46, xxxxxxxx wrote:

                  At the beginning I really didn't understand anything in SDK's. But it became easier by time.

                  But I sometimes don't understand SDKs, too, since the entries are not always that senseful.

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