Python reference: ObjectExtra

The class ObjectExtra represents the C API structure TObjectExtra2. See the documentation on this function for the values required for the ObjectExtra attributes.

Construction

The Python interface provides the following functions to return instances of ObjectExtra.

The following functions are for objects requiring position data. Here pos is three numeric values (e.g. oeBuoy(0.0, 1.0, 1.3)) or an iterable of three values (e.g. oeBuoy([0.0, 1.0, 1.3])):

oeEnvironment(pos)

oeVessel(pos)

oeBuoy(pos)

oeConstraint(pos)

Object extra functions for lines are below. Use the oeLine() function if the attribute you need to set is not covered by one of the more specific line object extra functions. Set the attributes you require by name, e.g. oeLine(Theta=45.0, ArcLength=56.0). Attributes not set take the default values shown below:

oeEndA

oeEndB

oeTouchdown

oeNodeNum(NodeNum)

oeArcLength(ArcLength)

oeLine(

LinePoint=LinePoint.ArcLength,

NodeNum=0,

ArcLength=0.0,

RadialPos=RadialPos.Inner,

Theta=0.0,

ClearanceLineName=None,

ExternalResultText=None

)

Object extra functions for other OrcaFlex object types:

oeWing(WingName)

oeWinch(WinchConnectionPoint)

For line supports results:

oeSupport(SupportIndex, SupportedLineName=None)

For turbine results:

oeTurbine(BladeIndex, ArcLength=0.0, ClearanceLineName=None)

oeTurbineEndA(BladeIndex, ClearanceLineName=None)

oeTurbineEndB(BladeIndex, ClearanceLineName=None)

For Morison element results:

oeMorisonElement(ElementIndex, ArcLength)

For vessel air gap results:

oeAirGap(RigidBodyPos, SeaSurfaceScalingFactor)

Attributes

The attributes are the same as in TObjectExtra2 and take the same values.

Sometimes you need to specify a combination of these attributes for which none of the functions above suffices. In that case, use the function above that most closely matches your needs, and then set the additional attributes. For example:

# position and disturbance vessel for environment results

objectExtra = OrcFxAPI.oeEnvironment(x, y, z)

objectExtra.DisturbanceVesselName = vessel.Name

 

# external results text

objectExtra = OrcFxAPI.oeArcLength(z)

objectExtra.ExternalResultText = someText