Open GoogleCodeExporter opened 8 years ago
I was working a little on having sketches be in different coordinate systems.
There
are several problems with it. One of them is the need for this aligning the
view to
the coordinate system. Another is that we need the grippers to be projected
onto a
plane. I think the best way to do this is to have a global matrix for the
coordinate
system. Like m_current_coordinate_system or something. This will be a matrix
that
maps the regular plane onto the world coordinate system. So the plane is
assumed to
be at 0,0,0, with x vector 1,0,0, y vector 0,1,0, and z_vector 0,0,1. The final
problem is with actually figuring out what this matrix is. Simply using the
coordinate system of the sketch is not good enough because the sketch could be
on the
face of a solid with its own transformation, that is part of a part with its own
transformation, that is in an assembly and so on. This is even worse if you
consider
multiple references to the same object.
I think the place to do this is with the glPick code. Right now the glName is
just a
heeks object. But it should be a tuple of the object and the current view
matrix.
This gives a unique name for each instance of an object. Then this view matrix
can be
multiplied by the inverse of the heekscad view matrix, ie which angle and zoom
we are
looking at it with, to yield the transformation for the plane.
This should work out of the box for solids and everything. The projecting on a
plane
part should probably not project onto the plane. But the grippers should still
be
transformed by this matrix.
Original comment by jonpry@gmail.com
on 14 Oct 2009 at 8:08
Original issue reported on code.google.com by
danhe...@gmail.com
on 14 Oct 2009 at 6:48