Solved

Extend Line to Create outer wall

  • 6 February 2018
  • 7 replies
  • 2 views

Badge

Good afternoon,

I've been working on this process for quite awhile with no luck. The objective is to convert a CAD drawing of interior spaces. I took the original CAD exterior walls (BLUE), and created polygons. I then used a centerline replacer to create the middle line (RED). However I cannot extend the line. I've tried intersector and snapper\\anchor snapper, no luck. I've also tried line extender, intersector, snapper and again the lines will not budge. I'm at a lost. Any help would be greatly appreciated!

The large gaps in the front of rooms are for doors, which I have worked around. These wall lines are my biggest problem. I'm thinking Python might be a better position.

Thanks,

 

David

icon

Best answer by redgeographics 7 February 2018, 10:39

View original

7 replies

Badge +22
Interesting challenge. Could you provide some sample data? Also is the desired end result a polygon for every room?

 

 

Badge
Interesting challenge. Could you provide some sample data? Also is the desired end result a polygon for every room?

 

 

Yes. They would like each room to be its own polygon. Attached is a sample CAD file. test1.dwg

 

 

Userlevel 4
Badge +25

Here's a stab at it. The key is that the centerlines are aggregates and the LineExtender can't handle those. So I deaggregate and then do a SpatialRelator to find out which lines actually need to be extended (lines where one end is dangling free).

You do have to set the extension length manually and make sure that's long enough to actually reach the end of the wall. After that, clipping and linejoining should do the trick, although on complex situations you may need to tweak the process a bit.

Hope this helps.

walls.fmw

Badge

Here's a stab at it. The key is that the centerlines are aggregates and the LineExtender can't handle those. So I deaggregate and then do a SpatialRelator to find out which lines actually need to be extended (lines where one end is dangling free).

You do have to set the extension length manually and make sure that's long enough to actually reach the end of the wall. After that, clipping and linejoining should do the trick, although on complex situations you may need to tweak the process a bit.

Hope this helps.

walls.fmw

Thanks for the comment and diagram! I tried to manually close the rooms using the line extender, however at the vertices, they go off at different angles. I'm fairly new to FME, is there a way for the lines to extend to the next vertex, if the line was to continue along the same trajectory? Or if easier how I can I remove the dangles. I've tried clip but lines wont clip to another line.

 

Thanks for any help!

 

 

David

 

Badge +3

david_prosack88

The centerline replacer causes that.

Rebuild the lines before using the extender.

Chop them by 2 vertices. Id the lines prior and after chopping for control. Only keep where they go straight (compare the angles using azimuth creator or basic goniometry)

Reassemble the lines using line joiner grouped by relevant id's.

Then extend.

(I meant the angular extension of course, when I mentioned the centerline replacer)

Badge

Thanks! But those dangles are created after the line extender is used.

Badge

Here's a stab at it. The key is that the centerlines are aggregates and the LineExtender can't handle those. So I deaggregate and then do a SpatialRelator to find out which lines actually need to be extended (lines where one end is dangling free).

You do have to set the extension length manually and make sure that's long enough to actually reach the end of the wall. After that, clipping and linejoining should do the trick, although on complex situations you may need to tweak the process a bit.

Hope this helps.

walls.fmw

Thanks for the help! I made some modifications and it works very well! I am new to FME, so one question I have is when you added the GeometryReplacer and GeometryExtractor, why did you choose FME Binary? What does that do?

 

 

Thanks!

Reply