fconcrete.helpers module¶
-
fconcrete.helpers.
cond
(x, singular=False, order=0)[source]¶ If It is singular, return 1 if x>0 else 0. If It is not singular, return x**order if x>0 else 0
-
fconcrete.helpers.
getAxis
(xy0=(0, 0), xy1=(0, 0))[source]¶ Create axis with equal aspect. xy0 and xy1 represent the visible area.
-
fconcrete.helpers.
make_dxf
(ax, **options)[source]¶ Matplotlib graph to modelspace (preparation to dxf). Returns ax and msp.
-
fconcrete.helpers.
printProgressBar
(iteration, total, prefix='', suffix='', decimals=1, length=100, fill='█', printEnd='r')[source]¶ Call in a loop to create terminal progress bar
-
fconcrete.helpers.
timeit
(do=True, name='')[source]¶ Decorator to print the time that the function has taken to execute.
-
fconcrete.helpers.
to_unit
(input, expected_unit, return_unit=False)[source]¶ Convert between unities according to expected_unit and return_unit.
Call signatures:
fc.helpers.to_unit(input, expected_unit, return_unit=False)>>> unit1 = fc.helpers.to_unit("10cm", "m") >>> unit1 0.1
>>> unit2 = fc.helpers.to_unit(20, "m", return_unit="cm") >>> unit2 2000.0
Parameters: - input :
number
orpython:str
Represents the input unit of the user.
- expected_unit :
python:str
The expected unit to be given. Useful when input is a number.
- return_unit : bool, optional
The desired unit to return
- input :