Jump to content

how many ways to make 2 object combine together without gap?


Recommended Posts

Hi everyone , I have 2 model need to be combine together , well , actually is not only 2 , is plenty, so I cannot use "edit" or "transform" node to manual edit them 1 by 1.

I need some help , please kindly let me know as much tips as I can. (except with manual edit like "transform" or "edit" node , well , if there is expression can do the samething , please also tell me !!

Thanks please!!!

post-4016-1241305379_thumb.jpg

post-4016-1241305406_thumb.jpg

Link to comment
Share on other sites

Guest Swann

What you mean by combine ? merge them ? or just move them as close to eachother as it only possible ?

EDIT: Nevermind, below oldschool writed almost a book :) full of tips for your question.

Edited by SWANN
Link to comment
Share on other sites

Append a transform SOP to the geometry you want to align with the first object.

First move the objects you want to transform to the object's origin.

In the Transform SOP added above you would use in the tx, ty and tz parms respectively:

$CEX*-1

$CEY*-1

$CEZ*-1

where $CEX, $CEY and $CEZ are local variables to the Transform SOP that return the centroid position of this node. By negating them, you are putting the geometry at the origin of this object. (see the operator help for the Transform SOP and scroll down to see the list of all local variables available)

Next expand the parameter expressions to move the object to the centroid of the geometry in a SOP you want to align to again in the tx, ty and tz parms:

Link to comment
Share on other sites

where the centroid() expression does the same as the $CE? local variables above but for any other SOP in the network

and "../tube1" is the local path to the node that you want to eventually snap the geometry to.

Finally move the geometry to any of the six boundaries of the target object by picking on either the tx, ty or tz parms. For example if you wanted to align your geometry to the +X boundary of your geometry, in the tx parm you would expand the expression to read:

$CEX*-1 + centroid("../tube1", D_X) + bbox("../tube1", D_XSIZE)/2 + bbox("../tube_object2_xform1", D_XSIZE)/2

Link to comment
Share on other sites

where bbox() returns the bounding box of the geometry cached by a particular SOP.

Dividing the bbox() expressions for both sets of geometry by 2 gives us half the size. The result is to first move the center of our geometry to the edge of the primitive then move this geometry out by half it's size resulting in the two objects just touching each other.

Link to comment
Share on other sites

and sorry for the mangled reply.

For some reason the full answer would not go as one post...

Ohhhhh!!! thanks very much , i will try it out and see how , then will post here to let you know is it what i need , :D thanks again to everyone kindness

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...