Resolving dxf entities into closed shapes

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
mmb
Posts: 2
Joined: 15 Apr 2009, 21:50

Resolving dxf entities into closed shapes

Post by mmb » 15 Apr 2009, 22:35

Hi. For the following question, I am working only in 2 dimensions:

I have a dxf with multiple entities. These entities make up closed "shapes" -- there is a single "outer shape" and any number of shapes inside it. A single shape might be made up of multiple arcs and lines, etc.

Is there any built-in feature of CADImport that will automatically resolve all the entities in the .dxf into closed "shapes?" Once having done so, I want to be able to check for open shapes, overlapping shapes, etc., and finally to calculate the area of each shape (which can be highly irregular) and the length of the perimeter of each shape.

I have an idea on how I would do all this, but it would be a fair amount of work, and I don't want to launch into it if there are already built-in methods for doing some of this.

Thanks,

support
Posts: 3253
Joined: 30 Mar 2005, 11:36
Contact:

Re: Resolving dxf entities into closed shapes

Post by support » 16 Apr 2009, 10:12

Hello!

CAD Import .NET allows to get the whole list of entities inside of a drawing. We suppose that shapes in your file are CADPolylines. CADPolyline may consist of lines and arcs. But it could happen that shapes are created by separate CADArc, CADLine and CADPolyline object. First of all it is necessary to study some of your files examples.
So the task is:
  1. to open CAD file;
  2. to get a list of entities;
  3. to analyze entities' relations;
  4. to find entities' which are combined to a necessary shape;
  5. to calculate shape's area.
This task is not trivial. It requires serious human and time resources, as you fairly mentioned. And certainly such feature could not be available with a standard CAD Import .NET functionality. Nevertheless, this task could be solved as a custom development. Please contact us to sales@cadsofttools.com if you are interested in.

Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

mmb
Posts: 2
Joined: 15 Apr 2009, 21:50

Re: Resolving dxf entities into closed shapes

Post by mmb » 16 Apr 2009, 17:20

Hi. Thanks, that's what I figured.

I've analyzed some of the DXF's that I'll be working with, and the "closed shapes" are generally made up of arcs and lines (and they don't necessarily even appear in the right order in the file). A single shape might be made of 20-30 individual arcs, lines, polylines, etc.

I do have a plan for analyzing the start points and end points of all the entities, resolving them all into shapes, and then plotting them into 2-dimensional space, where I can start calculating areas, intersections, etc. But, indeed, it's not trivial. Just wanted to make sure I wasn't about to reinvent the wheel.

Thanks.

Post Reply