• v_sim 3.8 »
  • Classes »
  • v_sim.PairLink
  • v_sim.PairLink
    • Methods
    • Virtual Methods
    • Properties
    • Signals
    • Fields
    • Class Details
      • v_sim.PairLink
        • v_sim.PairLink.new()
        • v_sim.PairLink.getColor()
        • v_sim.PairLink.getDistance()
        • v_sim.PairLink.getDrawn()
        • v_sim.PairLink.getFirstElement()
        • v_sim.PairLink.getPrintLength()
        • v_sim.PairLink.getSecondElement()
        • v_sim.PairLink.getUnits()
        • v_sim.PairLink.isDrawn()
        • v_sim.PairLink.iter_new()
        • v_sim.PairLink.match()
        • v_sim.PairLink.setColor()
        • v_sim.PairLink.setDistance()
        • v_sim.PairLink.setDrawn()
        • v_sim.PairLink.setPrintLength()
        • v_sim.PairLink.setUnits()
    • Property Details
      • v_sim.PairLink.props.color
      • v_sim.PairLink.props.display_length
      • v_sim.PairLink.props.drawn
      • v_sim.PairLink.props.max
      • v_sim.PairLink.props.min
      • v_sim.PairLink.props.units
  • v_sim 3.8 »
  • Classes »
  • v_sim.PairLink
  • v_sim.PairLink
    • Methods
    • Virtual Methods
    • Properties
    • Signals
    • Fields
    • Class Details
      • v_sim.PairLink
        • v_sim.PairLink.new()
        • v_sim.PairLink.getColor()
        • v_sim.PairLink.getDistance()
        • v_sim.PairLink.getDrawn()
        • v_sim.PairLink.getFirstElement()
        • v_sim.PairLink.getPrintLength()
        • v_sim.PairLink.getSecondElement()
        • v_sim.PairLink.getUnits()
        • v_sim.PairLink.isDrawn()
        • v_sim.PairLink.iter_new()
        • v_sim.PairLink.match()
        • v_sim.PairLink.setColor()
        • v_sim.PairLink.setDistance()
        • v_sim.PairLink.setDrawn()
        • v_sim.PairLink.setPrintLength()
        • v_sim.PairLink.setUnits()
    • Property Details
      • v_sim.PairLink.props.color
      • v_sim.PairLink.props.display_length
      • v_sim.PairLink.props.drawn
      • v_sim.PairLink.props.max
      • v_sim.PairLink.props.min
      • v_sim.PairLink.props.units

v_sim.PairLink¶

g GObject.GInterface GObject.GInterface v_sim.PairCylinder v_sim.PairCylinder GObject.GInterface->v_sim.PairCylinder v_sim.PairWire v_sim.PairWire GObject.GInterface->v_sim.PairWire GObject.Object GObject.Object v_sim.PairLink v_sim.PairLink GObject.Object->v_sim.PairLink v_sim.PairCylinder->v_sim.PairLink v_sim.PairWire->v_sim.PairLink

Subclasses:

None

Methods¶

Inherited:

GObject.Object (37), v_sim.PairCylinder (6), v_sim.PairWire (8)

Structs:

GObject.ObjectClass (5)

class

new (ele1, ele2, minMax)

getColor ()

getDistance (minOrMax)

getDrawn ()

getFirstElement ()

getPrintLength ()

getSecondElement ()

getUnits ()

isDrawn ()

iter_new (data, usePeriodicty)

match (minMax)

setColor (destColor)

setDistance (val, minOrMax)

setDrawn (drawn)

setPrintLength (status)

setUnits (units)

Virtual Methods¶

Inherited:

GObject.Object (7), v_sim.PairCylinder (4), v_sim.PairWire (6)

Properties¶

Inherited:

v_sim.PairCylinder (2), v_sim.PairWire (3)

Name

Type

Flags

Short Description

color

v_sim.Color

r/w

rendering color

display-length

bool

r/w

link displays its length or not

drawn

bool

r/w

link is displayed or not

max

float

r/w

maximal distance

min

float

r/w

minimal distance

units

int

r/w

Units of dimensions

Signals¶

Inherited:

GObject.Object (1)

Fields¶

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details¶

class v_sim.PairLink(**kwargs)¶
Bases:

GObject.Object, v_sim.PairCylinder, v_sim.PairWire

Abstract:

No

Structure:

v_sim.PairLinkClass

An opaque structure.

classmethod new(ele1, ele2, minMax)¶
Parameters:
  • ele1 (v_sim.Element) – a v_sim.Element object ;

  • ele2 (v_sim.Element) – a v_sim.Element object ;

  • minMax ([float]) – the two min and max distances.

Returns:

the v_sim.PairLink object associated to the given two elements and distances. If none exists it is created. The returned value should not be freed.

Return type:

v_sim.PairLink

A link between two elements is characterized by its boundary distances.

getColor()¶
Returns:

a colour (don’t free it).

Return type:

v_sim.Color

Look for the properties of the pair self to find if a colour has been defined. If none, the default colour is returned instead.

getDistance(minOrMax)¶
Parameters:

minOrMax (v_sim.PairLinkDistances) – v_sim.PairLinkDistances.MIN or v_sim.PairLinkDistances.MAX.

Returns:

the minimum or the maximum value for the pair between ele1 and ele2.

Return type:

float

A pair between ele1 and ele2 is drawn only if its length is between a minimum and a maximum value. This method can get these values.

getDrawn()¶
Returns:

True if pairs can be drawn.

Return type:

bool

A pair can or cannot be drawn, use this method to retrieve its state.

getFirstElement()¶
Returns:

a v_sim.Element the link is linking.

Return type:

v_sim.Element

Retrieve one of the v_sim.Element self is linking.

New in version 3.8.

getPrintLength()¶
Returns:

True if length are printed.

Return type:

bool

Get the print length parameter of a pair. This parameter is used to tell if length should be drawn near pairs of this kind.

getSecondElement()¶
Returns:

a v_sim.Element the link is linking.

Return type:

v_sim.Element

Retrieve one of the v_sim.Element self is linking.

New in version 3.8.

getUnits()¶
Returns:

True if length are printed.

Return type:

v_sim.Units

Get the units of distance definition of self.

isDrawn()¶
Returns:

True if the self is indeed drawn or not.

Return type:

bool

A link is used or not depending on a distance criterion and a flag, see v_sim.PairLink.setDrawn() and v_sim.PairLink.setDistance().

New in version 3.7.

iter_new(data, usePeriodicty)¶
Parameters:
  • data (v_sim.Data) – a v_sim.Data object.

  • usePeriodicty (bool) – a boolean.

Returns:

True if there is a valid link to draw.

iter:

a pointer to a v_sim.PairLinkIter structure.

Return type:

(bool, iter: v_sim.PairLinkIter)

Initialise a new v_sim.PairLinkIter structure to iterate over links defined by self in data. If usePeriodicty is True, all links between two nodes are kept if their smallest vector, using the periodicty, is within the self distance criterion.

New in version 3.8.

match(minMax)¶
Parameters:

minMax ([float]) – two floats.

Returns:

True, if self matches minMax.

Return type:

bool

Returns if self is a link with distance criterions defined by minMax.

New in version 3.8.

setColor(destColor)¶
Parameters:

destColor (v_sim.Color) – a v_sim.Color object.

Returns:

True if parameter has been changed.

Return type:

bool

Set the color of the given pair.

setDistance(val, minOrMax)¶
Parameters:
  • val (float) – a floating point value ;

  • minOrMax (v_sim.PairLinkDistances) – v_sim.PairLinkDistances.MAX or v_sim.PairLinkDistances.MIN.

Returns:

True if parameter has been changed.

Return type:

bool

Set the minimum or the maximum length for the given pair.

setDrawn(drawn)¶
Parameters:

drawn (bool) – a boolean.

Returns:

True if parameter has been changed.

Return type:

bool

A pair can or cannot be drawn, use this method to tune it.

setPrintLength(status)¶
Parameters:

status (bool) – True to print length near pairs.

Returns:

True if parameter has been changed.

Return type:

bool

Set the attribute that controls if the length of pairs are drawn near pairs.

setUnits(units)¶
Parameters:

units (v_sim.Units) – a unit.

Returns:

True if value is actually changed.

Return type:

bool

Define the unit used to store the distances.

New in version 3.8.

Property Details¶

v_sim.PairLink.props.color¶
Name:

color

Type:

v_sim.Color

Default Value:

None

Flags:

READABLE, WRITABLE

rendering color

v_sim.PairLink.props.display_length¶
Name:

display-length

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

link displays its length or not

v_sim.PairLink.props.drawn¶
Name:

drawn

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

link is displayed or not

v_sim.PairLink.props.max¶
Name:

max

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

maximal distance

v_sim.PairLink.props.min¶
Name:

min

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

minimal distance

v_sim.PairLink.props.units¶
Name:

units

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Units of dimensions