Maths help needed - orient camera to face normal

Hi,

I’m trying to use Blender as a CAD program to design a model hovercraft. I’m working out the structure in Blender, then using the vertex values to draw the sections in Illustrator. These are printed out and used as plans to cut balsa and foamboard.

Sections (faces) that are parallel to an axis are easy to draw as they are effectively 2d (discounting the axis the points are parallel to).

The problem I’m having is converting faces (which not parallel to an axis) to a 2d representation.

I though that if I could orientate the camera along the normal of a face I would effectively be getting a 2d view of the face.

My questions are:

  1. How can I rotate a camera to match a face normal?

  2. How can I rotate a coplanar quad (eg below) to make the values of one axis the same?


      X         Y         Z
1   -8.37      -2.5      1.7
2   -5.87      -5.0      1.7
3  -11.73     -10.2     -1.3
4  -16.83      -5.1     -1.3

  1. Is there an easier way to do this?

Thanks
Stephen

To align the camera with a face normal:

In Edit mode, select the appropriate face and Shift-V. Align View to Selected (Top). Then Ctrl-Alt-Num0 to align the camera with this view.

I’ll try to get back to you on the second question later.

  1. How can I rotate a coplanar quad (eg below) to make the values of one axis the same?

I’m not sure if this is quite what you want, as this method will distort geometry, but you can:

Select your quad and switch to a view orthogonal to the axis you want to collapse (say the Y axis; you would use numpad 7 for Top view). Then S, Y, 0 (top-row zero key) to scale to zero along that axis.

Hi,

Thanks for the reply. I’m trying not to distort the face shape as I want to cut it out of balsa for a model.

I’m currently using the UV unwrapper (LSCM Method) to view the face in the UV/Image Editor. I can then get the 2d face coordinates, which just need to be scaled to get the correct x,y values which I can use to draw the face in Illustrator.

Hi,

Thanks CD38 that worked perfectly!

http://img.photobucket.com/albums/v327/BlendedRacer/Cam2Face.jpg

Probably not what you’re looking for, since your problem seems to be already solved, but your topic reminded me of this:
https://blenderartists.org/forum/viewtopic.php?t=35223&highlight=plane+projector
If you go to reD_Fox’s list you will find the scripts. Funny thing is that the second version doesn’t seem to work with the latest Blender release, but the first version does.
Also, I wonder what happened to reD_Fox? The offset script seems to be pretty useful, but I can’t get it to work. Would be nice if he continued that one, too…

Numpad * key, Ctrl+Numpad INS(0), switch your camera to ortho.

That’s how I’d do it.

There is also a flatten face group script you might find useful hanging around the python forum. There is also a script of making paper models somewhere around here. But thats if you need to know how to unfold an object.