Jump to content

Separating point distance calculation per attribute


samboosa

Recommended Posts

What I have so far are several levels of points, each representing a higher floor of a building and having a 'level' attribute.

What I could (and want to) do is partition each level based on the attribute, and then calculate the distance to the next point per point in a foreach using the level attribute as a filter.

My question is, is there a quicker way to do this?

I'm generating the points in a python sop, so could i do something like this in python or a vop?

Link to comment
Share on other sites

Hi Jasper,

Do you have an example scene you can show? It's kind of hard to judge how to optimize without the (example) file.

Hello Kim,

Please see the attachment.

Right now you only see building cluster 83, so if you Imagine, if I were to 'foreach' hundreds of building clusters and then measure the point distances it could get slow.

point_levels.hipnc

Link to comment
Share on other sites

Hello Kim,

Please see the attachment.

Right now you only see building cluster 83, so if you Imagine, if I were to 'foreach' hundreds of building clusters and then measure the point distances it could get slow.

Hi Jasper,

the facadeGrid2 node is a missing otl can you add this one as well? More specifically it is missing the *.py code

# Couldn't find Python code. Please check that

# oplib:/Sop/facadeGrid?Sop/facadeGrid.py is in the proper location.

Edited by kgoossens
Link to comment
Share on other sites

Kim, thanks for your concern! The file is in my attachment.

Regardless, I think that trying to what I want with my own python sop is good practice, but I just don't know enough python to be able to do it effectively. It's much faster if I just stick to the normal workflow = I created a copy node/ add/ foreach and I am basically able to do what I want to do...without python (alas).

OPcustom.otl

Link to comment
Share on other sites

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.   Paste as plain text instead

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