Jump to content
Developer Wiki and Function Reference Links ×

Drawing objects


Recommended Posts

I don't think I understand the question.

 

The Poly(...); command by itself will draw the polygon when the script runs. You don't need the handle for that.

 

If you are asking if you can get a handle to the polygon you just generated and use it inside the Xtrd command then I think the answer is yes.

 

Or are you asking a different question?

Link to comment

Of course, I could simply write:

 

    PROCEDURE MakeBeam(xtrd:REAL);
        
        BEGIN
            BeginXtrd(0, xtrd);
                Cerchio(0, 0, 100);
            EndXtrd;
        END;
but it doesn't make sense.

 

what I'd like to get is send to the xtrd procedure, the proper sectionProfile...

 

So if I have to make a tube, I'll send a 'CircleSection' or a 'WebSection' or a 'TubeSection'...

Link to comment

Hopefully the code below will give you come ideas. You could use IF instead of CASE also I think.

 

Procedure Test;
VAR        N1    :Integer;

Procedure MyPoly;
    BEGIN
        BeginPoly;
            MoveTo(0,0);
            CUrveTo(2,5);
            LineTo(10,5);
            LineTo(10,-5);
            CurveTo(8,0);
            LineTo(0,0);
        EndPoly;
    End;
    
BEGIN
    N1:=IntDialog('Enter value 1-3 for Extrude Type','1');
    BeginXtrd(0,10');
        Case N1 Of
            1:Rect(0,0,5,5);
            2:ArcByCenter(0,0,5,0,260);
            3:MyPoly;
        End;
    EndXtrd;
End;

Run(Test);

Procedure Test;
VAR		N1	:Integer;

Procedure MyPoly;
	BEGIN
		BeginPoly;
			MoveTo(0,0);
			CUrveTo(2,5);
			LineTo(10,5);
			LineTo(10,-5);
			CurveTo(8,0);
			LineTo(0,0);
		EndPoly;
	End;
	
BEGIN
	N1:=IntDialog('Enter value 1-3 for Extrude Type','1');
	BeginXtrd(0,10');
		Case N1 Of
			1:Rect(0,0,5,5);
			2:ArcByCenter(0,0,5,0,260);
			3:MyPoly;
		End;
	EndXtrd;
End;

Run(Test);

 

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...