Question

Polygons from lines issue

  • 30 November 2015
  • 4 replies
  • 6 views

Hi!

I am having difficulties with a file I imported from CAD. I want to create a polygon of the outline and fill it with color.

My idea was to simply use the areabuilder and dissolver, but the areabuilder just outputs this in the pic below with (the lines shown are incomplete output).

I've tried using the snapper but I still don't get polygons which is strange since the lines are clearly overlapping or very close to eachother. What settings should I use for the snapper? Above 2 the shape gets visibly deformed. Am I using the wrong transformers?


4 replies

Userlevel 2
Badge +12

Hi,

Yo might need an Intersector if the lines are not clipped at the intersections. The AreaBuilder will not use the lines that cross the intersections.

Badge +2

CAD data can be a bloody nightmare - I've lost count of the number of times I've tried to do something like this, and I'm afraid to say that I normally end up giving up and asking the person who sent it to provide something better.

However, transformers that I've used in the past for this include:

- ArcStroker - stops arcs from being a problem

- Densifier - try adding loads of extra vertices to the lines so that the Snapper has more things to anchor to

- Snapper - and to answer your question, the setting is ground units (metres?) and you wouldn't normally want it to be more than a few centimetres, assuming there's an anchor point nearby

- Extender - may be more effective than the Densifier/Snapper combination if you have undershoots

- Intersector - as Erik says above, helps if you have overshoots

- GeometryValidator - fixes bad geometries that seem to turn up all the time in CAD data

Try those, roughly in that order, and you should find some kind of solution, but it might not be very good unfortunately!

Badge +2

Yes, this is because of the data. Is it possible to send the data such that I can give a try...

Badge +3

i have some scripts that can cope with most badly drawn Acad's.

Done it often.

Post your data, we give it a go...

Reply