| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <div>
- <p>The command line of QCAD allows you to start commands, enter coordinates or
- enter values such as distances or radii.</p>
- <h3>Entering Coordinates</h3>
- <p>
- Absolute coordinates are entered in the format "x,y":
- </p>
- <p class="code">
- 40,5
- </p>
- <p>
- Relative coordinates are entered in the format "@x,y":
- </p>
- <p class="code">
- @10,6
- </p>
- <p>
- Absolute polar coordinates are entered in the format "distance<angle":
- </p>
- <p class="code">
- 10<30
- </p>
- <p>
- Relative polar coordinates are entered in the format "@distance<angle":
- </p>
- <p class="code">
- @10<45
- </p>
- <p>
- When entering coordinates or values, <a href="#expr">mathematical expressions</a>
- may be used to calculate a coordinate based on known values. For example the
- coordinate 10,5 may also be entered as:
- </p>
- <p class="code">
- 5+5,30/6
- </p>
- <h3>Calculator</h3>
- <p>
- The command line can also be used as a calculator. To do this, enter a
- <a href="#expr">mathematical expression</a> proceeded by an equal sign:
- </p>
- <p class="code">
- =3+4<br/>
- 7
- </p>
- <p>
- Variables may be used to store values:
- </p>
- <p class="code">
- =a=5+6<br/>
- 11<br/>
- =a/2<br/>
- 5.5<br/>
- </p>
- <a name="expr"></a>
- <h3>Mathematical Expressions</h3>
- <p>Mathematical constants available are:</p>
- <p class="code">
- PI, LN2, LN10, LOG2E, LOG10E, SQRT1_2, SQRT2
- </p>
- <p>Mathematical functions available are:</p>
- <p class="code">
- abs, ceil, floor, exp, log, max, min, pow, sqrt, random, round, rad2deg, deg2rad,
- sin, cos, tan, asin, acos, atan, atan2, log10, log1p, log2, sign, cosh, sinh, tanh,
- acosh, asinh, atanh, expm1, hypot, cbrt, trunc
- </p>
- <p>Most of these constants and functions are standard ECMAScript (JavaScript) functions and
- documented online. In standard ECMAScript, these functions are part of the Math class so the
- function <i>abs</i> would have to written as <i>Math.abs</i>. In the QCAD command line, you can
- leave away the <i>Math.</i> part for convenience. Trigonometric functions (sin, cos, tan, asin, acos, atan, atan2)
- accept or return angles in degrees. If you prefer the radian versions of these functions,
- use the original <i>Math.</i> functions instead.</p>
- <p>The functions <i>rad2deg</i> and <i>deg2rad</i> can be used to convert angles between
- radian and degrees.</p>
- </div>
|