v_sim.PairLink¶
- Subclasses:
 None
Methods¶
- Inherited:
 GObject.Object (37), v_sim.PairCylinder (6), v_sim.PairWire (8)
- Structs:
 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 GObject.Object (7), v_sim.PairCylinder (4), v_sim.PairWire (6)
Properties¶
- Inherited:
 
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
rendering color  | 
||
r/w  | 
link displays its length or not  | 
||
r/w  | 
link is displayed or not  | 
||
r/w  | 
maximal distance  | 
||
r/w  | 
minimal distance  | 
||
r/w  | 
Units of dimensions  | 
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent  | 
r  | 
Class Details¶
- class v_sim.PairLink(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
An opaque structure.
- classmethod new(ele1, ele2, minMax)¶
 - Parameters:
 ele1 (
v_sim.Element) – av_sim.Elementobject ;ele2 (
v_sim.Element) – av_sim.Elementobject ;minMax ([
float]) – the two min and max distances.
- Returns:
 the
v_sim.PairLinkobject associated to the given two elements and distances. If none exists it is created. The returned value should not be freed.- Return type:
 
A link between two elements is characterized by its boundary distances.
- getColor()¶
 - Returns:
 a colour (don’t free it).
- Return type:
 
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.MINorv_sim.PairLinkDistances.MAX.- Returns:
 the minimum or the maximum value for the pair between ele1 and ele2.
- Return type:
 
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()¶
 - 
A pair can or cannot be drawn, use this method to retrieve its state.
 
- getFirstElement()¶
 - Returns:
 a
v_sim.Elementthe link is linking.- Return type:
 
Retrieve one of the
v_sim.Elementself is linking.New in version 3.8.
- getPrintLength()¶
 - 
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.Elementthe link is linking.- Return type:
 
Retrieve one of the
v_sim.Elementself is linking.New in version 3.8.
- getUnits()¶
 - Returns:
 Trueif length are printed.- Return type:
 
Get the units of distance definition of self.
- isDrawn()¶
 - 
A link is used or not depending on a distance criterion and a flag, see
v_sim.PairLink.setDrawn() andv_sim.PairLink.setDistance().New in version 3.7.
 
- iter_new(data, usePeriodicty)¶
 - Parameters:
 data (
v_sim.Data) – av_sim.Dataobject.usePeriodicty (
bool) – a boolean.
- Returns:
 Trueif there is a valid link to draw.- iter:
 a pointer to a
v_sim.PairLinkIterstructure.
- Return type:
 (
bool, iter:v_sim.PairLinkIter)
Initialise a new
v_sim.PairLinkIterstructure to iterate over links defined by self in data. If usePeriodicty isTrue, 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)¶
 - 
Returns if self is a link with distance criterions defined by minMax.
New in version 3.8.
 
- setColor(destColor)¶
 - Parameters:
 destColor (
v_sim.Color) – av_sim.Colorobject.- Returns:
 Trueif parameter has been changed.- Return type:
 
Set the color of the given pair.
- setDistance(val, minOrMax)¶
 - Parameters:
 val (
float) – a floating point value ;minOrMax (
v_sim.PairLinkDistances) –v_sim.PairLinkDistances.MAXorv_sim.PairLinkDistances.MIN.
- Returns:
 Trueif parameter has been changed.- Return type:
 
Set the minimum or the maximum length for the given pair.
- setDrawn(drawn)¶
 - 
A pair can or cannot be drawn, use this method to tune it.
 
- setPrintLength(status)¶
 - Parameters:
 - Returns:
 Trueif parameter has been changed.- Return type:
 
Set the attribute that controls if the length of pairs are drawn near pairs.
- setUnits(units)¶
 - Parameters:
 units (
v_sim.Units) – a unit.- Returns:
 Trueif value is actually changed.- Return type:
 
Define the unit used to store the distances.
New in version 3.8.
Property Details¶
- v_sim.PairLink.props.color¶
 - Name:
 color- Type:
 - Default Value:
 - Flags:
 
rendering color
- v_sim.PairLink.props.display_length¶
 - 
link displays its length or not
 
- v_sim.PairLink.props.drawn¶
 - 
link is displayed or not
 
- v_sim.PairLink.props.max¶
 - 
maximal distance
 
- v_sim.PairLink.props.min¶
 - 
minimal distance