Jump to content

3D Path tool, draw polyline instead of curved lines


Recommended Posts

Hi,

 

Im working on a python tool that will draw something on a 3D path, but I'd like the path to be displayed as a polyline instead of curves when drawing the path.
See attached image for what i do not want 🙂

Does anybody have a clue how I could approach this?

 

Thanks!
image.thumb.png.5f26068e38b29347978d9fb8e411a1fb.png

Link to comment

Any 2D or 3D path-based object is going to use the polyline tool or the NURBS tool, respectively, to draw the path, and will respect the options in the more bar. For 2D, you can select the point vertex mode, and for 3D set the NURBS degree to 0. You can't force the mode. You could write a custom tool for placing the PIO that only draws polygons, though that adds a significant amount of complexity to your project.

Link to comment

I believe I am using the built-in tool 3D Path tool for python.

The reason I'd like to set the options through python is that this plugin will be distributed to all VWX engineers in the company, and it would be ideal if all the settings would be set by default. Would this be possible?

 

Link to comment

Python/vs does not have a way to change tool defaults and the NURBS degree doesn’t appear to be something that’s a program preference. 
 

The option that gives you then most control would be to create a custom tool for acquiring the 3D points that define the path. 
 

In theory, the NURBS tool preference gets written to your user preferences, and you can try searching the xml file for the value. You can then access with Get/SetSavedSettings(). But your code isn’t going to run before you place your first object, so your users would have to run a command to set the settings before inserting the object for the first time. 

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