Notifications
Clear all

[Closed] Slice a poly using custom matrix

I want to slice a single polygon that is rotated and has its xform reset.
Is it possible to slice using a custom matrix at all?

      What i hoped would work was something like this:
m = matrixFromNormal (polyop.getfaceNormal $ 1)
          in coordsys m $.slice [0,1,0] [0,$.max.y-100,0]
  or polyop:
r = ray ($.max-[180,0,0]) [1,0,0]
      polyop.slice $ 1 r 

On another note, why do in coordsys local abs($.max.x-$.min.x) change as you rotate $ around z? I really thought it was linked to the boundingbox, not to an invisible world aligned bbox.

  any pointers?
   i'm getting so many inconsistent results i think i've lost 1/3 of my brain on this...
3 Replies

Why would’nt the bounding box change??

Do An EXPERIMENT:

go to the top view,
Draw a box which will be rectangular or square.
Draw a rectangle by snapping to its edges.
in perspective view without moving the rectangle, rotate the box around its Z Axis.
Go to the top view again
and notice what you see…
The Box now intersects with the edges of the rectangle…
hence the min and max values change…

For the 1st problem,
Read this thread:
http://forums.cgsociety.org/showthread.php?f=98&t=1005638

May be this is what would help you!!!

Because i’ve always been under the impression that when using in local context, you would get the measures from the objects local matrix, not worldmatrix.

Thanks, but i don’t quite see that it’s the same thing in that thread.