Hello,
I'm trying to find a way to delete small ‘cables’ from this little network.
So my guess is to use the foreach node to browse between all the primitives entries, and using an expression based on bbox to delete small cables.
Obviously the expression is wrong :
if (bbox(“../foreach_begin1/”, D_ZSIZE) > 5, 1, 0) … I pretty sure the “../foreach_begin1/” doesn't make any sence, but I have no idea what to give for the path for the bbox expression.
I would really appreciate any input, or maybe video link related to this
Thanks a lot !
Delete by bbox size (SOP)
4831 4 1- PascalBkm
- Member
- 17 posts
- Joined: 5月 2016
- Offline
- PascalBkm
- Member
- 17 posts
- Joined: 5月 2016
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
Interesting .
I would instead in a foreach , create a point at the centroid of each line, then using a point cloud measure the distance to the centroid from each point in the lines. of course short lines will have short distance values. That distance becomes the threshold to delete by.
Rob
I would instead in a foreach , create a point at the centroid of each line, then using a point cloud measure the distance to the centroid from each point in the lines. of course short lines will have short distance values. That distance becomes the threshold to delete by.
Rob
Gone fishing
- tamte
- Member
- 8635 posts
- Joined: 7月 2007
- Offline
you don't have to use foreach at all
just do single Primitive Wrangle with code like:
to delete lines based on their perimeter (length) if it's smaller than minlength parm
just do single Primitive Wrangle with code like:
if (primintrinsic(0, "measuredperimeter", @primnum) < chf("minlength") ) removeprim(0, @primnum, 1);
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- PascalBkm
- Member
- 17 posts
- Joined: 5月 2016
- Offline
-
- Quick Links