Results 1 to 6 of 6

Thread: DPKit: determing the centroid of a 'Part' ?

  1. #1
    Axes grinder- Dongle #99
    Join Date
    Jul 2003
    Location
    Seattle
    Posts
    14,726

    Question DPKit: determing the centroid of a 'Part' ?

    How does one determine the 'centroid', if I'm using that correctly, of a DPKit-style 'part'?
    They only call it 'class warfare' when we fight back.
    Praise to Buddha! #resist
    Chard's Credo-"Documentation is PART of the Interface"
    Film the cops. Always FILM THE COPS. Use this app.

  2. #2
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,784
    From a little testing, I'd guess it's the average of the point locations of the part. The attached scene rotates a "part" using DPKit Part Move, but the pivot point for the rotation is clearly NOT either the origin (modeler pivot point) or the center of the bounding box. BTW, as you probably know, you can specify the Pivot in the UI for Part Move.

    mTp
    Attached Files Attached Files

  3. #3
    Axes grinder- Dongle #99
    Join Date
    Jul 2003
    Location
    Seattle
    Posts
    14,726
    Monroe, indeed, you can specify it, but locating the proper numbers? That's what I'm trying to determine.
    They only call it 'class warfare' when we fight back.
    Praise to Buddha! #resist
    Chard's Credo-"Documentation is PART of the Interface"
    Film the cops. Always FILM THE COPS. Use this app.

  4. #4
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,784
    Here's the Wikipedia article on the centroid:

    https://en.wikipedia.org/wiki/Centroid

    including the formulae to calculate the centroid of a polygon:

    https://en.wikipedia.org/wiki/Centro...oid_of_polygon

    which according to the introduction in the article:

    The definition extends to any object in n-dimensional space: its centroid is the mean position of all the points in all of the coordinate directions.

    I don't know what algorithm Denis actually uses to calculate it in Part Move, though.

    mTp

  5. #5
    Axes grinder- Dongle #99
    Join Date
    Jul 2003
    Location
    Seattle
    Posts
    14,726
    Yeah, that's the problem: what is the bbox of the "part".

    It might be there already. Or Denis might add it if he sees this post.


    (Which he has done before, merci beaucoup to him.)
    They only call it 'class warfare' when we fight back.
    Praise to Buddha! #resist
    Chard's Credo-"Documentation is PART of the Interface"
    Film the cops. Always FILM THE COPS. Use this app.

  6. #6
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,784
    What problem are you trying to solve? If you need access to specific details or better control on a "part", move it to a different layer and treat it as a different object. Then, you have access to its Pivot Point directly in Layout via Modify => Move Pivot Point.

    mTp
    Last edited by MonroePoteet; 10-04-2015 at 08:11 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •