fvr.cad module¶
- class doc[source]¶
Bases:
objectcontour scale and dimension scale
to create a line in dimension scale = (x, y)/sc*sd
- __init__(setup=True, scale=1, sc=1, sd=1)[source]¶
- Parameters:
scale – scale line and font size of contour and dimensions
sc – scale contour
sd – scale dimension position
- aligned_dim(p1, p2, distance, text, text_rotation=None, text_shifth=0, text_shiftv=0, arrow1=None, arrow2=None)[source]¶
- Parameters:
p1 – (x, y) 1st measurement point
p2 – (x, y) 2nd measurement point
distance – NOTE! in dimension scale not contour scale
text
text_rotation – global rotation in in degree
text_shifth – shift parallel to the dimension line
text_shiftv – shift perpendicular to the dimension line
arrow1 – ‘DOTSMALL’
arrow2 – ‘DOTSMALL’
- circle(pt, radius, color=None, lineweight=None, linetype='CONTINUOUS', layer=None, dxfattribs=None)[source]¶
- Parameters:
pt – (x, y)
radius
- leader(pts=(0, 0), layer=None)[source]¶
- Parameters:
pts – [(x1, y1), (x2, y2), …]
distance – NOTE! in dimension scale not contour scale
text
text_rotation – global rotation in in degree
text_shifth – shift parallel to the dimension line
text_shiftv – shift perpendicular to the dimension line
arrow1 – ‘DOTSMALL’
arrow2 – ‘DOTSMALL’
- line(p1, p2, color=None, lineweight=None, linetype='CONTINUOUS', layer=None, dxfattribs=None, shift=(0, 0))[source]¶
- Parameters:
p1 – (x, y)
p2 – (x, y)
color – defaults to 0
lineweight – defaults to 75, corresponds to a 0.75 mm linewidth (conversion 1/100).
linetype – ‘DASHED2’
leyer – e.g. ‘con’ for contour, ‘dim’ dimension
- linear_dim(base, p1, p2, text, dim_shift=None)[source]¶
- Parameters:
base – (x, y) location of the dimension line in contour scale. Use dim_shift to be able to scale contour only and not the dimension.
p1 – (x, y) 1st measurement point
p2 – (x, y) 2nd measurement point
dim_shift – shift (dx, dy), in dimension scale not contour scale
- polyline(pts, close=False, color=None, lineweight=None, linetype='CONTINUOUS', layer=None, dxfattribs=None, shift=(0, 0))[source]¶
- Parameters:
pts – [(x1, y1), (x2, y2), …]
- text(text, pt=(0, 0), height=0.35, rotation=0, layer=None)[source]¶
- Parameters:
p1 – (x, y) 1st measurement point
p2 – (x, y) 2nd measurement point
distance – NOTE! in dimension scale not contour scale
text
text_rotation – global rotation in in degree
text_shifth – shift parallel to the dimension line
text_shiftv – shift perpendicular to the dimension line
arrow1 – ‘DOTSMALL’
arrow2 – ‘DOTSMALL’