[Domanda] Handle a list of points given by the user

Tags:
  • Visual
  • Scripting
  • Points
  • List
  • Interface
  • Usability

I want to create a Pythonpart that handles a list of points given by the user.

If the script starts for the first time the user is ask to input a number of points by klicking in the 3d-viewport. The user must define at least one point.
After completing the Pytonpart and closing the properties panel the user should be able to open up the properties again and change the list of points.
The user should be able to:
1. add new points
2. remove existing points (until 1 point is left)
3. change der position of existing points
(4. maybe remove all points and start a hole new list of points)

Executing thoos actions should be user friendly. Like removing points by klicking in the 3d-viewport or move points by handles.

I like to use node Polyline3DInput because it comes with a nice interface that can handle thoos actions in a more or less userfriendly way.
The downside is that it always needs at least 2 points to work properly. You can hit escape after input the first point but i think it causes some trouble.

In my opinion it would by good to have a Point3DInputList node that comes with a similar interface like the Polyline3DInput.
The allready existing ListPoint3DInput is good to keep a list but not to interactively change the list.
Maybe an evan better idea would be to have nodes that create buttons inside the properties panel which can be atached to a specific action. Like decrease/increase a counter or add new entry to list.
But this is a different topic.

Has somebody an idea how to setup a script that can handle a list of points like mentioned above?

Thanks in advance.

Gruß Felix
Allplan 2024-0-1

Allegati (1)

Type: image/png
71 scaricato
Size: 16,14 KiB

Currently, I don't think VS has the possibility to directly achieve the multiple points inputs. The most similar solution is as you mentioned to use an other node such as the Polyline3DInput. If you want to reduce the point count to 1, you have to recreate a new polyline with only one point... (Although a polyline needs at least two points, but with one point the script seems to work as well...)

We are considering making nodes like Point3dInput in future to support both single and multiple mode. User can then define by himself, how many times that action should be performed. What do you think?

Product Owner API, Allplan GmbH