Solved

create a polygon from many lines inside it.

  • 28 February 2023
  • 7 replies
  • 1 view

Badge +3

I've got walls. dgn file. In the source dgn file, there are numerous lines that are utilized to form walls.

I wanted to combine all these different lines into a straightforward wall. so I joined manually the outermost wall line to create a walls shape/polygon.

In the attached sample file , source features and One straightforward wall feature is created in "merged wall" level/layer number 2(blue color) for ref. I just drew one simple polygon feature how the expected feature looks like. . Please, if someone can assist me.

icon

Best answer by nielsgerrits 1 March 2023, 13:54

View original

7 replies

Userlevel 6
Badge +33

One way to do this is create lines from input, intersect, snap, build areas, exclude unwanted areas and dissolve.

 

Attached a workspace which does this. When I do this I look for a simple way to exclude areas. From the Data Inspector it is easy to right click and copy a ground coordinate to create a point in an area you want to exclude. This can be added to the list of coordinates in the AttributeCreator to exclude the area down the line. Iterate until you are happy.

I appreciate you sharing the content and hope you will do it again soon. Roblox Doors

Badge +3

One way to do this is create lines from input, intersect, snap, build areas, exclude unwanted areas and dissolve.

 

Attached a workspace which does this. When I do this I look for a simple way to exclude areas. From the Data Inspector it is easy to right click and copy a ground coordinate to create a point in an area you want to exclude. This can be added to the list of coordinates in the AttributeCreator to exclude the area down the line. Iterate until you are happy.

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

Userlevel 6
Badge +33

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

Not sure why these are not being filled. There is probably logic to be found if you debug enough. It is probably quicker to implement the same technique to force some areas to be filled.

Badge +3

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

Thank You!very much @nielsgerrits​ 

Badge +3

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

@nielsgerrits​ I have about 20 drawings just like this. For all of the drawings, I cannot run the same fme script. because this FMW file's hardcoded points list coordinates. Making a universal FMW that will construct walls for all files is the difficult part of this.

Userlevel 6
Badge +33

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

I agree. I would just fix one drawing, clear the coordinate lists for ignoring and forcing area's and do it again for the next one. Yes it will take time. Yes it will be a lot faster than do it all by hand in the native software.

 

If you have many more files to transform it will pay off to work on a better workspace, but if you're time crunched and need the job done, my experience this is the way to go.

 

When I get a request to automate something I always ask myself, how much features or actions do I need to process? 10 or 100 or 1000? If 10, do it by hand. If 1000, automate. If 100, it really depends on the amount of work per feature, but manual work is probably faster.

 

Randall Munroe (XKCD) created something about this:

automation

Reply