Skip to main content
Solved

3d intersection

  • October 8, 2014
  • 1 reply
  • 48 views

Hello,

 

 

I needto check visibilities between a set of 3d-points. Therefore I created 3d-lines from pairwise 3d-points and tried to check for 3d intersections between the generated 3d-lines and 3d-surfaces/a DEM (WallSurfaces of a CityGML model). I used the SpatialRelator and SpatialFilter, but it seems, as if those transformers just work in two dimensions, because there were intersections detected, altough there is none in 3d?!

 

All I need is the information, if the input-lines intersect one or more surface(s) or the DEM and not which part of the DEM/which surface is intersected.

 

 

Thanks

Best answer by gio

Yeah, thase give you "apparent intersection" in 3D.

 

 

If you have like "high School Math" and a lot of stamina u could go for matrixcalcuation.

 

 

U you can use the 3DAffiner.

 

 

I made 2D affiner for inetersections...and when u convert it to fme attribute syntax..it becomes almost unreadable..but works like a charm.

 

2D lineintersect..

 

 

 

AttributeCreator [AttributeCreator]

 

Ix = @Evaluate(((@Value(Sx)*@Value(Ey)-@Value(Sy)*@Value(Ex))*(@Value(Sx_t)-@Value(Ex_t))-(@Value(Sx)-@Value(Ex))*(@Value(Sx_t)*@Value(Ey_t)-@Value(Sy_t)*@Value(Ex_t)))/((@Value(Sx)-@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)-@Value(Ex_t))))

 

Iy = @Evaluate(((@Value(Sx)*@Value(Ey)-@Value(Sy)*@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)*@Value(Ey_t)-@Value(Sy_t)*@Value(Ex_t)))/((@Value(Sx)-@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)-@Value(Ex_t))))

 

 

 

lines trough (Sx,Sy )(Ex,Ey) adn (Sx_t,Sy_t)(Ex_t,Ey_t).

 

I used a texteditor to search and replace variables by fme "syntax"...

 

 

3D is even worse... lol.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • Best Answer
  • October 8, 2014
Yeah, thase give you "apparent intersection" in 3D.

 

 

If you have like "high School Math" and a lot of stamina u could go for matrixcalcuation.

 

 

U you can use the 3DAffiner.

 

 

I made 2D affiner for inetersections...and when u convert it to fme attribute syntax..it becomes almost unreadable..but works like a charm.

 

2D lineintersect..

 

 

 

AttributeCreator [AttributeCreator]

 

Ix = @Evaluate(((@Value(Sx)*@Value(Ey)-@Value(Sy)*@Value(Ex))*(@Value(Sx_t)-@Value(Ex_t))-(@Value(Sx)-@Value(Ex))*(@Value(Sx_t)*@Value(Ey_t)-@Value(Sy_t)*@Value(Ex_t)))/((@Value(Sx)-@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)-@Value(Ex_t))))

 

Iy = @Evaluate(((@Value(Sx)*@Value(Ey)-@Value(Sy)*@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)*@Value(Ey_t)-@Value(Sy_t)*@Value(Ex_t)))/((@Value(Sx)-@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)-@Value(Ex_t))))

 

 

 

lines trough (Sx,Sy )(Ex,Ey) adn (Sx_t,Sy_t)(Ex_t,Ey_t).

 

I used a texteditor to search and replace variables by fme "syntax"...

 

 

3D is even worse... lol.