Module fmeobjects :: Class FMEArc
[hide private]
[frames] | no frames]

Class FMEArc

 object --+            
          |            
FMEGeometry --+        
              |        
       FMECurve --+    
                  |    
         FMESegment --+
                      |
                     FMEArc

init(MultipleInvocations)

Create an instance of an Arc geometry object.

init(threePoints)

Creates an arc using the 3 points contained in the tuple. If startPoint and endPoint (threePoints[0] and threePoints[2]) and are equal, then the arc will be coincident with the circle whose center point is midway between startPoint and midpoint (threePoints[0] and threePoints[1]).

Parameters

Returns: FMEArc

init(twoPoints, bulge)

Creates an arc using the 2 points contained in the tuple, and the supplied 'bulge' value. All angles are CCW up from the horizontal, and are measured in degrees.

Parameters

Returns: FMEArc

init(centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle)

Creates an arc using the center point supplied, along with the supplied radii and angles. Measures on the center point will be ignored. All angles are CCW up from the horizontal, and are measured in degrees.

Parameters

Returns: FMEArc

init(centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle, startPoint, endPoint)

Creates an arc using the center point supplied, along with the supplied radii, angles, and points. All angles are CCW up from the horizontal, and are measured in degrees.

Parameters

Returns: FMEArc

init(twoPoints, radius, counterClockwise)

Creates an arc using the 2 points contained in the tuple, and the supplied 'radius' and points. startPoint and endPoint (twoPoints[0] and twoPoints[1]) must not be None.

Parameters

Returns: FMEArc

init(arc)

Create a copy of the passed in Arc geometry object.

Parameters

Returns: FMEArc

Instance Methods [hide private]
 
__init__(MultipleInvocations)
x.__init__(...) initializes x; see help(type(x)) for signature
FMEPath
bisectArc()
Returns an equivalent path consisting of two smaller arcs.
None
convertToArcBy3Points()
Converts to an arc by 3 points.
None
convertToArcByBulge()
Converts to an arc by bulge.
None
convertToArcByCenterPoint()
Converts to an arc by center point.
float
getBulge()
Returns the bulge value.
FMEPoint
getCenterPoint()
Returns the center point of the arc.
tuple of floats
getMeasureValues(as3Points, measureName)
Return the values of the measure named by 'measureName', otherwise returns the values of the defaut measure.
FMEPoint
getMidPoint()
Returns mid point, which will be interpolated halfway along the arc if the underlying storage is not by 3 points.
float
getPrimaryRadius()
Returns the primary radius of the arc.
tuple of FMEPoints
getPropertiesAs3Points()
Returns the arc geometry as a tuple of three points.
tuple of FMEPoints and floats
getPropertiesAsBulge()
Returns the arc geometry as a tuple of two points and a bulge value.
tuple of FMEPoints and floats
getPropertiesAsCentered(withEnds)
Returns the arc properties.
float
getRotation()
Returns the rotation of the arc.
float
getSecondaryRadius()
Returns the secondary radius of the arc.
float
getStartAngle()
All angles are CCW up from the horizontal.
float
getSweepAngle()
All angles are CCW up from the horizontal.
bool
hasExplicitEndpoints()
This returns True if the arc's end points have been explicitly set, and False otherwise.
bool
isCW()
This returns True if the arc is clockwise, or False otherwise.
bool
isCircular()
This returns True if the arc's primary and secondary radii are the same length, and False otherwise.
int
optimalArcTypeRetrieval()
Returns the arc type whose parameters that define the arc can be retrieved most efficiently and accurately.
None
setCenterPoint(centerPoint)
Sets the center point of the arc.
None
setMeasureValues(as3Points, measureTuple, measureName)
This assigns the values given in the tuple 'measureTuple' to the default measure, or the measure named by 'measureName' if given.
None
setMidPoint(midPoint)
Sets the midpoint of the arc.
None
setPrimaryRadius(primaryRadius)
Sets the primary radius of the arc.
None
setRotation(rotation)
Sets the rotation of the arc.
None
setSecondaryRadius(secondaryRadius)
Sets the secondary radius of the arc.
None
setStartAngle(startAngle)
Sets the start angle of the arc, measured counter-clockwise up from the horizontal.
None
setSweepAngle(sweepAngle)
Sets the sweep angle of the arc, measured counter-clockwise up from the horizontal.

Inherited from FMECurve: getAsLine, getAsLineFixedArcSamples, getEndPoint, getLength, getStartPoint, isClosed, isLinear, offset, removeDuplicates, removeMeasure, reverse, rotate2D, scale, setEndPoint, setStartPoint, snip, snipByPoints

Inherited from FMEGeometry: __getObject__, __new__, boundingBox, boundingCube, bounds, clearMeasures, copyAttributesFromFeature, copyNameFromGeometry, copyTraitsFromGeometry, copyTraitsToFeature, deleteName, force2D, force3D, getArea, getMeasureNames, getName, getTrait, getTraitNames, getTraitNullMissingAndType, getTraitType, hasMeasures, hasName, is3D, isCollection, measureExists, removeTraits, renameMeasure, setName, setTrait, setTraitNullWithType

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(MultipleInvocations)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

bisectArc()

 

Returns an equivalent path consisting of two smaller arcs. These two arcs do not necessarily have equal length.

Returns: FMEPath
An equivalent path consisting of two smaller arcs.

convertToArcBy3Points()

 

Converts to an arc by 3 points. If the arc is not circular (isCircular() returns False), then the arc cannot be converted to arc by 3 points, and an error is returned.

Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

convertToArcByBulge()

 

Converts to an arc by bulge. If the arc is not circular (isCircular() returns False), then the arc cannot be converted to arc by bulge, and an error is returned.

Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

convertToArcByCenterPoint()

 

Converts to an arc by center point. If the arc cannot be converted, then an error is returned.

Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

getBulge()

 

Returns the bulge value. An error is returned if an error occurs.

Returns: float
The bulge value of the arc.
Raises:
  • FMEException - An exception is raised if an error occurred.

getCenterPoint()

 

Returns the center point of the arc. An error is returned if an error occurs.

Returns: FMEPoint
The center point of the arc.
Raises:
  • FMEException - An exception is raised if an error occurred.

getMeasureValues(as3Points, measureName)

 

Return the values of the measure named by 'measureName', otherwise returns the values of the defaut measure. Returns an error if the measure does not exist. If 'as3Points' is True, then the values of the measure are returned as 3 points.

Parameters:
  • as3Points (bool) - Whether to return the values as 3 points
  • measureName (string) - (Optional) The name of the measure whose values to return.
Returns: tuple of floats
The measure values of the arc.
Raises:
  • FMEException - An exception is raised if an error occurred.

getMidPoint()

 

Returns mid point, which will be interpolated halfway along the arc if the underlying storage is not by 3 points. If an arc is elliptical, an error is returned.

Returns: FMEPoint
The mid point of the arc.
Raises:
  • FMEException - An exception is raised if an error occurred.

getPrimaryRadius()

 

Returns the primary radius of the arc.

Returns: float
The primary radius of the arc.

getPropertiesAs3Points()

 

Returns the arc geometry as a tuple of three points. If the arc is elliptical, an error is returned.

The structure of the tuple returned is as follows: (startPoint, midPoint, endPoint).

Returns: tuple of FMEPoints
The arc geometry as three points.
Raises:
  • FMEException - An exception is raised if an error occurred.

getPropertiesAsBulge()

 

Returns the arc geometry as a tuple of two points and a bulge value. If the arc is elliptical, an error is returned.

The structure of the tuple returned is as follows: (startPoint, midPoint, bulge).

Returns: tuple of FMEPoints and floats
The arc geometry as two points and a bulge value.
Raises:
  • FMEException - An exception is raised if an error occurred.

getPropertiesAsCentered(withEnds)

 

Returns the arc properties. If 'withEnds' is True, the end points will be computed and returned. Note that measures are only stored on the end points. All angles are CCW up from the horizontal, and rotation is measured in degrees. Also, startAngle and sweepAngle aren't angles'. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of start_angle.

The structure of the tuple returned if withEnds is True is as follows: (centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle, startPoint, endPoint)

The structure of the tuple returned if withEnds is False is as follows: (centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle)

Returns: tuple of FMEPoints and floats
The arc geometry as two points and a bulge value.

getRotation()

 

Returns the rotation of the arc. All angles are CCW up from the horizontal, and are measured in degrees.

Returns: float
The rotation of the arc.

getSecondaryRadius()

 

Returns the secondary radius of the arc.

Returns: float
The secondary radius of the arc.

getStartAngle()

 

All angles are CCW up from the horizontal. Note: startAngle is a t angle. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of startAngle.

Returns: float
The start angle of the arc.

getSweepAngle()

 

All angles are CCW up from the horizontal. Note: sweepAngle is a t angle. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of sweepAngle.

Returns: float
The sweep angle of the arc.

hasExplicitEndpoints()

 

This returns True if the arc's end points have been explicitly set, and False otherwise. The get() method that returns end points will calculate the end points if none have been specified. If this is not desired, this method can be called first to determine whether the mentioned get() should be called or if the get() that does not take end points should be called.

Returns: bool
True if the arc has explicit end points, False otherwise.

isCW()

 

This returns True if the arc is clockwise, or False otherwise.

Returns: bool
True if the arc is clockwise, False otherwise.

isCircular()

 

This returns True if the arc's primary and secondary radii are the same length, and False otherwise.

Returns: bool
True if the arc is circular, False otherwise.

optimalArcTypeRetrieval()

 

Returns the arc type whose parameters that define the arc can be retrieved most efficiently and accurately.

Returns: int
The arc type.

setCenterPoint(centerPoint)

 

Sets the center point of the arc. The arc is converted to an arc by center point as a result of this method.

Parameters:
  • centerPoint (FMEPoint) - The center point to set on the arc.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setMeasureValues(as3Points, measureTuple, measureName)

 

This assigns the values given in the tuple 'measureTuple' to the default measure, or the measure named by 'measureName' if given. This creates the measure if it doesn't already exist.

If 'as3Points' is True, the measure will be set as three points, hence if measureTuple does not contain three FMEPoint objects, an error is returned. If the underlying arc is not stored by 3 points, the "midPoint" value of the tuple (i.e. measureTuple[1]), will be ignored.

Parameters:
  • as3Points (bool) - Whether to set the measure as three points.
  • measureTuple (tuple of FMEPoints) - The tuple containing the point measures to set on the arc.
  • measureName (string) - (Optional) The name of the measure whose values to set.
Returns: None

setMidPoint(midPoint)

 

Sets the midpoint of the arc. It only sets the midpoint if the arc can be successfully converted to an arc by mid point.

Parameters:
  • midPoint (FMEPoint) - The midpoint to set on the arc.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setPrimaryRadius(primaryRadius)

 

Sets the primary radius of the arc. The arc is converted to an arc by center point before setting the primary radius.

Parameters:
  • primaryRadius (float) - The primary radius to set on the arc.
Returns: None

setRotation(rotation)

 

Sets the rotation of the arc. The arc is converted to an arc by center point before setting the rotation.

Parameters:
  • rotation (float) - The rotation to set on the arc.
Returns: None

setSecondaryRadius(secondaryRadius)

 

Sets the secondary radius of the arc. The arc is converted to an arc by center point before setting the secondary radius.

Parameters:
  • secondaryRadius (float) - The primary radius to set on the arc.
Returns: None

setStartAngle(startAngle)

 

Sets the start angle of the arc, measured counter-clockwise up from the horizontal. Note: 'startAngle' is a t angle. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of startAngle.

Parameters:
  • startAngle (float) - The start angle to set on the arc.
Returns: None

setSweepAngle(sweepAngle)

 

Sets the sweep angle of the arc, measured counter-clockwise up from the horizontal. Note: 'sweepAngle' is a t angle. The arc is first converted to an arc by center point before the 'sweepAngle' is set. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of sweepAngle.

Parameters:
  • sweepAngle (float) - The sweep angle to set on the arc.
Returns: None