reorient center to best fit of BBOX? 2004-05-07 - By Graham D Clark
Back
Any suggestion for how to reorient center of object to best BBOX fit? Ie if an elongated cubes points are rotated, center remains, then its frozen, getting the center orientation back so that the BBOX would be the same as the elongated cubes? (preferabley with y pointing in longest direction of mesh) Ie2 if a cylinders center is moved away and reorinted, and frozen, a way to return the center as close as possible to the orginal orientation?
To see my issue quickly: -get cube, -put display in BBOX -Rotate it -freeze it Now try to get the center orientation back via script.
I can do it manually with ref edges but I have many many objects with centers way off and edgeloops commands are not yet exposed in any version of XSI.
Perhaps first I need to move center to average vertices, and perhaps use edge looping no corners, get top 20 % longest continuos edge loops, collecting the end points and using the average vector as y orientation, or perhaps reorienting a BBOX scaling in to mesh surface by checking for points outside the BBOX, and reorinting until best fit...
Anyways these ideas seem kind of lame. Anyone have a suggestion? Is there an easier way using basic XSI commands?
Thank you, Graham -- ---- ---- ---- ---- ---- -- http://www.grahamdclark.com 2nd hand TD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <META NAME="Generator" CONTENT="MS Exchange Server version 6.0.4630.0"> <TITLE>[Script]reorient center to best fit of BBOX?</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <BR>
<P><FONT SIZE=2 FACE="Arial">Any suggestion for how to reorient center of object to best BBOX fit?</FONT>
<BR><FONT SIZE=2 FACE="Arial">Ie if an elongated cubes points are rotated, center remains, then its frozen, getting the center orientation back so that the BBOX would be the same as the elongated cubes? (preferabley with y pointing in longest direction of mesh)</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Ie2 if a cylinders center is moved away and reorinted, and frozen, a way to return the center as close as possible to the orginal orientation?</FONT></P>
<P><FONT SIZE=2 FACE="Arial">To see my issue quickly:</FONT>
<BR><FONT SIZE=2 FACE="Arial">-get cube,</FONT>
<BR><FONT SIZE=2 FACE="Arial">-put display in BBOX</FONT>
<BR><FONT SIZE=2 FACE="Arial">-Rotate it</FONT>
<BR><FONT SIZE=2 FACE="Arial">-freeze it</FONT>
<BR><FONT SIZE=2 FACE="Arial">Now try to get the center orientation back via script.</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">I can do it manually with ref edges but I have many many objects with centers way off and edgeloops commands are not yet exposed in any version of XSI.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Perhaps first I need to move center to average vertices, and perhaps use edge looping no corners, get top 20 % longest continuos edge loops, collecting the end points and using the average vector as y orientation, or perhaps reorienting a BBOX scaling in to mesh surface by checking for points outside the BBOX, and reorinting until best fit... </FONT>< /P>
<P><FONT SIZE=2 FACE="Arial">Anyways these ideas seem kind of lame. Anyone have a suggestion? Is there an easier way using basic XSI commands?</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">Thank you, Graham</FONT>
<BR><FONT FACE="Times New Roman">-- ---- ---- ---- ---- ---- --</FONT>
<BR><A HREF="http://www.grahamdclark.com"><U><FONT COLOR="#0000FF" FACE="Times New Roman">http://www.grahamdclark.com</FONT></U></A>
<BR><FONT FACE="Times New Roman">2nd hand TD</FONT> </P> <BR>
</BODY> </HTML>
|
|