The normpath class is used internally for all non-trivial path
operations, i.e. the ones marked by a
in the description of
the path above. It represents a path as a list of subpaths, which are
instances of the class normsubpath. These normsubpaths
themselves consist of a list of normsubpathitems which are
either straight lines (normline) or Bézier curves
(normcurve).
A given path can easily be converted to the corresponding normpath using the method with this name:
np = p.normpath()
To construct a normpath from a list of normsubpath instances, you pass them to the normpath constructor:
| normsubpaths=[]) |
Instances of normpath offers all methods of regular paths, which also have the same semantics. An exception are the methods append and extend. While they allow for adding of instances of subnormpath to the normpath instance, they also keep the functionality of a regular path and allow for regular path elements to be appended. The later are converted to the proper normpath representation during addition.
In addition to the path methods, a normpath instance also offers the following methods, which operate on the instance itself, i.e., modify it in place.
| other) |
| ) |
| trafo) |
Finally, we remark that the sum of a normpath and a path always yields a normpath.