VS:Distance3D: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
No edit summary
Line 5: Line 5:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<desc>
<desc>
Returns the 3D distance between two points. Same as Norm.
Returns the 3D distance between two points. Same as Norm.</desc>
</desc>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<def>
<def>
<funcDef lang="vs">
<funcDef lang="vs">
FUNCTION Distance3D(x1 :REAL; y1 :REAL; z1 :REAL; x2 :REAL; y2 :REAL; z2 :REAL) :REAL;
FUNCTION Distance3D(x1:REAL; y1:REAL; z1:REAL; x2:REAL; y2:REAL; z2:REAL) : REAL;
</funcDef>
</funcDef>
<funcDef lang="py">
<funcDef lang="py">
Line 54: Line 53:
</lineList>
</lineList>
</params>
</params>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<return>
<remark></remark>
</return>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>
<sample></sample>
 
</remark>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<sample>
<seeAlso></seeAlso>
<code lang="pas">
PROCEDURE Example;
VAR
  x1, y1, z1, x2, y2, z2, dist :REAL;
BEGIN
  PtDialog3D('Enter 1st point', '1', '1', '1', x1, y1, z1);
  PtDialog3D('Enter 2nd point', '2', '2', '2', x2, y2, z2);
  dist := Distance3D(x1, y1, z1, x2, y2, z2);
  AlrtDialog(Concat('{',x1,',',y1,',',z1,'} ~ {',x2,',',y2,',',z2,'} = ', dist));
END;
RUN(Example);</code>
 
</sample>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<version>
<version>
Availability: from All Versions
Availability: from Vectorworks 2014


This is drop-in function.
</version>
</version>
-----------------------------------------------------------------------------------------------------------
<seeAlso>
</seeAlso>


</vwDoc>
</vwDoc>

Revision as of 17:35, 18 September 2013

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

Description

Returns the 3D distance between two points. Same as Norm.

FUNCTION Distance3D(
x1 :REAL;
y1 :REAL;
z1 :REAL;
x2 :REAL;
y2 :REAL;
z2 :REAL) : REAL;
def vs.Distance3D(x1, y1, z1, x2, y2, z2):
    return REAL

Parameters

x1 REAL
y1 REAL
z1 REAL
x2 REAL
y2 REAL
z2 REAL

Version

Availability: from Vectorworks 2014