RadialDimension

Type: Composite Entity

class RadialDimension

Draw a radius dimension line from target in direction of center with length drawing units. RadialDimension has a special tick!!

RadialDimension.__init__(center, target, length=1., dimstyle='Default', layer=None, roundval=None)
Parameters:
  • center – center point of radius
  • target – target point of radius
  • length (float) – length of radius arrow (drawing length)
  • dimstyle (str) – dimstyle name, ‘Default’ - style is the default value
  • layer (str) – dimension line layer, override the default value of dimstyle
  • roundval – count of decimal places

Example

import dxfwrite
from dxfwrite import DXFEngine as dxf

# Dimlines are separated from the core library.
# Dimension lines will not generated by the DXFEngine.
from dxfwrite.dimlines import dimstyles, RadialDimension

# create a new drawing
dwg = dxf.drawing('dimlines.dxf')

# dimensionline setup:
# add block and layer definition to drawing
dimstyles.setup(dwg)

# RadialDimension has a special tick
dimstyles.new("radius", height=0.25, prefix='R=')
dwg.add(RadialDimension((20, 0), (24, 1.5), dimstyle='radius'))
../_images/arcdim.png