Jump to content
Developer Wiki and Function Reference Links ×

Converting Polyline to NURBS switches NURBS to screen plane?


Recommended Posts

I've been trying to build a Loft NURBS in one of my PIOs.  I draw the Polylines, convert them to NURBS, and do a loft.  It works, as long as I'm in Top/Plan.   But, if I am not in Top/Plan, the NURBS jump to what appears to be screen plane.  I have tried using  SetObjectVariableBoolean(h,1160,TRUE/FALSE) and SetPlanarRef(h,0 and -1) to set the NURBS curves back to the right plane, but neither works.  The attached image shows the stack of poly lines, and what happens when they are changed to NURBS.  Does anyone know the proper way to tell the NURBS to stay where they were?

 

image.png.643448ea8aeddf16459d6bdad2fc9903.png

Link to comment

One thing you might try doing is checking if the current view is Top/Plan using GetProjection(ActLayer) looking for a return value of 6.  If not, save the current view with VSave, then set the view to Top/Plan using Projection, executing the draw code, then restoring the view with VRestore and deleting the temporary view with VDelete.  Kind of dumb, but if it works it's a whole lot easier than trying to force a bunch of NURBS onto the right plane.

Link to comment
3 hours ago, Jesse Cogswell said:

One thing you might try doing is checking if the current view is Top/Plan using GetProjection(ActLayer) looking for a return value of 6.  If not, save the current view with VSave, then set the view to Top/Plan using Projection, executing the draw code, then restoring the view with VRestore and deleting the temporary view with VDelete.  Kind of dumb, but if it works it's a whole lot easier than trying to force a bunch of NURBS onto the right plane.

 

Hmmm...I will try this.  Assuming it's not too resource heavy...if updating 20 PIOs at once, I wonder how quickly that executes.

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