Jump to content
Developer Wiki and Function Reference Links ×

Extrude along a path in PIO's


BillW

Recommended Posts

Are there any code examples of using CreateExtrudeAlongPath in a plugin object (in my case a Piont Plugin object) ie.

robjH := CreateExtrudeAlongPath(pathH,profH);

I am creating a polyline for the profile object and a polyline converted to a Nurbs object for the pathH. The problem is that the result differs when the screen view is different. I suspect it is because the convert to Nurbs is done in relation to the screen view AND OR the profile 2D object is converted in screen view.

Does this mean I have to generate the path and profile object directly as Nurbs objects and in the correct 3D register?

Any help would be much appreciated.

Bill Wood

Link to comment

Bill,

This may be a crude hack, but if you are depending on the result based on "Top/Plan" view, you could call the DoMenuTextByName function before you call CreateExtrudeAlongPath, like this:

DoMenuTextByName('Standard Views',1);

Maybe take it a step further by saving your current view first ad restoring it after you create the Extrusion.

Cheers,

-Rick Francken

Link to comment

Thanks for the comments.

I dont think its a good idea to change views within a plugin objects code.

I created the path object as a nurbs curve in it's correct register and it worked, even with a 2D polyline for the profile. However, the results were NOT always correct in my PIO.

I am writing a PIO to generate a cranked crown roof sheet with a corrugated profile. The apex has a curve which always has a 300mm radius, with the curve length varying with the pitch of roof.

Interestingly a roof pitch of 22.5 shows a reversed profile while 22.6 shows the profile in the correct orientation. Similarly 4.9 works 5 fails. The profile depth does not exceed the curve radius which may have been one reason. There doesnt seem much logic.

Has anyone had any similar experiences with flipped profiles

Bill Wood

Link to comment

Bill,

You are right. I wasn't thinking in the context of a plug-in object, but in a command or script. Changing views definitely would not be safe.

One thing you might try is go through the steps manually to create the Extrude. Create 2 new documents, in each one create the Extrude using a different view setting, then export both documents as Vectorscript. Now compare the 2 Vectorscript files to see what differences show up, and to see how the generated code differs from your plug-in code.

Good luck,

-Rick Francken

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