FormIt Plugin API  v23.0.0 (2023.0.0)
WSM.Line3d API

Description

Functions

json WSM.Line3d.Line3d (point, pointOrVector)
 
json WSM.Line3d.Distance (line, point)
 
json WSM.Line3d.Project (line, point)
 
json WSM.Line3d.Intersect (line1, line2, tolerance)
 Returns the intersection point of two lines. More...
 
json WSM.Line3d.IntersectWithParameters (line1, line2, tolerance)
 Returns the intersection point of two lines. More...
 
json WSM.Line3d.GetParameter (line, point)
 Returns the parameter of the nearest point on the line In: WSM.Line3d In: WSM.Point3d Out: double. More...
 
json WSM.Line3d.GetPointFromParameter (line, parameter)
 Returns the point on a line from the given parameter In: WSM.Line3d In: double Out: WSM.Point3d. More...
 
json WSM.Line3d.AreEqual (line1, line2)
 
json WSM.Line3d.IsValid (line)
 
json WSM.Line3d.AreCoincident (line1, line2, sameDirectionAlso, tolerance)
 Coincident lines are such lines whose vectors are parallel and for which the root point of one line lies on the other line and vice versa. More...
 
json WSM.Line3d.Null ()
 Returns a zero length line with the point at the origin Out: WSM.Line3d. More...
 
json WSM.Line3d.XAxis ()
 Returns a line in the x direction with length 1 and with the point at the origin Out: WSM.Line3d. More...
 
json WSM.Line3d.YAxis ()
 Returns a line in the y direction with length 1 and with the point at the origin Out: WSM.Line3d. More...
 
json WSM.Line3d.ZAxis ()
 Returns a line in the z direction with length 1 and with the point at the origin Out: WSM.Line3d. More...
 

Function Documentation

json WSM.Line3d.AreCoincident ( line1  ,
line2  ,
sameDirectionAlso  ,
tolerance   
)

Coincident lines are such lines whose vectors are parallel and for which the root point of one line lies on the other line and vice versa.

If sameDirectionAlso is true, the vectors of the two lines must also go in the same direction, they must not be antiparallel. tolerance is the tolerance for distance between the lines. In: WSM.Line3d In: WSM.Line3d In: bool In: double Out: bool

Parameters
[in]line1WSM.Line3d
[in]line2WSM.Line3d
[in]sameDirectionAlsobool
[in]tolerance(OPTIONAL, default = WSM_DISTANCE_TOL) double
Returns
line1.isCoincident(line2, sameDirectionAlso, tolerance)
json WSM.Line3d.AreEqual ( line1  ,
line2   
)
json WSM.Line3d.Distance ( line  ,
point   
)
json WSM.Line3d.GetParameter ( line  ,
point   
)

Returns the parameter of the nearest point on the line In: WSM.Line3d In: WSM.Point3d Out: double.

Parameters
[in]lineWSM.Line3d
[in]pointWSM.Point3d
Returns
{...}
json WSM.Line3d.GetPointFromParameter ( line  ,
parameter   
)

Returns the point on a line from the given parameter In: WSM.Line3d In: double Out: WSM.Point3d.

Parameters
[in]lineWSM.Line3d
[in]parameterdouble
Returns
{...}
json WSM.Line3d.Intersect ( line1  ,
line2  ,
tolerance   
)

Returns the intersection point of two lines.

The tolerance argument determines how far apart the lines can be in 3d space to qualify as having an intersection. The returned point is on line1, if the two lines are spatially separated. Returns false, if the two lines don't intersect within the tolerance or are parallel. In: WSM.Line3d In: WSM.Line3d In: double Out: "success" bool, "intersectionPoint" WSM.Point3d

Parameters
[in]line1WSM.Line3d
[in]line2WSM.Line3d
[in]tolerance(OPTIONAL, default = WSM_DISTANCE_TOL) double
Returns
{ { "success" , to_json(result)}, { "intersectionPoint" , to_json(intPoint)} };
json WSM.Line3d.IntersectWithParameters ( line1  ,
line2  ,
tolerance   
)

Returns the intersection point of two lines.

The tolerance argument determines how far apart the lines can be in 3d space to qualify as having an intersection. The returned point is on line1, if the two lines are spatially separated. Returns the parameter of the intersection point on each line. Returns false, if the two lines don't intersect within the tolerance or are parallel. In: WSM.Line3d In: WSM.Line3d In: double Out: "success" bool, "parameter1" double, "parameters2" double ,"intersectionPoint" WSM.Point3d

Parameters
[in]line1WSM.Line3d
[in]line2WSM.Line3d
[in]tolerance(OPTIONAL, default = WSM_DISTANCE_TOL) double
Returns
{ { "success" , to_json(result)}, { "parameter1" , to_json(param1)}, { "parameter2" , to_json(param2)}, { "intersectionPoint" , to_json(intPoint)} };
json WSM.Line3d.IsValid ( line  )
json WSM.Line3d.Line3d ( point  ,
pointOrVector   
)
json WSM.Line3d.Null ( )

Returns a zero length line with the point at the origin Out: WSM.Line3d.

Returns
{...}
json WSM.Line3d.Project ( line  ,
point   
)
json WSM.Line3d.XAxis ( )

Returns a line in the x direction with length 1 and with the point at the origin Out: WSM.Line3d.

Returns
{...}
json WSM.Line3d.YAxis ( )

Returns a line in the y direction with length 1 and with the point at the origin Out: WSM.Line3d.

Returns
{...}
json WSM.Line3d.ZAxis ( )

Returns a line in the z direction with length 1 and with the point at the origin Out: WSM.Line3d.

Returns
{...}