offset_line

compas.geometry.offset_line(line, distance, normal=[0.0, 0.0, 1.0])[source]

Offset a line by a distance.

Parameters
  • line (tuple) – Two points defining the line.

  • distances (float or list of floats) – The offset distance as float. A single value determines a constant offset. Alternatively, two offset values for the start and end point of the line can be used to a create variable offset.

  • normal (vector) – The normal of the offset plane.

Returns

offset line (tuple) – Two points defining the offset line.

Notes

The offset direction is chosen such that if the line were along the positve X axis and the normal of the offset plane is along the positive Z axis, the offset line is in the direction of the postive Y axis.

Examples

>>>