Revision Cloud¶
The module ezdxf.revcloud
provides functions to render revision clouds
similar to the REVCLOUD command in CAD applications.
Added in version 1.3.0.
- ezdxf.revcloud.points(vertices: Iterable[UVec], segment_length: float, *, bulge: float = REQUIRED_BULGE, start_width: float = 0.0, end_width: float = 0.0) list[Sequence[float]] ¶
Returns the points for a
LWPolyline
entity to render a revision cloud, similar to the REVCLOUD command in CAD applications.- Parameters:
vertices – corner points of a polygon
segment_length – approximate segment length
bulge – LWPOLYLINE bulge value
start_width – start width of the segment arc
end_width – end width of the segment arc, CAD applications use 0.1 * segment_length for a calligraphy effect
- ezdxf.revcloud.add_entity(layout: BaseLayout, vertices: Iterable[UVec], segment_length: float, *, calligraphy=True, dxfattribs: Any = None) LWPolyline ¶
Adds a revision cloud as
LWPolyline
entity to layout, similar to the REVCLOUD command in CAD applications.- Parameters:
layout – target layout
vertices – corner points of a polygon
segment_length – approximate segment length
calligraphy –
True
for a calligraphy effectdxfattribs – additional DXF attributes
- ezdxf.revcloud.is_revcloud(entity: DXFEntity) bool ¶
Returns
True
when the given entity represents a revision cloud.
Usage:
import ezdxf
from ezdxf.render import revcloud
doc = ezdxf.new()
msp = doc.modelspace()
revcloud.add_entity(msp, [(0, 0), (1, 0), (1, 1), (0, 1)], segment_length=0.1)
doc.saveas("revcloud.dxf")