10.1.4.7. Path

Module to implement path.

For resources on path see this section.

class Patro.GeometryEngine.Path.AbsoluteHVSegment(path, index, radius, closing=False)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegmentMixin

to_path_segment()[source]
class Patro.GeometryEngine.Path.AbsoluteHorizontalSegment(path, index, x, radius=None)[source]

Bases: Patro.GeometryEngine.Path.AbsoluteHVSegment

__init__(path, index, x, radius=None)[source]

Initialize self. See help(type(self)) for accurate signature.

__repr__()[source]

Return repr(self).

clone(path)[source]
stop_point
x
class Patro.GeometryEngine.Path.AbsoluteVerticalSegment(path, index, y, radius=None)[source]

Bases: Patro.GeometryEngine.Path.AbsoluteHVSegment

__init__(path, index, y, radius=None)[source]

Initialize self. See help(type(self)) for accurate signature.

__repr__()[source]

Return repr(self).

clone(path)[source]
stop_point
y
class Patro.GeometryEngine.Path.ArcSegment(path, index, point, radius_x, radius_y, angle, large_arc, sweep, absolute=False)[source]

Bases: Patro.GeometryEngine.Path.OnePointMixin, Patro.GeometryEngine.Path.PathPart

__init__(path, index, point, radius_x, radius_y, angle, large_arc, sweep, absolute=False)[source]

Initialize self. See help(type(self)) for accurate signature.

__repr__()[source]

Return repr(self).

clone(path)[source]
geometry
points
to_absolute()[source]
class Patro.GeometryEngine.Path.CubicBezierSegment(path, index, point1, point2, point3, absolute=False)[source]

Bases: Patro.GeometryEngine.Path.PathPart, Patro.GeometryEngine.Path.ThreePointMixin

__init__(path, index, point1, point2, point3, absolute=False)[source]

Initialize self. See help(type(self)) for accurate signature.

clone(path)[source]
geometry
points
stop_point
to_absolute()[source]
class Patro.GeometryEngine.Path.DirectionalSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegmentMixin

__angle__ = None
__init__(path, index, length, radius=None)[source]

Initialize self. See help(type(self)) for accurate signature.

__repr__()[source]

Return repr(self).

clone(path)[source]
length
offset
stop_point
to_path_segment()[source]
class Patro.GeometryEngine.Path.DirectionalSegmentMixin(path, index, radius, closing=False)[source]

Bases: Patro.GeometryEngine.Path.LinearSegment

apply_transformation(transformation)[source]
geometry
class Patro.GeometryEngine.Path.EastSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = 0
class Patro.GeometryEngine.Path.HorizontalSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = 0
class Patro.GeometryEngine.Path.LinearSegment(path, index, radius, closing=False)[source]

Bases: Patro.GeometryEngine.Path.PathPart

Class to implement a linear segment.

__init__(path, index, radius, closing=False)[source]

Initialize self. See help(type(self)) for accurate signature.

_dump_bulge(arc)[source]
_logger = <Logger Patro.GeometryEngine.Path.LinearSegment (WARNING)>
_reset_cache()[source]
bissector
bulge_angle
bulge_angle_rad
bulge_center
bulge_geometry
bulge_start_point
bulge_stop_point
close(radius)[source]

Set the bulge radius at the closure

direction
half_bulge_angle
next_part
points
prev_part
radius
class Patro.GeometryEngine.Path.NorthEastSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = 45
class Patro.GeometryEngine.Path.NorthSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = 90
class Patro.GeometryEngine.Path.NorthWestSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = 135
class Patro.GeometryEngine.Path.OnePointMixin[source]

Bases: object

apply_transformation(transformation)[source]
point
stop_point
class Patro.GeometryEngine.Path.Path2D(start_point)[source]

Bases: Patro.GeometryEngine.Primitive.Primitive1PMixin, Patro.GeometryEngine.Primitive.Primitive2DMixin, Patro.GeometryEngine.Primitive.Primitive

Class to implements 2D Path.

__getitem__(index)[source]
__init__(start_point)[source]

Initialize self. See help(type(self)) for accurate signature.

__iter__()[source]
__len__()[source]
_add_part(part_cls, *args, **kwargs)[source]
_logger = <Logger Patro.GeometryEngine.Path.Path2D (WARNING)>
absolute_horizontal_to(x, radius=None)[source]
absolute_vertical_to(y, radius=None)[source]
apply_transformation(transformation)[source]
arc_to(point, radius_x, radius_y, angle, large_arc, sweep, absolute=False)[source]
bounding_box

Bounding box of the primitive.

Return None if primitive is infinite.

classmethod circle(point, radius)[source]
clone()[source]

Clone a primitive instance.

close(radius=None, close_radius=None)[source]
cubic_to(point1, point2, point3, absolute=False)[source]
east_to(length, radius=None)[source]
horizontal_to(length, radius=None, absolute=False)[source]
is_closed

True if the primitive is a closed path.

Note: an infinite primitive cannot be closed.

is_composed

True if the primitive is a composition of simpler primitives, e.g. a path.

line_to(point, radius=None, absolute=False)[source]
move_to(point)[source]
north_east_to(length, radius=None)[source]
north_to(length, radius=None)[source]
north_west_to(length, radius=None)[source]
quadratic_to(point1, point2, absolute=False)[source]
classmethod rounded_rectangle(point, width, height, radius=None)[source]
south_east_to(length, radius=None)[source]
south_to(length, radius=None)[source]
south_west_to(length, radius=None)[source]
start_segment
stop_segment
stringed_cubic_to(point1, point2, absolute=False)[source]
stringed_quadratic_to(point, absolute=False)[source]
vertical_to(length, radius=None, absolute=False)[source]
west_to(length, radius=None)[source]
class Patro.GeometryEngine.Path.PathPart(path, index)[source]

Bases: object

__init__(path, index)[source]

Initialize self. See help(type(self)) for accurate signature.

__repr__()[source]

Return repr(self).

_init_absolute(absolute)[source]
bounding_box
clone(path)[source]
geometry
index
next_part
path
prev_part
start_point
stop_point
to_absolute_point(point)[source]
class Patro.GeometryEngine.Path.PathSegment(path, index, point, radius=None, absolute=False, closing=False)[source]

Bases: Patro.GeometryEngine.Path.OnePointMixin, Patro.GeometryEngine.Path.LinearSegment

__init__(path, index, point, radius=None, absolute=False, closing=False)[source]

Initialize self. See help(type(self)) for accurate signature.

apply_transformation(transformation)[source]
clone(path)[source]
geometry
to_absolute()[source]
class Patro.GeometryEngine.Path.QuadraticBezierSegment(path, index, point1, point2, absolute=False)[source]

Bases: Patro.GeometryEngine.Path.PathPart, Patro.GeometryEngine.Path.TwoPointMixin

__init__(path, index, point1, point2, absolute=False)[source]

Initialize self. See help(type(self)) for accurate signature.

clone(path)[source]
geometry
points
stop_point
to_absolute()[source]
class Patro.GeometryEngine.Path.SouthEastSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = -45
class Patro.GeometryEngine.Path.SouthSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = -90
class Patro.GeometryEngine.Path.SouthWestSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = -135
class Patro.GeometryEngine.Path.StringedCubicBezierSegment(path, index, point1, point2, absolute=False)[source]

Bases: Patro.GeometryEngine.Path.PathPart, Patro.GeometryEngine.Path.TwoPointMixin

__init__(path, index, point1, point2, absolute=False)[source]

Initialize self. See help(type(self)) for accurate signature.

clone(path)[source]
geometry
class Patro.GeometryEngine.Path.StringedQuadtraticBezierSegment(path, index, point1, absolute=False)[source]

Bases: Patro.GeometryEngine.Path.PathPart, Patro.GeometryEngine.Path.TwoPointMixin

__init__(path, index, point1, absolute=False)[source]

Initialize self. See help(type(self)) for accurate signature.

clone(path)[source]
geometry
class Patro.GeometryEngine.Path.ThreePointMixin[source]

Bases: Patro.GeometryEngine.Path.TwoPointMixin

apply_transformation(transformation)[source]
point3
class Patro.GeometryEngine.Path.TwoPointMixin[source]

Bases: object

apply_transformation(transformation)[source]
point1
point2
class Patro.GeometryEngine.Path.VerticalSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = 90
class Patro.GeometryEngine.Path.WestSegment(path, index, length, radius=None)[source]

Bases: Patro.GeometryEngine.Path.DirectionalSegment

__angle__ = 180