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

    Evenly distribute selected points.

    Plugin Requests
    0
    1
    596
    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
      Helper
      last edited by

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

      On 18/12/2012 at 17:34, xxxxxxxx wrote:

      Is it possible to have a plugin that will allow a user to select a chain of connected points and have them evenly distributed from first to last (evenly spaced) and aligned in a straight line connecting first and last point?

      For example - this is how I see it working:

      User selects a bunch or points.
      User runs script/plugin
      Plugin asks user to select 1st point
      - As user moves mouse around a white highlight snaps to selected points similar to how the knife tool does in line mode.
      - Once chosen point located and highlighted, user left clicks to indicate start point.
      Plugin asks user to select last point
      - Same as 1st pt, user moves to last point, highlight snaps to selected points as mouse moves around but now plugin draws a rubber-band highlight line connecting 1st point and currently highlighted last point.
      - Once last point is chosen, user left clicks to indicate last point.

      Plugin then divides the imaginary line between 1st and last pts into required equal segments and calculates the x/y/z of the each dividing point along this imaginary line.

      Plugin then sets the x/y/z of the 2nd to 2nd-last selected points to these new calculated positions

      The only problem that I can see is how to identify the point sequence 1,2,3,4 etc so that they can be relocated to their new positions in the correct order.

      At the moment, I know ZERO about coffee/ptyhon and cinema 4d scripting but hoping to learn it as soon as possible.

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