Trouble with getting global vertex positions I am working on a siding generator script and I have most of it done, but I am having some trouble with one of the features. You can use a plane as a template object, and the script gets its position and rotation and tries to figure out the smallest "x" and "z" values. That way it can place the siding object at that position. It has to use the smallest numbers because the siding builds to the right and up. Here is the .blend file, and here is the addon.

Steps to problem:
Install Addon > Select Plane > Add Siding > Click "From Object", note how position is correct. Delete Siding > Rotate Plane 90 degree on z > Add Siding, note how it is not at 0.0 on z

EDIT: the lines in question begin around line 1564
A while back I created a script to create a bounding box around a selection of objects. To get the min and max values I used the following code -

minx, miny, minz = (999999.0,)*3
maxx, maxy, maxz = (-999999.0,)*3
for obj in context.selected_objects:
    for v in obj.bound_box:
        v_world = obj.matrix_world * mathutils.Vector((v[0],v[1],v[2]))

        if v_world[0] &lt; minx:
            minx = v_world[0]
        if v_world[0] &gt; maxx:
            maxx = v_world[0]

        if v_world[1] &lt; miny:
            miny = v_world[1]
        if v_world[1] &gt; maxy:
            maxy = v_world[1]

        if v_world[2] &lt; minz:
            minz = v_world[2]
        if v_world[2] &gt; maxz:
            maxz = v_world[2]