Point
A point in 3D space. This object lives in the Lua session only. Points are defined by numbers and cannot be defined with expressions. Mathematical operations can be done on points.
Example
-- Create a default 'Point' at (0,0,0) p1 = pf.Point.New() -- Assign values to each component of the point p1.x = 1 p1.y = 1 p1.z = 1 -- Create a 'Point' with number values p2 = pf.Point(2,2,2) -- Determine the distance between two points distance = p1:distanceTo(p2) -- Some of the valid operators for 'Point' p3 = 2 * p1 p4 = p2 * 2 p5 = p2 / 2 p6 = -p2 p7 = p1 + p2 p8 = p1 - p2 if (p1 ~= p2) then print(p1.." is not equal to "..p2) end
Usage locations
The Point object can be accessed from the following locations:
- Properties
- Workplane object has property Origin.
- Edge object has property CentreOfGravity.
- Face object has property CentreOfGravity.
- Region object has property CentreOfGravity.
- MicrostripMeshPort object has property EndPoint.
- MicrostripMeshPort object has property StartPoint.
- MicrostripPort object has property EndPoint.
- MicrostripPort object has property StartPoint.
- NearField object has property RequestPointsAsCartesian.
- Box object has property Corner1.
- Box object has property Corner2.
- Box object has property Centre.
- Static functions
Property List
Method List
- DistanceTo (point Point)
- Returns the distance between this point and another. (Returns a number object.)