Cross product lacing on corresponding sub-lists

Hello all,
I am kind of stuck since yesterday trying to figure this out. I am using a Surface.PointAtParamater node using a list of surfaces, and each surface will have a corresponding list of U and V values where I would like them to be laced as crossproduct but on a sub-list level.
I have tried the replicationguide concepts but couldn’t really figure it out.
I tried another approach as it works fine when I GetItemAtIndex, but to make it work for n number of surfaces I’ve tried to use a while-loop, but also cannot make it work, I have quite little knowledge about scripting unfortunately.
Any ideas or help?


@aalqamary asper my understanding u need all points on the surface with possible U & V values, so here I attached a sample for you, in your file u will get 26565 combinations.

Hey Akhil, Thanks for your reply. However this is getting all the points on all the surfaces, it is not really my goal.
So, assuming I have 4 surfaces… each surface has different division of points on U and different divisions of point on V (it is based on the surface dimensions), and I would like to cross product between the corresponding U and V divisions on their surface.

1st surface has 4 U divisions and 6 V divisions, it should have 24 pts
2nd surface has 8 U divisions and 12 V divisions, it should have 96 pts
3rd surface has 2 U divisions and 8 V divisions, it should have 16 pts
4th surface has 6 U divisions and 6 V divisions, it should have 36 pts

So total should be 172 pts… If I just do the cross product lacing on all of them I would get 640 pts instead

I believe you want list levels @L1, @ L2, and @L2 for each of the respective inputs.

Hey Jacob, yes, that is the case more or less. It worked fine when I flattened the list of points (to match the level of surfaces) and got the items (srf, u, v) at a single index as shown in the lower part of the first image… but I cannot get it to work on the whole list

No image above shows those list levels being applied.

Build a basic data set where you have a flat list of three faces receiving (3,2), (2,2) and (2,4) points respectively. Then post that screenshot with the lacing in cross product and list levels at L1, L2, L2 so we can have a look at where you are getting stuck.

Ah, I finally worked out a way out using @Dimitar_Venkov LoopBody example.


Thanks anyway!

An example using replication guide:

Surface 1: 4u divisions and 6v divisions, output = 24 pts.

Surface 2: 8u divisions and 12v divisions, output = 96 pts.

Total = 120 pts.

Autodesk.Surface.PointAtParameter(surf<1>,u<1><2>,v<1>);

or

Autodesk.Surface.PointAtParameter(surf<1>,u<1>,v<1><2>);

5 Likes

Wow, so much simpler and cleaner! Thanks a lot!
But can you explain to me what are the 1st level <1> means and what are the second level mean <2>?

Like for instance, what would be the syntax for the normal cross product that applies on the 3 inputs?

1 Like

Hi @aalqamary

I strongly suggest that you take a look at the documentation:

2 Likes