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

    Get Outline of Selected Polygons

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 468 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

      On 28/06/2017 at 12:06, xxxxxxxx wrote:

      Hi,
      I am trying to select the outline edges of currently selected Polygons. I tried to go the simple way with modelling command. But I cant get it to work. I have this Code but its not working. Any Ideas?
      greetings, Holger

      def main() :

      selobj=doc.GetActiveObject()
          settings = c4d.BaseContainer()                 # Settings
          res = utils.SendModelingCommand(command = c4d.ID_MODELING_OUTLINE_SELECTION_TOOL,
                                          list = [selobj],
                                          mode = c4d.MODELINGCOMMANDMODE_POLYGONSELECTION,
                                          bc = settings,
                                          doc = doc)
          c4d.EventAdd()
          
          if res is False:
            print "Something went wrong."
          elif res is True:
            print "Command successfull."
          elif isinstance(res, list) :
            print "Here you get the newly created object(s)."

      if __name__=='__main__':
          main()

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

        On 29/06/2017 at 09:59, xxxxxxxx wrote:

        Hi Holger,

        unfortunately ID_MODELING_OUTLINE_SELECTION_TOOL is marked private for a reason. There are things handled internally in a way, that it currently can not be used with SendModelingCommand(). Sorry!

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

          On 03/07/2017 at 15:52, xxxxxxxx wrote:

          Look at the Neighbor class. Go through all edges in the object, if the edge has two neighbor polygons but only one is selected, then it is a border edge.

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