[Frage] How to take out a 3D point from a list of points? [Gelöst]

Schlagworte:
  • [AIDP-159784]
  • [AIDP-156710]

Greetings, I have a question about extrapolation of data from points list. So, I have a list of points and I’m trying to pull out every point from that list and change its X value by a specific number.

Scenario: I am trying to create Grid systems (N) times each one with (L) distance in the Y axis from each starting point. From here the grids must be able to move in the X axis individually.

My current method and problem: For the generation of the Grid, I am using a “Rectangle Grid Points” node, in order to have starting points for each grid, while allowing me to modify their number and distance. From there I create list of all points and here I am not sure how to continue. Is there any way to take out each point separately from the list, modify its X value, and then feed it to another “Rectangle Grid points” node? I am guessing I have to use the “List Item” nodes which uses index, but I don’t understand how it works. See “Grid systems sample 1.jpeg” where I have tried to create a simple structure of what I am trying to achieve, although here the Y input for the final Grid node isn’t correct.

EDIT: Updated the image (the Index nodes should be connected to the Grid points of the grid node)

Thank you in advance,
Dobromir

Anhänge (1)

Typ: image/jpeg
63-mal heruntergeladen
Größe: 173,71 KiB

Lösung anzeigen Lösung verbergen

You could easily move points from the grid in x direction individually by using the node "MoveByVector". Please check the attached picture and script.

The red points are the result from the node grid. The blue points are the ones with modified x-coordinate.

Another option is to use "Point3DDeconstruct" to extract the y-coordinates and then use "Point3D" to recreate points with desired x-coordinates.

I hope I understand your problem correctly...

Product Owner API, Allplan GmbH

Anhänge (2)

Typ: image/png
75-mal heruntergeladen
Größe: 62,60 KiB
Typ: text/xml
784-mal heruntergeladen
Größe: 3,88 KiB

You could easily move points from the grid in x direction individually by using the node "MoveByVector". Please check the attached picture and script.

The red points are the result from the node grid. The blue points are the ones with modified x-coordinate.

Another option is to use "Point3DDeconstruct" to extract the y-coordinates and then use "Point3D" to recreate points with desired x-coordinates.

I hope I understand your problem correctly...

Product Owner API, Allplan GmbH

Anhänge (2)

Typ: image/png
75-mal heruntergeladen
Größe: 62,60 KiB
Typ: text/xml
784-mal heruntergeladen
Größe: 3,88 KiB

You could easily move points from the grid in x direction individually by using the node "MoveByVector". Please check the attached picture and script.

The red points are the result from the node grid. The blue points are the ones with modified x-coordinate.

Another option is to use "Point3DDeconstruct" to extract the y-coordinates and then use "Point3D" to recreate points with desired x-coordinates.

I hope I understand your problem correctly...

Thank you for your reply,

The method you have used in the jpeg is a major step in the right direction, but the problem with dynamic number of length inputs remain. In the example you have used the random length node in which you can select the number of inputs you desire. Is there a node where you can select how many inputs you want to have first, then giving them value and finally feeding them in the X value of the "Vector3DbyX" node?

- I tried using the "Multi Length Input" node but it has fixed number of inputs (can't have more than 5 inputs)
- The "List fill Length delta" node seems to divide, based on X times, the total length in a equal values

"ListLengthInput" supports dynamic number of length input, you just need to get that total number of points from the grid. Please check MultiLengthInput.gif. But there is a known issue, that restart the script may reset values in that node. We are working on that. Hopefully, we could get it fixed soon.

But if you generated so many points, do you really want to adjust each point position manually? If you have some rules to define the offset value, you perhaps don't need to define all of them manually.

Product Owner API, Allplan GmbH

Anhänge (1)

Typ: image/gif
82-mal heruntergeladen
Größe: 68,02 KiB

Splendid, this command works as a charm.
Otherwise the first time I use the grid node is just to create points in the Y axis (its much easier as it combines several inputs), so they won't be that many, between 1-10, I would guess. Unfortunately, there is no pattern when it comes to moving them, so they have to be moved individually.

On the topic with issues, is there a known bug when feeding multiple 3D points into the placement point of "RectangleGridPoints" node (see "Multiple grids.jpeg")? It seems to stop the script from running. I tried also connecting it to 2x 3Dpoint input nodes - in case the "blue points" are now readable as objects instead of 3D points, but i get the same result. Also tried using the move command on the Grid to those points, (in a way to copy it to each point) but the script crashes. My apologies, for going off the main topic.

The whole script that I am doing is tiling by object command. The place I'm stuck at is where you select the number of unique rows and their offset. For example I have a row of an object. Then the upper row is moved by A distance in the X axis, then the next with B distance in the X axis. So now I have a total of 3 unique rows, which will be copied in the Y direction, filling the selected area. I have created non-dynamic script (that runs on exactly 4 rows) which you can see in the "Tile by object.jpg", with its inputs and test run.

Edit: For anyone having the same problem, I worked around the bug with the feeding multiple points to the grid node, by using the "CopyAlong" node on the first grid. The script becomes a bit slower but still works.

Dobromir

Anhänge (2)

Typ: image/jpeg
34-mal heruntergeladen
Größe: 146,44 KiB
Typ: image/jpeg
50-mal heruntergeladen
Größe: 328,59 KiB

Zitiert von: DGeorgiev
On the topic with issues, is there a known bug when feeding multiple 3D points into the placement point of "RectangleGridPoints" node (see "Multiple grids.jpeg")? It seems to stop the script from running. I tried also connecting it to 2x 3Dpoint input nodes - in case the "blue points" are now readable as objects instead of 3D points, but i get the same result. Also tried using the move command on the Grid to those points, (in a way to copy it to each point) but the script crashes. My apologies, for going off the main topic.

Thanks for the feedback. It is a new bug. We will check that.

But I'm not sure if it works with multiple points, as VS currently doesn't support multi-dimensional (3 or more) list very well yet.

Product Owner API, Allplan GmbH