hi,
a simple problem about primitive centriod, i use add(cex,cey,cez) sop get a point, it cant accordant to primitive normal guide position(i know centroid is the primitive boundingbox center, it parallel with grid, maybe my description is not exact.), described below pic, my question is how can get the position of PR normal.
thanks,
yeshi,
Primitive normal guide position?
9311 7 2- onlyoneHai
- Member
- 17 posts
- Joined: July 2007
- Offline
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
Oddly if you use a primitive sop and scale the primitive to 0 size with the default $CEX,$CEY,$CEZ as the center it ends up exactly where you want your point. However if you use $CEX,$CEY,$CEZ in an add sop it doesn't….
One thing you could do is make a scaled down version use the primitive sop and then reference one of the point positions into your add.
The other way is to use the prim expression to get the center like this
prim(“../myPoly”,0,“P”,0), prim(“../myPoly”,0,“P”,1), prim(“../myPoly”,0,“P”,2)
where myPoly is the name of the sop with containing your polygon.
One thing you could do is make a scaled down version use the primitive sop and then reference one of the point positions into your add.
The other way is to use the prim expression to get the center like this
prim(“../myPoly”,0,“P”,0), prim(“../myPoly”,0,“P”,1), prim(“../myPoly”,0,“P”,2)
where myPoly is the name of the sop with containing your polygon.
The trick is finding just the right hammer for every screw
- onlyoneHai
- Member
- 17 posts
- Joined: July 2007
- Offline
- Ondrej
- Staff
- 1072 posts
- Joined: July 2005
- Offline
Simon
Oddly if you use a primitive sop and scale the primitive to 0 size with the default $CEX,$CEY,$CEZ as the center it ends up exactly where you want your point. However if you use $CEX,$CEY,$CEZ in an add sop it doesn't….
In the add SOP, $CEX,$CEY,$CEZ refer to the centroid of the bounding box, while in the primitive SOP, they refer to the centroid of the current primitive. Hence the difference. One could also use the prim() function with the “P” attribute in the add SOP to query a specific primitive's centroid.
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
- Ondrej
- Staff
- 1072 posts
- Joined: July 2005
- Offline
- onlyoneHai
- Member
- 17 posts
- Joined: July 2007
- Offline
- varomix
- Member
- 460 posts
- Joined: July 2005
- Offline
-
- Quick Links