30.07.2013 Views

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Fundamentals</strong>. Two-Dimensional <strong>Design</strong><br />

710<br />

First, define the driving variables for the rest of dimensions, whose values need to be defined when<br />

assembling the part. In this example, those are the diameter, the length and the implementation (see below).<br />

If a variable has a set of standard values, it is helpful to create the predefined list of values for convenient<br />

and quick input. The list of values can be created based on an existing field in the database. Upon creating a<br />

variable, it is a good practice to put a description in the comment field, so that another person can easily<br />

decide on what data to input, when working with this document.<br />

Next, we need to create variables that keep track of the database record number from which the values are<br />

taken. Such variable value can be read by calling the function rec or frec. For the functions description, refer<br />

to the chapter “Databases”. In this example, we need two such variables: one (the variable n) for accessing<br />

the values dependent on the bolt diameter from the respective database, and the other (the variable nl) for<br />

maintaining the value of the length. The challenge here is that the second variable should be assigned an<br />

appropriate record number across different databases (depending on the diameter). Besides, one should keep<br />

in mind, that the input length might not be always correct, as the designer of the part could enter a<br />

nonstandard bolt length. Therefore, the value of the variable nl can be described by the expression: d==6 ?<br />

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<br />

search for the record number in the database number 6, otherwise, if the variable d is equal to 8 - then do the<br />

search for the record number in the database named l8, and so on over all databases.<br />

Next, create the rest of the variables. Their values are accessed by calling the function val based on the value<br />

of the variable that keeps the record number of the database (those are - n and nl). The value of the bolt<br />

length (ll) will be defined by the expression: d==6 ? val(nl,l6) : (d==8 ? val(l8.l,l) :d==… ). The meaning<br />

of this expression is similar to that of the variable nl described above.<br />

The bolt has several implementations. The drawing should adjust, depending on the implementation. This<br />

can be fulfilled by setting, when necessary, the level of certain drawing elements below the displayable<br />

threshold. We need to create special variables for this purpose (separate for each implementation). By<br />

default, the displayable elements have level from 0 to 127. If the level of an element is below zero, it is not<br />

displayed. Consider, for example, the variable imp25 that defines the level of the elements visible only in the<br />

implementations number two and five. It is equal to 0 when the implementation (defined by the string<br />

variable $imp) is equal to “2 - with pin hole” or “5 - with pin hole and groove”, and is equal to -10 in all<br />

other cases: $imp=="2 - with pin hole"||$imp=="5 - with pin hole and groove"?0:-10.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!