(FIXED) move points to match other points with the same ID?

   370   2   1
User Avatar
Member
56 posts
Joined: 12月 2020
Offline
Hi
I am currently working on some roofs and have a good way to make hipped roofs but want to make them into gabled roofs...
I have got all the prims with 3 points that the peek point has only 3 neighbours as my selection of roof parts that need to stand vertically to make a gabled roof and have Id's for each peek that match the center point of the base I want to drag the top point over the base point. because the amount of points is different for the positions point number can't be used. that's the reason for using ID numbers



just need to work out how to transfer the co-ordinates from the xz of the base group with the same id to the peek group??

any help would be much appreciated been chasing my tail with it all day
Edited by Getyamamout - 2025年4月9日 20:30:10

Attachments:
help.png (4.4 MB)

User Avatar
Member
9143 posts
Joined: 7月 2007
Offline
assuming you have only 2 points per origid value (the peak and the base)
run this in Point Wrangle with gable_peeks in Group parm

// run only over gable_peeks group specified in the Group parm ^

int pts[] = findattribval( 0, "point", "origid", i@origid );  // get all points with the same origid as current point
removevalue( pts, @ptnum );                                   // exclude current point (peak)
if ( len( pts ) == 0 ) return;                                // return if there is no other point

vector ptP = point( 0, "P", pts[0] );                         // get other point's (base) position 
v@P = set( ptP.x, v@P.y, ptP.z );                             // profit
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
56 posts
Joined: 12月 2020
Offline
tamte

Thanks Once again
Edited by Getyamamout - 2025年4月9日 20:27:19

Attachments:
help1.png (3.0 MB)
Fixed.png (3.6 MB)

  • Quick Links