T-FLEX Parametric CAD. Fundamentals. 2D Design
T-FLEX Parametric CAD. Fundamentals. 2D Design T-FLEX Parametric CAD. Fundamentals. 2D Design
Variables -23 % -5 = -3 23 % -5 = 3 -23 % 5 = -3 The result of the operation member1 % member2 is the remainder of dividing member1 by member2. The value of member2 may not be zero. In the case member2 = 0, the error occurs, “Zero divide in line 1”. Besides the above-mentioned algebraic operations, logical (comparison) operations can be used in expressions. The result of a logical operation is the numerical value 1, if the relation defined by the operation is true, and 0 otherwise. Logical Operations Greater than ( > ) Less than ( < ) Greater than or equal ( >= ) Less than or equal ( 45 && 56 < 34 This example expresses the question: Is the number 23 greater than the number 45 and the number 56 less than the number 34? Obviously, the answer will be - no, therefore the value of this expression is zero. The expression !VAR_1 is the same as VAR_1 == 0 Logical operations are usually used for comparing the value of a variable against a constant or a value of another variable. A shortcoming here is that only two values are possible as the result of evaluating a logical expression - 0 or 1. Another form of using logical operations is a conditional statement. A conditional statement has the following structure: condition ? value1 : value2 Example: VAR_1 > 100 ? 1 : -1 If the value of VAR_1 is greater than 100, then the statement will yield 1, otherwise it yields -1. One can use arbitrary expressions for the condition, value1 and value2. VAR_1 ? 1 : -1 or, just the same thing, VAR_1 != 0 ? 1 : -1 (VAR_1 != 0 && VAR_2 == 0) ? (VAR_3 + 1) : (VAR_4 -1) 495
Fundamentals. Two-Dimensional Design Standard Mathematical Functions 496 ABS Return absolute value of abs ( -20 ) = 20 ACOS Calculate arccosine acos ( 0.5 ) = 60 ASIN Calculate arcsine asin ( 0.5 ) = 30 ATAN Calculate arctangent atan ( 1 ) = 45 CEIL Find integer ceiling ceil ( 3.98 ) = 4 COS Calculate cosine cos ( 60 ) = 0.5 FLOOR Find largest integer less than or equal to argument floor ( 3.13 ) = 3 HYPOT Calculate hypotenuse of right triangle hypot ( 3, 4 ) = 5 INT Round to nearest integer int ( 3.13 ) = 3 LOG Calculate natural logarithm log ( 1 ) = 0 LOG10 Calculate base-10 logarithm log10 ( 10 ) = 1 RACOS Calculate arccosine, in radians racos ( 0.5 ) = 1.0472 RASIN Calculate arcsine, in radians rasin ( 1 ) = 1.5708 RATAN Calculate arctangent, in radians ratan ( 2 ) = 1.10715 RCOS Calculate cosine, angle input in radians ROUND( ARG1, ARG2 ) Round the value ARG1 with accuracy ARG2. rcos ( 1 ) = 0.540302 Round 2.25 ( 2.357, 0.25 ) = Round ( 2.357, 0.1 ) = 2.4 RSIN Calculate sine, angle input in radians rsin ( 1 ) = 0.841741 RTAN Calculate tangent, angle input in radians rtan ( 1 ) = 1.55741 SIN Calculate sine sin ( 30 ) = 0.5 SQRT Find square root sqrt ( 16 ) = 4 TAN Calculate tangent tan ( 45 ) = 1 All functions except hypot and ROUND have one numerical argument. Function arguments can be substituted by any expression, including other function calls that result in real numbers. SIN ( 10 + 10 + 10 ) = 0.5 SIN ( SQRT ( 900 ) ) = 0.5 The functions hypot and ROUND have two numerical arguments separated by a comma: HYPOT ( 1 + 1 + 1, 1 + 1 + 1 + 1 ) = 5
- Page 446 and 447: Moving and Copying Drawing Elements
- Page 448 and 449: Moving and Copying Drawing Elements
- Page 450 and 451: Moving and Copying Drawing Elements
- Page 452 and 453: Moving and Copying Drawing Elements
- Page 454 and 455: ELEMENT REPLACEMENT Element Replace
- Page 456 and 457: Element Replacement When using the
- Page 458 and 459: Select the dimension and enter the
- Page 460 and 461: Drawing Modification via Dimensions
- Page 462 and 463: Relations created with the commands
- Page 464 and 465: Relations The created Relations wil
- Page 466 and 467: Variables and Related Parametric To
- Page 468 and 469: Upon creating any variable of the T
- Page 470 and 471: Comment of variable Variables If ne
- Page 472 and 473: Creating Variable In the variables
- Page 474 and 475: Variables The command “New Variab
- Page 476 and 477: Variables the selected section. The
- Page 478 and 479: Variables After calling this comman
- Page 480 and 481: Variables Color. The color of grid
- Page 482 and 483: Variables To activate the mode of g
- Page 484 and 485: Variables Sort parameters are saved
- Page 486 and 487: Variables Upon calling this command
- Page 488 and 489: Editing External Variables Variable
- Page 490 and 491: Call the command “EC: Edit Constr
- Page 492 and 493: Variable Dependency Variables Varia
- Page 494 and 495: Variables Attachment I. Rules for W
- Page 498 and 499: Variables The angle arguments of tr
- Page 500 and 501: Variables TWORD(“string”, N) Ge
- Page 502 and 503: Variables The detailed description
- Page 504 and 505: LTOT ( 120.34567, 0.001, 1, 5 ) ret
- Page 506 and 507: for text: “WIDTH” - the text wi
- Page 508 and 509: for loop: “AxisX”, “AxisY”,
- Page 510 and 511: Variables One more additional relat
- Page 512 and 513: Variables BOMPAGES - returns the to
- Page 514 and 515: Measure Elements and Relations betw
- Page 516 and 517: Additional Methods of Calling Comma
- Page 518 and 519: Hatches: Text: 3D objects “AREA
- Page 520 and 521: Loops: Measure Elements and Relatio
- Page 522 and 523: GLOBAL VARIABLES Global Variables A
- Page 524 and 525: DATABASES Databases Databases provi
- Page 526 and 527: Databases Name of the field. Define
- Page 528 and 529: Databases argument_3 - the search o
- Page 530 and 531: Save Database As External Keyboard
- Page 532 and 533: Duplicate Keyboard Textual Menu Ico
- Page 534 and 535: Databases decides what function to
- Page 536 and 537: Control Elements. Creating User Def
- Page 538 and 539: Control Elements. Creating User Def
- Page 540 and 541: Control Elements. Creating User Def
- Page 542 and 543: Control Elements. Creating User Def
- Page 544 and 545: Control Elements. Creating User Def
<strong>Fundamentals</strong>. Two-Dimensional <strong>Design</strong><br />
Standard Mathematical Functions<br />
496<br />
ABS Return absolute value of abs ( -20 ) = 20<br />
ACOS Calculate arccosine acos ( 0.5 ) = 60<br />
ASIN Calculate arcsine asin ( 0.5 ) = 30<br />
ATAN Calculate arctangent atan ( 1 ) = 45<br />
CEIL Find integer ceiling ceil ( 3.98 ) = 4<br />
COS Calculate cosine cos ( 60 ) = 0.5<br />
FLOOR Find largest integer less than or equal<br />
to argument<br />
floor ( 3.13 ) = 3<br />
HYPOT Calculate hypotenuse of right triangle hypot ( 3, 4 ) = 5<br />
INT Round to nearest integer int ( 3.13 ) = 3<br />
LOG Calculate natural logarithm log ( 1 ) = 0<br />
LOG10 Calculate base-10 logarithm log10 ( 10 ) = 1<br />
RACOS Calculate arccosine, in radians racos ( 0.5 ) = 1.0472<br />
RASIN Calculate arcsine, in radians rasin ( 1 ) = 1.5708<br />
RATAN Calculate arctangent, in radians ratan ( 2 ) = 1.10715<br />
RCOS Calculate cosine, angle input in<br />
radians<br />
ROUND(<br />
ARG1,<br />
ARG2 )<br />
Round the value ARG1 with accuracy<br />
ARG2.<br />
rcos ( 1 ) = 0.540302<br />
Round<br />
2.25<br />
( 2.357, 0.25 ) =<br />
Round ( 2.357, 0.1 ) = 2.4<br />
RSIN Calculate sine, angle input in radians rsin ( 1 ) = 0.841741<br />
RTAN Calculate tangent, angle input in<br />
radians<br />
rtan ( 1 ) = 1.55741<br />
SIN Calculate sine sin ( 30 ) = 0.5<br />
SQRT Find square root sqrt ( 16 ) = 4<br />
TAN Calculate tangent tan ( 45 ) = 1<br />
All functions except hypot and ROUND have one numerical argument. Function arguments can be<br />
substituted by any expression, including other function calls that result in real numbers.<br />
SIN ( 10 + 10 + 10 ) = 0.5<br />
SIN ( SQRT ( 900 ) ) = 0.5<br />
The functions hypot and ROUND have two numerical arguments separated by a comma:<br />
HYPOT ( 1 + 1 + 1, 1 + 1 + 1 + 1 ) = 5