PROFILE Object
- Last UpdatedMar 28, 2023
- 7 minute read
Members
|
Name |
Type |
Purpose |
|---|---|---|
|
Position |
POSITION |
Origin of profile. |
|
Orientation |
ORIENTATION |
Orientation of profile plane. |
|
Pointer |
POINTER |
Definition of profile. |
Methods
|
Name |
Result |
Purpose |
|---|---|---|
|
Profile(POSITION, ORIENTATION, ARRAY) |
PROFILE |
Creates a profile object. The input ARRAY is an array of LINEs, ARCs and POSITIONs. Other array member types will be ignored. Array member must be initialized correctly, otherwise it will be ignored. |
|
Profile(DBREF) |
PROFILE |
Creates a profile object from a LOOP, PLOO, PALJ or SPINE. Approximately from a POGO, BOUN, DRAW. 3D linear geometry (SPINE,BOUN, DRAW,PALJ) should be in a single plane. If not, it is projected onto a plane defined by the first few points of the element. |
|
Profile(DBREF1,DBREF2) |
PROFILE |
Creates a profile object from SPRO or SLOO at DBREF1. DBREF2 is the design element referencing the catalog element containing the catalog primitive, thus providing its parameters. |
|
Profile(PROFILE) |
PROFILE |
Creates a profile object which is a copy of the given profile. |
|
Plane() |
PLANE |
Returns the PLANE definition of the profile. This is equivalent to the PLANE method on LINEARGRID object. |
|
IsClosed() |
BOOLEAN |
Returns true if closed. |
|
IsValidClosed |
BOOLEAN |
Returns true if the profile is valid and could be drawn correctly using GML, for example, there are no self-intersecting edges. |
|
Sense() |
BOOLEAN |
True if anti-clockwise (on its plane). Returns error if profile is not closed. |
|
Area() |
REAL |
Internal area of profile. Returns error if profile is not closed. |
|
Length() |
REAL |
Returns the complete length of the profile. |
|
IsCircle() |
BOOLEAN |
Returns true if profile is a full circle. |
|
IsFillet(REAL) |
BOOLEAN |
Returns true if edge specified by REAL argument is a fillet. A fillet must be an arc with a significant angle that is tangentially continuous with its adjacent edges that are lines, or arcs of larger radius. |

PROFILE Object Decomposition and Display Methods
|
Name |
Result |
Purpose |
|---|---|---|
|
edges() |
ARRAY |
Returns array of lines and arcs that define the profile. The direction and sense of the lines and arcs are important. If the profile is a full circle only a single full circle arc is returned regardless of the composition of the profile. |
|
numberEdges() |
REAL |
Returns the number of edges within the profile (= vertices-1). |
|
edge(REAL) |
LINE/ARC |
Returns the profile element at the passed index of the edges array. |
|
dbWrite(DBREF) |
PROFILE |
Populates DBREF with contents of the profile. If any geometry already exists it is replaced with the profile geometry. The geometry stored is that which is appropriate to the database element. The DBREF must be one of LOOP, PLOO, PALJ, SPINE, BOUN, DRAW, POGO. Returns itself unmodified. |
|
The owner of a LOOP or PLOOP is repositioned to fit with the profile. Other geometry is positioned correctly in the frame of reference of its owner or positioned ancestor. Population of catalog geometry is not supported. |
||
|
draw(REAL1, REAL2, REAL3) |
PROFILE |
Draws the profile as a set of aid lines and arcs. REAL1 is the Segment number to draw to. REAL2 sets the style of the segment. REAL3 sets the color of the segment. The drawn graphics can be queried and manipulated using AID geometry functions. LINE and ARC objects also have the .draw method implemented. |
PROFILE Object Transformations and Modification Methods
These methods return a modified version of the profile definition:
|
Name |
Result |
Purpose |
|---|---|---|
|
mirror(LINE) |
PROFILE |
Mirrors the boundary definition about the passed line, when mapped onto the boundary plane. |
|
translate |
PROFILE |
Offsets the boundary definition in the XY of the boundary plane with a shift of x of REAL1, and y of REAL2. |
|
rotate(REAL, POSITION) |
PROFILE |
Rotates the boundary definition about the POSITION by the given angle. Angles are anti-clockwise about the Z axes of the boundary plane. |
|
close() |
PROFILE |
Closes the profile with an additional edge (if necessary). If ends are within a tolerance, the end point is adjusted. |
|
reverse() |
PROFILE |
Reverses the sense of the profile and the order of the edges. |
|
mergearcs(REAL1, REAL2) |
PROFILE |
Merges concentric contiguous arcs into one up to a maximum arc angle of REAL1 degrees according to tolerance REAL2. Mergearcs() will remove concentric back tracks in the profile as well. |
|
mergearcs() |
PROFILE |
Merges concentric contiguous arcs into one. |
|
mergelines(REAL) |
PROFILE |
Merges co-linear contiguous lines into one according to tolerance supplied. Mergelines() will remove co-linear backtracks in the profile as well. |
|
mergelines() |
PROFILE |
Merges co-linear contiguous lines into one. |
|
mergepoints(REAL) |
PROFILE |
Removes coincident consecutive points according to tolerance supplied. |
|
mergepoints() |
PROFILE |
Removes coincident consecutive points. |
|
polyline(REAL) |
PROFILE |
Replaces arcs with a chordal approximation to the tolerance supplied. |
|
polyline() |
PROFILE |
Replaces arcs with a chordal approximation. |
|
projectArcs(REAL) |
PROFILE |
Removes all the arcs from the definition, only leaving the straight-line edges. Arcs with angles less than the supplied argument are ignored. Arcs that are removed are replaced by projected tangents meeting at the polar position of the arc. Arcs with angles approaching 180 degrees are split in half. |

PROFILE Object Methods that Query Position Relationships
These methods map the passed positions onto the profile plane, then use the resulting position to determine the result returned:
|
Name |
Result |
Purpose |
|---|---|---|
|
Near(POSITION) |
POSITION |
Returns the nearest position on the profile to the given position projected onto the profile plane. |
|
Near(REAL,POSITION) |
POSITION |
The REAL argument is an index to an edge in the Profile. Returns the nearest point on this edge to the POSITION supplied. This is the same as .near (POSITION) but restricted to a single edge. |
|
NearEdges(POSITION) |
ARRAY |
Returns array of edge indices of the nearest edges to the given POSITION. The returned edges may be any in the profile. Edges will be consecutive if nearest point is a vertex. |
|
IsWithin(POSITION) |
BOOLEAN |
Returns TRUE if the position (when mapped on to the profile plane) lies inside the profile. The profile must be closed. |
|
IsWithout(POSITION) |
BOOLEAN |
Returns TRUE if the position (when mapped on to the profile plane) lies outside the profile. The profile must be closed. |
|
OnProfile(POSITION) |
BOOLEAN |
Returns TRUE if the position (mapped onto the profile plane) lies on the profile geometry. |

PROFILE Object Methods that Query Profile to Profile Relationships
These methods are used to check the relationship between PROFILEs.
|
Name |
Result |
Purpose |
|---|---|---|
|
IsWithin(PROFILE) |
BOOLEAN |
True if the supplied profile lies wholly within the profile the object. Both profiles must be closed. |
|
IsWithout(PROFILE) |
BOOLEAN |
True if the supplied profile lies completely outside the profile object. Both profiles must be closed. |
|
IsIntersecting(PROFILE) |
BOOLEAN |
True if the supplied profile intersects the profile object. Both profiles must be closed. |
PROFILE Object Intersection Methods
These methods return an array of results that define the intersection between an object and the profile. Note that if an intersection point occurs exactly at the junction of two spans of the profile, then two identical intersection points will occur in the array.
|
Name |
Result |
Purpose |
|---|---|---|
|
intersections |
ARRAY OF POINTS |
Returns an array of points that are positions where the line (or the projection of the line into the plane of the profile) intersects the profile. All points on the extended infinite line are returned. |
|
intersections(ARC) |
ARRAY OF POINTS |
Returns an array of points that are positions where the arc (or the projection of the arc into the plane of the profile) intersects the profile. The plane of the arc must be parallel with the plane of the profile otherwise an error will occur. The points are anywhere on the circle of the arc (and not limited to be between start and end). |
|
intersections(PROFILE) |
ARRAY OF POINTS |
Returns an array of points which are positions where the two profiles intersect. The two profiles must be parallel (or anti-parallel) to each other. |

PROFILE Object Methods that Return New PROFILEs
These methods each return an array of new profiles. The new profiles are all created in he same sense as the profile object, except that ‘holes’ are in the opposite sense. The profiles must lie on the same plane in space, but not necessarily having identical positions and orientations.
|
Name |
Result |
Purpose |
|---|---|---|
|
intersect(PROFILE) |
ARRAY OF PROFILES |
Returns array of the resultant intersection profiles. |
|
union(PROFILE) |
ARRAY OF PROFILES |
Returns the union of the two profiles. Holes are returned as separate profiles (in reverse direction). |
|
difference(PROFILE) |
ARRAY OF PROFILES |
Returns the difference of the passed profile against the profile definition. |
|
split(LINE) |
ARRAY OF PROFILES |
Returns the resultant profiles from projecting the passed line onto the profile and splitting about that line. |
|
split(PLANE, BOOLEAN) |
ARRAY OF PROFILES |
Returns the resultant boundaries from splitting the profile on the line at the intersection of the passed plane and the profile plane. The side is specified by the supplied BOOLEAN. If it is TRUE then only profiles in the direction of the normal to the passed plane are created. If side is FALSE, only those in the direction of the anti-normal. |
