Select primitives facing curve

   987   1   1
User Avatar
Member
36 posts
Joined: March 2014
Offline
Hey All,

Can somebody give me a hint on how to select the house primitives facing the road curve here? (The houses and the roads are two separate objects)
Edited by stinzen - Sept. 19, 2019 10:41:45

Attachments:
OSM_data_small.jpg (71.9 KB)

User Avatar
Member
475 posts
Joined: July 2005
Offline
Hi,

As an idea:

For each primitive calculate the closest point on the road geoemtry (xyzdist() can be used).

Use the direction (from the center of the primitive to the closest point) to calculate the angle between the direction and the primitive normal.

If the roads are on a plane, the direction should be projected onto this plane/surface (probably the plane is the xz-plane).

Now a threshold can be used to detect, if the angle is higher/smaller than this threshold to set an id.

Attachments:
prim_towards_curves.hipnc (85.4 KB)

  • Quick Links