Jump to content
Developer Wiki and Function Reference Links ×

Path Extrusion in Layers with offset elevations

Recommended Posts

Hello VS folks !


Sometime ago i implemented a tool (vst) that applied a path extrusion using some profile libraries for a customer...


createcustomobjectpath('Extrude Along Path', hNURBsPath, hperfil);


And the result is perfect ! However, we found a weird behavior happening when we try to use this tool in a layer with an elevation different then zero.

When i try to use the tool in any layer with elevation different then zero, the resulted path extrusion follows a completely different path.

Trying to fix this behavior i tried to use   SetLayerElevation(ActLayer, 0.00, 0.00);

Before the call to createcustomobjectpath('Extrude Along Path', hNURBsPath, hperfil);

It fixes the problem ... however, only if i leave the elevation of the layer at 0.00

If i try to call SetLayerElevation() to restablish the original elevation (after the call to createcustomobjectpath()) the result is an incorrect path again...


Any ideas ?

Link to comment

What do you mean by the profile object takes an entirely different path? Can you show us images? Can you post a small test file with copies of the extrudes on layers with different elevations?


It will be much easier and better to try and troubleshoot your objects than to try and create an object that duplicates the problem.

Link to comment

Follows attach a .vst which has just a part of the function i use in my plug-in to apply the Path Extrude

I'm attaching also a .vwx that shows the behavior mentioned...


To reproduce:

After loading the vst in there interface... 

- Open the document, execute the tool and draw a path on the top of the extruded polygon ...

The tool applied profile in a path extrude modeled without problems...

Delete the path extrude model



- Change the layer to "Level 1" (which is 300cm above Level 0)

Execute the tool again... and draw the path again using the same reference points over the extruded polygon

See the  result



Border Aplication TEST File.vwx

Aplic Perfis TST.vst

Link to comment


6 hours ago, JBenghiat said:

How are you getting hNURBsPath? If you are drawing as a 2D path or using a 2D profile group, this may help:


hNURBsPath:=ConvertToNURBS(hPoly, TRUE);



I'm using CallTool (-313) to call 3D Polygon to draw the path ... inside the tool. And it works perfectly ... except of the fact it displace things when the layer has an elevation as mentioned ... 



Link to comment

Make sure that the profile object is a group as in:





profileHdl:= LNewObj;


I have not come up with the offset elevation problem because I do keep the insertion point at 0 elevation for all PIOs. However, I do have to place the PIO at the same elevation as the terrain model. Rather than change the layer elevation , I move the entire object to the desired elevation as in:


        PROCEDURE SetElev(objHdl: HANDLE; org3Dz,elev: REAL);
            dz: REAL;
        dz:= elev - org3Dz;
        IF dz <> 0 THEN

I did have a problem at one time with the change in elevation not showing so I had to add the ResetObject to fix it.


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.

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