samboosa Posted September 15, 2012 Share Posted September 15, 2012 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. Quote Link to comment Share on other sites More sharing options...
malexander Posted September 15, 2012 Share Posted September 15, 2012 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. Quote Link to comment Share on other sites More sharing options...
kgoossens Posted September 15, 2012 Share Posted September 15, 2012 (edited) isspline(surface_node, prim_num) Returns 1 if a specified primitive is a NURBs or Bezier curve or surface. Edited September 15, 2012 by kgoossens Quote Link to comment Share on other sites More sharing options...
samboosa Posted September 16, 2012 Author Share Posted September 16, 2012 Thanks for your reply! On the sidefx forums I was told a simple expression; isspline(surface_node, prim_num) which would return '1' if its a spline and '0' if not. Also kgoossens just posted that Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.