title: Split an object based on other intersecting objects
body: <p>I'm trying to create a wall placement system a kin to Sims, and am having trouble figuring out how to split the wall if you put another wall perpendicular to it.</p>
  <p>Players place a post and a post, and a wall is created in between
  <a href="https://i.stack.imgur.com/b6BwJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b6BwJ.png" alt="1" /></a></p>
  <p>I store these 2 post vectors in a table, with the wall object being the key</p>
  <pre><code>self.Poles[Wall] = {
      Pole1 = pole1CFrame.Position,
      Pole2 = pole2CFrame.Position
  }
  </code></pre>
  <p>However, placing a wall perpendicular, like so
  <a href="https://i.stack.imgur.com/h4Zfx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h4Zfx.png" alt="2" /></a></p>
  <p>Would mean I need to split the previous wall in half like here
  <a href="https://i.stack.imgur.com/od8KP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/od8KP.png" alt="3" /></a></p>
  <p>As well as if they place the wall further in, so there's no post on the wall, it needs to know what walls needed to connected and what not like here
  <a href="https://i.stack.imgur.com/Zzmru.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zzmru.png" alt="4" /></a></p>
  <p>I'm unsure if placing the walls in a table is necessary.<br />
  Maybe if I just stored like 1 post in the table, and have it's value be the second post?</p>