i have a list of coordinates that represent a starting point for a new geometry. The represents the new geometry (rectangle), that i want to create a poly line from.
P0 = Start point; P1-P4 creates the corners for each point P0.
i am getting a Null result, can anyone help me with this.
I don’t think that Contact isn’t a method which can be used like that in design script. A syntax like this might work: List.Join([existingList, newPoint1, newPoint2, newPoint3, newPoint4]);
That said: imperative is not needed here. Instead of an imperative code block, try the standard associative.
Or better still:
- Draw your rectangle once at the origin (Rectangle.ByWidthLength node)
- Generate a coordinate system at each point (CoordinateSystem.ByOrigin node)
- Transform the rectangle by each coordinate system (Geometry.Transform node).
2 Likes
Rectangle.ByCornerPoints
already requires 4 separate inputs so you can just create your list of 4 separate corner points in an associative block like Jacob mentioned. It’s way shorter and easier.
That being said, the reason you’re getting nulls currently is because PNTS..Count
isn’t a thing. You seem to be combining the syntax of a shorthand sequence and the list count:
0..(List.Count(PNTS)-1)
1 Like