Jump to content

Can you check incoming geometry type?


samboosa

Recommended Posts

Is there an expression or method to check for incoming geometry type?

I want to check if the incoming geometry is a nurbs-curve or a polygon-line as I want to reroute each to a different procedure.

Context:

I'm creating a wall-system which will have straight segments and curved segments, I want each to be treated differently.

Link to comment
Share on other sites

You can use a Delete SOP to delete all but NURBS Curves, and another Delete SOP to delete all polygons. You can do whatever you need to do in each branch, then merge the two branches back together. For example:

              |
            null1
           /     \              \
      keep_N    keep_P        delete_N
         |          |            |
   (proc_nurbs)  (proc_line)  delete_P
          \       /             /
            merge1

where the Delete SOP keep_N deletes all prims but NURBS, and keep_L deletes all prims but polygons (open ones, hopefully). If you want to keep other primitive types that are neither type and pass them through, you'd have to add a third branch where you have 2 Deletes in serial - one to delete NURBS curves, and the other to delete polygons, and merge that into merge1. This will prevent them from appearing twice in the output.

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