Skip to main content
Solved

Extend Line to Create outer wall


Forum|alt.badge.img

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

Best answer by redgeographics

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

View original
Did this help you find an answer to your question?

7 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • February 6, 2018
Interesting challenge. Could you provide some sample data? Also is the desired end result a polygon for every room?

 

 


Forum|alt.badge.img
jdh wrote:
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

 

 


redgeographics
Celebrity
Forum|alt.badge.img+49
  • Celebrity
  • Best Answer
  • February 7, 2018

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


Forum|alt.badge.img
redgeographics wrote:

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

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 7, 2018

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)


Forum|alt.badge.img

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


Forum|alt.badge.img
redgeographics wrote:

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!

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings