pcsegment. How is it supposed to work?

   591   4   0
User Avatar
Member
19 posts
Joined: Sept. 2011
Offline
I am trying to used pcsegment that is new VEX function from h18.
https://www.sidefx.com/docs/houdini/vex/functions/pcsegment.html [www.sidefx.com]

int [] pcsegment(<geometry>geometry, string PChannel, vector P0, vector P1, float max_distance, int maxpoints)

I thought it just collects points around the line between P0 and P1 vectors but the most of the case, it collects points only around either P0 or P1. I found it works expectedly only when the angle between vector ((0,0,0) to P0) and vector (P0 to P1) is close to 90 degrees.

I am just curious if it is the correct behavior or bug.


h18.0.287. Linux Mint.

Thanks,
Ryoji

Attachments:
Screenshot from 2020-01-01 11-06-47_1.png (1.1 MB)
Screenshot from 2020-01-01 11-06-47_2.png (1.1 MB)
opsegment.hip (89.1 KB)

User Avatar
Member
477 posts
Joined: Feb. 2017
Offline
the result can be spasmodic when the line in question is far enough away from Origin.

Here's a file to illustrate the bug. Angle can be anything, it works fine…but if the line is
translated away from Origin far enough, result is unpredictable.

I have reported this bug to SESI.

Attachments:
pcsegment_bug.jpg (109.6 KB)
vu_pcsegment_bug.hiplc (93.6 KB)

User Avatar
Member
477 posts
Joined: Feb. 2017
Offline
yes !!!…workaround. Line does not have to be anywhere near Origin.

But it would be nice if SESI would fix the vex function itself.

Attachments:
workaround.jpg (179.5 KB)
vu_pcsegment_workaround.hiplc (110.0 KB)

User Avatar
Member
477 posts
Joined: Feb. 2017
Offline
yes yes yes…..multi segs.

Attachments:
multisegs.jpg (252.8 KB)
vu_pcsegment_workaround_multisegs.hiplc (117.4 KB)

User Avatar
Staff
4737 posts
Joined: July 2005
Offline
An embarrassing bug!

Thank you for isolating & reporting this.

Hopefully 18.0.339 will work for you without the need for workarounds.
  • Quick Links