Difference between revisions of "VS:Projection"

From Vectorworks Developer
Jump to: navigation, search
m (fix typos)
(add projection type flags)
Line 55: Line 55:
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<remark>
 
<remark>
 +
([[User:Orso.b.schmid|Orso]], 2015.02.24): The projection type flags:
 +
* 0 = Orthogonal
 +
* 1 = Perspective;
 +
* 2 = Cavalier Oblique 45
 +
* 3 = Cavalier Oblique 30
 +
* 4 = Cabinet Oblique 45
 +
* 5 = Cabinet Oblique 30
 +
* 6 = Plan
 +
 
([[User:Orso.b.schmid|Orso]], 2014.08.18): From John Kerr, with many thanks!
 
([[User:Orso.b.schmid|Orso]], 2014.08.18): From John Kerr, with many thanks!
 
[[File:PerspDistance.png| cente| Diagram of the perspective distance]]
 
[[File:PerspDistance.png| cente| Diagram of the perspective distance]]
  
 +
 +
([[User:Orso.b.schmid|Orso]], 2014.08.18): this below has lost the author during one of the wiki updates:
  
 
from somebody on the VS list:
 
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.
+
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...
 
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...
Line 66: Line 81:
 
viewDistance-&gt;equals-&gt;Set Perspective
 
viewDistance-&gt;equals-&gt;Set Perspective
  
800'->200
+
* 800'->200
400'->100
+
* 400'->100
100'->25
+
* 100'->25
 
etc.
 
etc.
  
 
So perspective is 1/4 of viewDistance in feet. But perspective seems unit-less. It gets curiouser and curiouser!
 
So perspective is 1/4 of viewDistance in feet. But perspective seems unit-less. It gets curiouser and curiouser!
  
From Julian: Try this:
+
From Julian Carr: Try this:
  
 
Projection(1, 0, 9.76 * UPI * LayerScale, dwgleft, dwgtop, dwgright, dwgbottom);
 
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.</remark>
+
It has to be in real world inches, but has been discussed before. Try searching the archives.
 +
 
 +
</remark>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------

Revision as of 03:41, 25 February 2015

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

Description

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

Parameters

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.

Remarks

(Orso, 2015.02.24): The projection type flags:
  • 0 = Orthogonal
  • 1 = Perspective;
  • 2 = Cavalier Oblique 45
  • 3 = Cavalier Oblique 30
  • 4 = Cabinet Oblique 45
  • 5 = Cabinet Oblique 30
  • 6 = Plan

(Orso, 2014.08.18): From John Kerr, with many thanks! Diagram of the perspective distance


(Orso, 2014.08.18): this below has lost the author during one of the wiki updates:

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 Carr: 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.

Example

VectorScript

Projection(1,2,3',-2,-2,2,2);

Python


Version

Availability: from MiniCAD 4.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox