Return to Statement


Tube or Cable Example

Demonstrates the creation of a solid tube. The following program segment assumes you already have an active part on the screen. You are prompted to select objects from the screen to form the path of curves. You are also prompted to enter the values for outer diameter, inner diameter and tolerance for variables od, id and tol respectively.

 
NUMBER/ec,od,id,tol,resp1,resp2

ENTITY/SOLID1,OBJS(100)

.


.


.


od = 0.5

id = 0.0

tol = .001

L1: MASK/3,5,6,7,8,9

IDENT/'SELECT PATH FOR TUBE/CABLE', $

OBJS,CNT,ec,resp1

IF/resp1<3, JUMP/H9:

L2: PARAM/'ENTER TUB PARAMS',$

'OUTER DIA = ',od,$

'INNER DIA = ',id,$

'TOLER = ',tol,resp2

JUMP/L1:,H9:,resp2

L5: IF/id <>0, JUMP/C2:

C1: SOLID1=SOLTUB/OBJS(1..ec),DIAMTR,od,TOLER,tol, $

IFERR,H8:

JUMP/C3:

C2: SOLID1=SOLTUB/OBJS(1..ec),DIAMTR,od,id,TOLER, $

tol,IFERR,H8:

C3: MESSG/'LIKE IT?'

&COLOR(SOLID1)=&COLOR(SOLID1)+1

JUMP/L1:

H8: MESSG/'ERROR IN CREATING TUBE'

JUMP/L1:

H9: HALT


Solid Tube Creation