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

    LineObject

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 382 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 27/08/2012 at 11:07, xxxxxxxx wrote:

      Hello,

      I would like to triangulate a spline. I use LineObject.Triangulate() for that and it's work well if I have only one segment.

      If tey are more than one there is no function SetSegment to set the segments. How can I do ? (I don't want to use CallCommand or use an ExtrusionObject or other, I want realy triangulate into a PolygonObject)

      Script example when a spline is active :

        
      import c4d   
      def main() :   
          lo = c4d.LineObject(op.GetPointCount(),op.GetSegmentCount())   
          for i,p in enumerate(op.GetAllPoints()) :   
              lo.SetPoint(i,p)   
          poly = lo.Triangulate(0.0)   
          doc.InsertObject(poly)   
          c4d.EventAdd()   
        
      if __name__=='__main__':   
          main()
      

      Thx

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

        On 23/04/2013 at 22:45, xxxxxxxx wrote:

        up !
        anyone had an idea, or it's impossible ? (if it's impossible -> wishing list for r2015 with the possibility to create ngons ...)

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

          On 24/04/2013 at 03:54, xxxxxxxx wrote:

          why don't you just create multiple LineObject out of your SplineObject (where you do 
          have full access to the spline (segment) data) in python? i am also not quite sure if 
          converting the spline object control points into LineObject points is a very suitable 
          approach for a practical plugin, as this will cause you to loose any interpolation.

          ps : '  for r2015 with '. i would call that downright blasphemy 😉

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

            On 24/04/2013 at 08:49, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            why don't you just create multiple LineObject out of your SplineObject

            For "classical" segments it's not a problem. It's only when a segment is within an other, triangulate in C++ make a hole into the polygon in python no way ...

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