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

Description

Functions

json WSM.Plane.Plane (arg1, arg2, arg3)
 
json WSM.Plane.FromPoints (points, checkPlanarity)
 Returns a plane from the given set of coplanar points. More...
 
json WSM.Plane.FromPointsUsingThreeNoncollinearPnts (points, checkPlanarity, tolerance, tryAgain)
 Returns a plane from the first three non-collinear points of a vector of points resultStatus: can be 0, -1, -2. More...
 
json WSM.Plane.Negate (plane)
 Returns a plane that points in the opposite direction Parameters: In: WSM.Plane Out: WSM.Plane. More...
 
json WSM.Plane.Distance (plane, point)
 Returns the perpendicular distance of a point from a plane Parameters: In: WSM.Plane, WSM.Point3d Out: double. More...
 
json WSM.Plane.Project (plane, geomObject)
 
json WSM.Plane.OffsetByDistance (plane, distance)
 Returns a plane that is offset by a distance from a given plane Parameters: In: WSM.Plane, double Out: WSM.Plane. More...
 
json WSM.Plane.IntersectsInPoint (plane, line)
 Returns the intersection point of a plane and line. More...
 
json WSM.Plane.IntersectsInLine (plane1, plane2)
 Returns the intersection line of two planes. More...
 
json WSM.Plane.IsValid (plane)
 
json WSM.Plane.AreEqual (plane1, plane2, distanceTolerance, angleTolerance)
 
json WSM.Plane.AreEquivalent (plane1, plane2, distanceTolerance, angleTolerance)
 Returns true if two planes are equal within a given distance and angle tolerance, with possibly reversed normals Parameters: In: WSM.Plane In: WSM.Plane In: double In: double Out: bool. More...
 
json WSM.Plane.PointLiesOnNegativeSide (plane, point, tolerance)
 Returns true if a point lies on the plane or the negative side of the plane, using the given tolerance Parameters: In: WSM.Plane In: WSM.Point3d In: double Out: bool. More...
 
json WSM.Plane.IntervalIntersectsNegativeSide (plane, interval, tolerance)
 Returns true if the interval intersects the negative side of the plane, using the given tolerance Parameters: In: WSM.Plane In: WSM.Interval3d In: double Out: bool. More...
 
json WSM.Plane.IntervalLiesOnNegativeSide (plane, interval, tolerance)
 Returns true if the interval lies on the negative side of the plane, using the given tolerance Parameters: In: WSM.Plane In: WSM.Interval3d In: double Out: bool. More...
 

Function Documentation

json WSM.Plane.AreEqual ( plane1  ,
plane2  ,
distanceTolerance  ,
angleTolerance   
)
json WSM.Plane.AreEquivalent ( plane1  ,
plane2  ,
distanceTolerance  ,
angleTolerance   
)

Returns true if two planes are equal within a given distance and angle tolerance, with possibly reversed normals Parameters: In: WSM.Plane In: WSM.Plane In: double In: double Out: bool.

Parameters
[in]plane1WSM.Plane
[in]plane2WSM.Plane
[in]distanceTolerance(OPTIONAL, default = WSM_DISTANCE_TOL) double
[in]angleTolerance(OPTIONAL, default = WSM_ANGLE_TOL2) double
Returns
plane1.isEquivalent(plane2, distanceTolerance, angleTolerance)
json WSM.Plane.Distance ( plane  ,
point   
)

Returns the perpendicular distance of a point from a plane Parameters: In: WSM.Plane, WSM.Point3d Out: double.

Parameters
[in]planeWSM.Plane
[in]pointWSM.Point3d
Returns
plane.dist(point)
json WSM.Plane.FromPoints ( points  ,
checkPlanarity   
)

Returns a plane from the given set of coplanar points.

Returns a null plane if the points do not define a plane. Unlike the Plane constructor that takes a closed polygon, the set of points here is just any set of points and the method tries to do some kind of a best fit plane from them Parameters: In: std.vector<WSM.Point3d> In: bool Out: WSM.Plane

Parameters
[in]pointsArray of WSM.Point3d
[in]checkPlanaritybool
Returns
WSM.Plane.fromPoints(points.data(), points.size(), checkPlanarity)
json WSM.Plane.FromPointsUsingThreeNoncollinearPnts ( points  ,
checkPlanarity  ,
tolerance  ,
tryAgain   
)

Returns a plane from the first three non-collinear points of a vector of points resultStatus: can be 0, -1, -2.

0: succeeds to find the plane constructed by three non-collinear points;-1: fails to find 3 non-collinear points; -2: fails to satisfy the planarity. tolerance is the tolerance use to check if the points are collinear and planar. If tryAgain is true, on failure tries again using points more optimal then the first three non-collinear points. Parameters: In: std.vector<WSM.Point3d> In: bool In: double In: bool Out: "resultStatus" int, "plane" WSM.Plane

Parameters
[in]pointsArray of WSM.Point3d
[in]checkPlanaritybool
[in]tolerance(OPTIONAL, default = WSM_DISTANCE_TOL) double
[in]tryAgain(OPTIONAL, default = false) bool
Returns
{ { "resultStatus" , to_json(resultStatus)}, { "plane" , to_json(plane)} };
json WSM.Plane.IntersectsInLine ( plane1  ,
plane2   
)

Returns the intersection line of two planes.

Returns true if the planes intersect in a line. Returns the line if true. Parameters: In: WSM.Plane In: WSM.Plane Out: "success" bool, "intersectionLine" WSM.Line3d

Parameters
[in]plane1WSM.Plane
[in]plane2WSM.Plane
Returns
{ { "success" , to_json(result)}, { "intersectionLine" , to_json(line)} };
json WSM.Plane.IntersectsInPoint ( plane  ,
line   
)

Returns the intersection point of a plane and line.

Returns true if the plane and line intersect in a single point. Returns the parameter of intersection if true. Note when the line and the plane are coincident, the origin point of the line is returned. Parameters: In: WSM.Plane In: WSM.Line3d Out: "success" bool, "intersectionPoint" WSM.Point3d, "parameter" double

Parameters
[in]planeWSM.Plane
[in]lineWSM.Line3d
Returns
{ { "success" , to_json(result)}, { "intersectionPoint" , to_json(intPt)}, { "parameter" , to_json(param)} };
json WSM.Plane.IntervalIntersectsNegativeSide ( plane  ,
interval  ,
tolerance   
)

Returns true if the interval intersects the negative side of the plane, using the given tolerance Parameters: In: WSM.Plane In: WSM.Interval3d In: double Out: bool.

Parameters
[in]planeWSM.Plane
[in]intervalWSM.Interval3d
[in]tolerance(OPTIONAL, default = WSM_DISTANCE_TOL) double
Returns
plane.boxIntersectsNegativeSide(interval, tolerance)
json WSM.Plane.IntervalLiesOnNegativeSide ( plane  ,
interval  ,
tolerance   
)

Returns true if the interval lies on the negative side of the plane, using the given tolerance Parameters: In: WSM.Plane In: WSM.Interval3d In: double Out: bool.

Parameters
[in]planeWSM.Plane
[in]intervalWSM.Interval3d
[in]tolerance(OPTIONAL, default = WSM_DISTANCE_TOL) double
Returns
plane.boxLiesOnNegativeSide(interval, tolerance)
json WSM.Plane.IsValid ( plane  )
json WSM.Plane.Negate ( plane  )

Returns a plane that points in the opposite direction Parameters: In: WSM.Plane Out: WSM.Plane.

Parameters
[in]planeWSM.Plane
Returns
-plane
json WSM.Plane.OffsetByDistance ( plane  ,
distance   
)

Returns a plane that is offset by a distance from a given plane Parameters: In: WSM.Plane, double Out: WSM.Plane.

Parameters
[in]planeWSM.Plane
[in]distancedouble
Returns
plane
json WSM.Plane.Plane ( arg1  ,
arg2  ,
arg3   
)
json WSM.Plane.PointLiesOnNegativeSide ( plane  ,
point  ,
tolerance   
)

Returns true if a point lies on the plane or the negative side of the plane, using the given tolerance Parameters: In: WSM.Plane In: WSM.Point3d In: double Out: bool.

Parameters
[in]planeWSM.Plane
[in]pointWSM.Point3d
[in]tolerance(OPTIONAL, default = WSM_DISTANCE_TOL) double
Returns
plane.pointIntersectsNegativeSide(point, tolerance)
json WSM.Plane.Project ( plane  ,
geomObject   
)