v_sim.Paths

Fields

None

Methods

class

new (translation)

class

parseFromXML (filename, paths)

addFromDiff (data, energy)

addNodeStep (time, nodeId, xyz, dxyz, energy)

constrainInBox (data)

draw (pathWidth)

empty ()

exportXMLFile (filename)

free ()

getLength ()

getToolShade ()

pinPositions (data)

ref ()

setToolShade (shade)

setTranslation (cartCoord)

unref ()

Details

class v_sim.Paths

An opaque structure to save a set of paths.

New in version 3.6.

classmethod new(translation)
Parameters:

translation ([float]) – the current box translation (cartesian).

Returns:

the newly create object v_sim.Paths, to be freed with v_sim.Paths.free().

Return type:

v_sim.Paths

Create a new v_sim.Paths object.

New in version 3.6.

classmethod parseFromXML(filename, paths)
Parameters:
Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

Read an XML containing a description of paths. paths is newly created on success and should be freed with v_sim.Paths.free().

New in version 3.6.

addFromDiff(data, energy)
Parameters:
Returns:

True if new paths have been added.

Return type:

bool

This routine read the geometry difference hold in data and add a new step in the set of paths. If new paths are created, one should call v_sim.Paths.setTranslation() to be sure that all paths are moved inside the box.

New in version 3.6.

addNodeStep(time, nodeId, xyz, dxyz, energy)
Parameters:
  • time (int) – the flag that give the number of expansion to update.

  • nodeId (int) – the node to expand the path of.

  • xyz (float) – the current position of the path.

  • dxyz (float) – the variation in the path.

  • energy (float) – the energy of the system.

Returns:

True if a new path is started.

Return type:

bool

This routine expand the path for the given nodeId at position xyz of dxyz. The energy value will be used only if v_sim.Paths.setToolShade() is used with a non None v_sim.Shade. In that case the energy value will be used to colourise the provided path.

New in version 3.6.

constrainInBox(data)
Parameters:

data (v_sim.Data) – a v_sim.Data object.

Modify the corrdinates of the path nodes to contraint them in a box (when applying translations for instance).

New in version 3.6.

draw(pathWidth)
Parameters:

pathWidth (float) – the width for the drawn path

OpenGL calls to create the paths.

New in version 3.6.

empty()

Reinitialise internal values of a given self.

New in version 3.6.

exportXMLFile(filename)
Parameters:

filename (str) – a location on disk.

Raises:

GLib.Error

Returns:

True if no error.

Return type:

bool

Write an XML file with the description of the given self.

New in version 3.6.

free()

Free a set of paths.

New in version 3.6.

getLength()
Returns:

the number of steps.

Return type:

int

Get the number of steps stored in a v_sim.Paths.

New in version 3.6.

getToolShade()
Returns:

the v_sim.Shade used by the self.

Return type:

v_sim.Shade

The paths are drawn with a colourisation scheme.

New in version 3.6.

pinPositions(data)
Parameters:

data (v_sim.Data) – a v_sim.Data object.

Use the current positions of data to extend self.

New in version 3.6.

ref()
Returns:

itself.

Return type:

v_sim.Paths

Increase the ref counter.

New in version 3.7.

setToolShade(shade)
Parameters:

shade (v_sim.Shade) – a v_sim.Shade object.

Returns:

True is the scheme is changed.

Return type:

bool

Set the colourisation scheme for the path.

New in version 3.6.

setTranslation(cartCoord)
Parameters:

cartCoord (float) – three floats.

Change the translation of the path, stored in cartesian coordinates.

New in version 3.6.

unref()

Decrease the ref counter, free all memory if counter reachs zero.

New in version 3.7.