From Vectorworks Developer
Revision as of 14:13, 18 August 2014 by Orso.b.schmid (Talk | contribs)

Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix


Procedure Projection sets the projection mode of a VectorWorks document.

Parameters viewDistance, clip1, and clip2 are used only in perspective projection mode.

PROCEDURE Projection(
proj  :INTEGER;
rMode  :INTEGER;
viewDistance  :REAL;
clip1X,clip1Y  :REAL;
clip2X,clip2Y  :REAL);
def vs.Projection(proj, rMode, viewDistance, clip1, clip2):
    return None


proj INTEGER Projection mode of document.
rMode INTEGER Render mode of document.
viewDistance REAL View length.
clip1 REAL Top left coordinate of clipping rectangle.
clip2 REAL Bottom right coordinate of clipping rectangle.


(Orso, 2014.08.18): From John Kerr, with many thanks!

Diagram of the perspective distance

from somebody on the VS list: I made some tests with the following results: When I use the setting 'low perspective' (don't know the correct expression in english, sorry), it's the same as entering 24.41 for 'set perspective'. 'normal' is the same as 9.76 and high the same as 4.88. With Projection, proj = 1, the perspective is always set to 9.76. And what I enter for viewDistance is substracted from this value. (Control: GetView:offsetZ = 9.76 - Projection:viewDistance). Procedure SetView:zDistance = 50, for example in perspective projection mode is the same as Projection:viewDistance = -40.24. I don't know if there are other circumstances influencing this results.

From another user: The viewDistance in the projection command is directly related to the Set Perspective menu command, though oddly, it uses a different scale. It'd be interesting to know the reasoning on that one! In my experiments...

viewDistance->equals->Set Perspective

800'->200 400'->100 100'->25 etc.

So perspective is 1/4 of viewDistance in feet. But perspective seems unit-less. It gets curiouser and curiouser!

From Julian: Try this:

Projection(1, 0, 9.76 * UPI * LayerScale, dwgleft, dwgtop, dwgright, dwgbottom);

It has to be in real world inches, but has been discussed before. Try searching the archives.






Availability: from MiniCAD 4.0
Personal tools

Advanced Search
See Also