FormDiagram.from_lines
- classmethod FormDiagram.from_lines(lines, delete_boundary_face=True, precision=None, **kwargs)
Construct a FormDiagram from a list of lines described by start and end point coordinates.
- Parameters:
- lineslist
A list of pairs of point coordinates.
- delete_boundary_facebool, optional
Set
True
to delete the face on the outside of the boundary,False
to keep it. Default isTrue
.- precision: int, optional
The precision of the geometric map that is used to connect the lines. If not specified, compas.geometry.TOL.precision will be used.
- Returns:
- FormDiagram
A FormDiagram object.
Examples
>>> import compas >>> from compas.files import OBJ >>> from compas_tna.diagrams import FormDiagram >>> obj = OBJ(compas.get("lines.obj")) >>> vertices = obj.parser.vertices >>> edges = obj.parser.lines >>> lines = [(vertices[u], vertices[v]) for u, v in edges] >>> form = FormDiagram.from_lines(lines)