Sunday, November 3, 2019

Common Connection Edge Between Intersection Walls

Common Edges:


These post aim to find length of edge if the two adjacent walls have a common edge between them and also on which side of both the walls edge do exists (Right, Left, Top, Front, back).


Figure(1) : Common Edge between two connecting walls


Why do we need that ?

We could of it advantage like, edge between two intersection wall gives the length of path available for moving from wall a to wall b.

Example:
Figure(2) : Common Path that edge allows



How we can find it ?

Step1:
 Find intersecting walls. Represent walls by line.

Step2:
See one wall w.r.t other wall.

For example,
Figure(3): 2D walls connection
from figure(3),
Red Wall - A,
Green Wall - B,
Both walls represented in line object.
Line object is represented by start and end point like a segments.
It can contains walls data such as wall height, thickness and direction.

Suppose we get the pair of intersecting line object and now to find the length of connecting edge
we can compare heights of two walls, whichever height is smallest we can use that height to find the
end point of path. So, till here we successfully calculated length of edge.

Figure(4) : Start and End point of edge
To find side of wall where edge is present.

We have to consider one of the endpoint (which is not intersecting) as origin.

For example,
in the below figure, if we consider red segment start point as origin then, 

Figure(5) : Initially before considering origin 
Figure(6) : After considering a Red walls endpoint as a origin


Figure(7) : Rotating about point s by 180 deg


This is what it will be finally, we are basically translating everything by s and then rotating about s.

Now these what we needed to determine the side type of edge.
Left will always start from start point of wall.
Right will be at end point of wall.
Back will be when walls are not connected side to side but connected perpendicularly on back side,
Front will be when walls are not connected side to side but connected perpendicularly on front side,

For Wall A(red), side type of edge is Back,
For Wall B(green), side type of edge is Left,

Examples,

1)
Red Wall-> 
Edge Side Type - Left
Green Wall->
Edge Side Type - Right
Figure(8) : side to side
2) 
Red Wall->
Edge Side Type - Front
Green Wall->
Edge Side Type - Right
Figure(9) : side to front



Calculating length of Edge:
Figure(10) : side to side, calculate edge length

Thank you !



Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home