43. tools — tools.py

tools.py

Graphic Tools for pyFormex.

class tools.Plane(points, normal=None, size=((1.0, 1.0), (1.0, 1.0)))

Plane objects have the following methods:

point()
normal()
size()
bbox()

Functions defined in the module tools

tools.report(K)
tools.reportActors(K)
tools.reportElements(K)
tools.reportPoints(K)
tools.reportEdges(K)
tools.reportPartitions(K)
tools.reportDistances(K)
tools.reportAngles(K)
tools.getObjectItems(obj, items, mode)
Get the specified items from object.
tools.getCollection(K)
Returns a collection.
tools.setpropCollection(K, prop)

Set the property of a collection.

prop should be a single non-negative integer value or None. If None is given, the prop attribute will be removed from the objects in collection even the non-selected items. If a selected object does not have a setProp method, it is ignored.

tools.growCollection(K)

Grow the collection with n frontal rings.

K should be a collection of elements. This currently only works on surfaces. Objects that do not have a nodeFront() generator function are

tools.partitionCollection(K)

Partition the collection according to node adjacency.

The actor numbers will be connected to a collection of property numbers, e.g. 0 [1 [4,12] 2 [6,20]], where 0 is the actor number, 1 and 2 are the property numbers and 4, 12, 6 and 20 are the element numbers.

tools.getPartition(K, prop)
Remove all partitions with property not in prop.
tools.exportObjects(obj, name, single=False)

Export a list of objects under the given name.

If obj is a list, and single=True, each element of the list is exported as a single item. The items will be given the names name-0, name-1, etc. Else, the obj is exported as is under the name.

Documentation

Previous topic

42. tetgen — read/write tetgen format files.

Next topic

44. objects — Selection of objects from the global dictionary.

This Page