Jump to content
Developer Wiki and Function Reference Links ×

ExtrudeAlongPath


Recommended Posts

Maybe, something's wrong.

Of course the objects created (path & sect) works fine using them in main window...

The handles works fine... :(

 

Thank you

 

L.

Here's the simple code:

 

 

 PROCEDURE Prova_Porta_01;
 CONST
    {capitalized to distinguish them from variables}
    
 VAR
    s:STRING;
    i:INTEGER;
    sp:REAL;
    base:REAL;
    altezza:REAL;
    SectObjectHandle:Handle;
    PathObjectHandle:Handle;
    FrameObjectHandle:Handle;
    PROCEDURE DrawSection(s: REAL);
    BEGIN
        ClosePoly;
        Poly(
        0,0,
        0,3,
        3,3,
        3,s,   { coordinate assolute }
        -6,s,
        -6,0
        );
        SectObjectHandle:=LNewObj;  
        
    END;
    
    PROCEDURE DrawPath(b: REAL; h:REAL);
    BEGIN
        {Relative;}
        OpenPoly;
        BeginPoly3D;
        Add3DPt(3,3,0);
        Add3DPt(3,3,h);
        Add3DPt(3+b,3,h);
        Add3DPt(3+b,3,0);
        EndPoly3D;
        PathObjectHandle:=LNewObj;
        END;
    
    PROCEDURE MakeFrame(h1, h2: HANDLE);
    BEGIN
        FrameObjectHandle:=CreateExtrudeAlongPath(h1,h2);
    END;
    
 BEGIN
   sp:=Ps;
   base:=Pb;
   altezza:=Ph;
   
   DrawSection(sp);
   DrawPath(base, altezza);
   MakeFrame(PathObjectHandle, SectObjectHandle);
   {FrameObjectHandle:=ExtrudeAlongPath(PathObjectHandle, SectObjectHandle); } it doesn't works too
   {Move3DObj(SectObjectHandle, 50,0,0); moving does works fine, so it's mean that the handle works
   Move3DObj(PathObjectHandle, 50,0,50);}
   
 END;
 
 
 Run(Prova_Porta_01);

Edited by lucioing
Link to comment

Thank you Josh!

I've just try this and it does works.

;):)

 

L.

 

 PROCEDURE Prova_Porta_01;
 CONST
    {capitalized to distinguish them from variables}
    LOCAL_GREETING_ENGLISH = 'Hello ';
    LOCAL_GREETING_FRENCH = 'Bonjour ';
 VAR
    s:STRING;
    i:INTEGER;
    sp:REAL;
    base:REAL;
    altezza:REAL;
    SectObjectHandle:Handle;
    PathObjectHandle:Handle;
    FrameObjectHandle:Handle;
    PROCEDURE DrawSection(s: REAL);
    BEGIN
        ClosePoly;
        Poly(
        0,0,
        0,3,
        3,3,
        3,s,   { coordinate assolute }
        -6,s,
        -6,0
        );
        SectObjectHandle:=LNewObj;  
        
    END;
    
    PROCEDURE DrawPath(b: REAL; h:REAL);
    BEGIN
        {Relative;}
        OpenPoly;
        BeginPoly3D;
        Add3DPt(3,3,0);
        Add3DPt(3,3,h);
        Add3DPt(3+b,3,h);
        Add3DPt(3+b,3,0);
        EndPoly3D;
        PathObjectHandle:=LNewObj;
        END;
    
    PROCEDURE MakeFrame(h1, h2: HANDLE);
    BEGIN
        FrameObjectHandle := CreateCustomObjectPath('Extrude Along Path', h1, h2);   <<<--------------------
    END;
    
 BEGIN
   sp:=Ps;
   base:=Pb;
   altezza:=Ph;
   
   DrawSection(sp);
   DrawPath(base, altezza);
   MakeFrame(PathObjectHandle, SectObjectHandle);
  
   
 END;
 
 
 Run(Prova_Porta_01);

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...