Edge Treatment¶
Warning
This module is currently experimental and has several known issues. While it generally works fine for simple primitive geometry, it struggles to properly identify external edges on geometry commonly emitted by CSG operations.
Geometry geared towards modifying object edges.
>>> from petrify.solid import Box, Vector, Point
>>> from petrify.space import LineSegment
>>> box = Box(Point.origin, Vector(1, 1, 1))
>>> edge = LineSegment(Point(0, 0, 0), Point(0, 1, 0))
>>> chamfered = box - Chamfer(box, [edge], 0.25)
-
class
petrify.edge.
Chamfer
(solid, edges, amount)[source]¶ Chamfer geometry formed by creating an inset of amount along the pairs of polygons formed by edges on a solid.
The starting point of each edge must equal the endpoint of the prior edge (and, by induction, the endpoint of each edge must be the start of the next edge).