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

    Multiple individual chamfers problem

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 388 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 01/04/2012 at 02:27, xxxxxxxx wrote:

      Take a square spline - 4 point

      Its straightforward  to globally chamfer all four points
      or apply the chamfer to a particular point (by selecting it and not others - user data boolean)

      if chamfer_0_switch:  sel.Select(0) 
      if chamfer_1_switch: sel.Select(1)
      if chamfer_2_switch:  sel.Select(2) 
      if chamfer_3_switch: sel.Select(3)

      but - how do you apply different chamfer radii to individual points

      currently using

      bc.SetData(c4d.MDATA_SPLINE_CHAMFERRADIUS, chamfer0)    
              u.SendModelingCommand(c4d.ID_MODELING_SPLINE_CHAMFER_TOOL, [obj],
                       c4d.MODELINGCOMMANDMODE_POINTSELECTION, bc, doc,
                       c4d.MODELINGCOMMANDFLAGS_CREATEUNDO)

      problem being - as soon as you apply the chamfer to a single point
      the point count changes

      tia

      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 01/04/2012 at 02:49, xxxxxxxx wrote:

        simply chamfer point by point ? as long as you are chamfering in ascending/descending point id order
        you won't have any problems with your selection ids. each following selection id is n+1.

        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 01/04/2012 at 03:03, xxxxxxxx wrote:

          ie I need a point count dependent on chamfers selected

          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 02/04/2012 at 01:41, xxxxxxxx wrote:

            yes,

            you could use a struct like approach. however you will have to make sure to chamfer in ascending
            order with this approach.

            class IDRad() :
                def __init__(self, id=None, radius=None) :
                    self.id = id
                    self.radius = radius
              
            def main() :
                sel = []
                counter = 0
                
                sel.append(IDRad(0,5))
                sel.append(IDRad(5,2))
                sel.append(IDRad(10,4))
                
                for n in sel:
                    ChamferStuff(n.id+counter,n.radius)
            	counter +=1
              
            def ChamferStuff(id,Radius) :
                #doesomething
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post