T-FLEX Parametric CAD. Fundamentals. 2D Design
T-FLEX Parametric CAD. Fundamentals. 2D Design T-FLEX Parametric CAD. Fundamentals. 2D Design
Creating a Database Creating Libraries of Parametric Elements At the step, you need to create an internal database to pick the values from. First, you need to decide, which will be the driving parameter. In our case, the candidate parameter is the bolt thread diameter. Therefore, the bolt diameter is entered in the first column, followed by all the rest of the parameters (except the length). The names of the database columns (and the database itself) should be made descriptive, so that later, when creating variables, you could easily remember which column relates to which parameter. However, too long column names are not recommended either. A good strategy is to name the columns according to engineering standard notations adopted in your industry. In our example, the thread diameter is named d, the bolt head size - S, etc. In our example, the input bolt length must be rounded to the nearest standard length. We should also account for the fact that the set of standard lengths is different for each diameter. For example, the bolt diameter of 6 mm corresponds with the length of 22 mm, while the bolts 12 mm in diameter have minimum length of 32 mm. Besides, depending on the selected bolt length, two additional parameters are defined: l1 and l0. We recommend creating separate databases of lengths for each diameter. The suggested database names are l6, l8, etc. The letter l, as in “length”, refers to the databases of lengths, while the number stands for the respective diameter. Once the databases are created, proceed to the next step. Creating Variables Relying on Databases At this step, we need to create variables that would be used for building the parametric drawing and the 3D model. We recommend using descriptive names for the variables. 709
Fundamentals. Two-Dimensional Design 710 First, define the driving variables for the rest of dimensions, whose values need to be defined when assembling the part. In this example, those are the diameter, the length and the implementation (see below). If a variable has a set of standard values, it is helpful to create the predefined list of values for convenient and quick input. The list of values can be created based on an existing field in the database. Upon creating a variable, it is a good practice to put a description in the comment field, so that another person can easily decide on what data to input, when working with this document. Next, we need to create variables that keep track of the database record number from which the values are taken. Such variable value can be read by calling the function rec or frec. For the functions description, refer to the chapter “Databases”. In this example, we need two such variables: one (the variable n) for accessing the values dependent on the bolt diameter from the respective database, and the other (the variable nl) for maintaining the value of the length. The challenge here is that the second variable should be assigned an appropriate record number across different databases (depending on the diameter). Besides, one should keep in mind, that the input length might not be always correct, as the designer of the part could enter a nonstandard bolt length. Therefore, the value of the variable nl can be described by the expression: d==6 ? frec(6.l,l) : (d==8 ? frec(l8.l,l) : d==… ), that means, if the variable d (diameter) is equal to 6, then do the search for the record number in the database number 6, otherwise, if the variable d is equal to 8 - then do the search for the record number in the database named l8, and so on over all databases. Next, create the rest of the variables. Their values are accessed by calling the function val based on the value of the variable that keeps the record number of the database (those are - n and nl). The value of the bolt length (ll) will be defined by the expression: d==6 ? val(nl,l6) : (d==8 ? val(l8.l,l) :d==… ). The meaning of this expression is similar to that of the variable nl described above. The bolt has several implementations. The drawing should adjust, depending on the implementation. This can be fulfilled by setting, when necessary, the level of certain drawing elements below the displayable threshold. We need to create special variables for this purpose (separate for each implementation). By default, the displayable elements have level from 0 to 127. If the level of an element is below zero, it is not displayed. Consider, for example, the variable imp25 that defines the level of the elements visible only in the implementations number two and five. It is equal to 0 when the implementation (defined by the string variable $imp) is equal to “2 - with pin hole” or “5 - with pin hole and groove”, and is equal to -10 in all other cases: $imp=="2 - with pin hole"||$imp=="5 - with pin hole and groove"?0:-10.
- Page 659 and 660: Fundamentals. Two-Dimensional Desig
- Page 661 and 662: Fundamentals. Two-Dimensional Desig
- Page 663 and 664: Fundamentals. Two-Dimensional Desig
- Page 665 and 666: Fundamentals. Two-Dimensional Desig
- Page 667 and 668: Fundamentals. Two-Dimensional Desig
- Page 669 and 670: Fundamentals. Two-Dimensional Desig
- Page 671 and 672: Fundamentals. Two-Dimensional Desig
- Page 673 and 674: Fundamentals. Two-Dimensional Desig
- Page 675 and 676: Fundamentals. Two-Dimensional Desig
- Page 677 and 678: Fundamentals. Two-Dimensional Desig
- Page 679 and 680: Fundamentals. Two-Dimensional Desig
- Page 681 and 682: Fundamentals. Two-Dimensional Desig
- Page 683 and 684: Fundamentals. Two-Dimensional Desig
- Page 685 and 686: Fundamentals. Two-Dimensional Desig
- Page 687 and 688: Fundamentals. Two-Dimensional Desig
- Page 689 and 690: Fundamentals. Two-Dimensional Desig
- Page 691 and 692: Fundamentals. Two-Dimensional Desig
- Page 693 and 694: Fundamentals. Two-Dimensional Desig
- Page 695 and 696: Fundamentals. Two-Dimensional Desig
- Page 697 and 698: Fundamentals. Two-Dimensional Desig
- Page 699 and 700: Fundamentals. Two-Dimensional Desig
- Page 701 and 702: Fundamentals. Two-Dimensional Desig
- Page 703 and 704: Fundamentals. Two-Dimensional Desig
- Page 705 and 706: Fundamentals. Two-Dimensional Desig
- Page 707 and 708: Fundamentals. Two-Dimensional Desig
- Page 709: Fundamentals. Two-Dimensional Desig
- Page 713 and 714: Fundamentals. Two-Dimensional Desig
- Page 715 and 716: Fundamentals. Two-Dimensional Desig
- Page 717 and 718: Fundamentals. Two-Dimensional Desig
- Page 719 and 720: Fundamentals. Two-Dimensional Desig
- Page 721 and 722: Fundamentals. Two-Dimensional Desig
- Page 723 and 724: Fundamentals. Two-Dimensional Desig
- Page 725 and 726: Fundamentals. Two-Dimensional Desig
- Page 727 and 728: Fundamentals. Two-Dimensional Desig
- Page 729 and 730: Fundamentals. Two-Dimensional Desig
- Page 731 and 732: Fundamentals. Two-Dimensional Desig
- Page 733 and 734: Fundamentals. Two-Dimensional Desig
- Page 735 and 736: Fundamentals. Two-Dimensional Desig
- Page 737 and 738: Fundamentals. Two-Dimensional Desig
- Page 739 and 740: Fundamentals. Two-Dimensional Desig
- Page 741 and 742: Fundamentals. Two-Dimensional Desig
- Page 743 and 744: Fundamentals. Two-Dimensional Desig
- Page 745 and 746: Fundamentals. Two-Dimensional Desig
- Page 747 and 748: Fundamentals. Two-Dimensional Desig
- Page 749 and 750: Fundamentals. Two-Dimensional Desig
- Page 751 and 752: Fundamentals. Two-Dimensional Desig
- Page 753 and 754: Fundamentals. Two-Dimensional Desig
- Page 755 and 756: Fundamentals. Two-Dimensional Desig
- Page 757 and 758: Two-dimensional design CONVERTING D
- Page 759 and 760: Two-dimensional design Performing C
Creating a Database<br />
Creating Libraries of <strong>Parametric</strong> Elements<br />
At the step, you need to create an internal database to pick the values from.<br />
First, you need to decide, which will be the driving parameter. In our case, the candidate parameter is the bolt<br />
thread diameter. Therefore, the bolt diameter is entered in the first column, followed by all the rest of the<br />
parameters (except the length). The names of the database columns (and the database itself) should be made<br />
descriptive, so that later, when creating variables, you could easily remember which column relates to which<br />
parameter. However, too long column names are not recommended either. A good strategy is to name the<br />
columns according to engineering standard notations adopted in your industry. In our example, the thread<br />
diameter is named d, the bolt head size - S, etc.<br />
In our example, the input bolt length must be rounded to the nearest<br />
standard length. We should also account for the fact that the set of standard<br />
lengths is different for each diameter. For example, the bolt diameter of 6<br />
mm corresponds with the length of 22 mm, while the bolts 12 mm in<br />
diameter have minimum length of 32 mm. Besides, depending on the<br />
selected bolt length, two additional parameters are defined: l1 and l0. We<br />
recommend creating separate databases of lengths for each diameter. The<br />
suggested database names are l6, l8, etc. The letter l, as in “length”, refers to<br />
the databases of lengths, while the number stands for the respective<br />
diameter.<br />
Once the databases are created, proceed to the next step.<br />
Creating Variables Relying on Databases<br />
At this step, we need to create variables that would be used for building the parametric drawing and the 3D<br />
model. We recommend using descriptive names for the variables.<br />
709