DXF FileProcessing

Advanced parsing and intelligent part identification

Our sophisticated DXF parser handles all standard AutoCAD entities, ensuring compatibility with files from any CAD software. Combined with intelligent part identification and classification algorithms, Sheet2Nest automatically detects, categorizes, and optimizes parts for maximum nesting efficiency.

All Entity Types
Intelligent Classification
Auto Detection

ProcessingPipeline

From DXF file to classified parts ready for nesting

1

Parse DXF Entities

Extract all geometric entities from the DXF file

Reads LWPOLYLINE, POLYLINE, CIRCLE, ELLIPSE, ARC, SPLINE, and LINE entities. Preserves layer information and entity properties.

2

Build Contours

Convert entities into continuous geometric contours

Connects related entities to form closed or open paths. Handles complex nested geometries and multi-segment shapes.

3

Detect Closed Shapes

Identify closed contours that represent parts

Uses geometric algorithms to detect closed loops. Auto-closes open paths when appropriate. Validates shape integrity.

4

Classify Shapes

Distinguish between outer contours and holes

Uses containment algorithms to identify which shapes are holes within larger parts. Sorts by area and applies geometric containment tests.

5

Identify Part Types

Classify parts by geometric properties

Analyzes shape characteristics to categorize parts: circles, squares, rectangles, long strips, and irregular shapes.

6

Assign Rotations

Determine allowed rotation angles for nesting

Based on part classification, assigns optimal rotation angles (0°, 90°, 180°, 270°) to maximize nesting efficiency.

Intelligent PartClassification

Our advanced algorithms automatically identify and classify parts using geometric analysis

Circle

Perfect circles and near-circular shapes

CRITERIA:

Aspect ratio < 1.2, ≥16 vertices for polylines

ROTATIONS:

0°

EXAMPLES:

Round plates, washers, discs

Square

Perfect squares with equal sides

CRITERIA:

4 vertices, area ratio 0.60-1.10, equal width/height

ROTATIONS:

0°

EXAMPLES:

Square brackets, plates, frames

Rectangle

Rectangular shapes with different width/height

CRITERIA:

4 vertices, area ratio 0.60-1.10, rectangular bounding box

ROTATIONS:

0°90°

EXAMPLES:

Panels, sheets, rectangular parts

Long Strip

Narrow, elongated parts

CRITERIA:

Aspect ratio ≥ 4:1, convex shape

ROTATIONS:

0°90°

EXAMPLES:

Beams, strips, rails

Convex Irregular

Complex convex shapes without indentations

CRITERIA:

Concavity ratio ≤ 0.02, irregular outline

ROTATIONS:

0°45°90°135°180°225°270°315°

EXAMPLES:

Custom brackets, irregular panels

Concave Irregular

Shapes with indentations or L-shapes

CRITERIA:

Concavity ratio > 0.02, contains indentations

ROTATIONS:

0°90°

EXAMPLES:

L-brackets, U-channels, complex cutouts

Hybrid

Parts with both convex and concave regions

CRITERIA:

Mixed geometric characteristics

ROTATIONS:

0°90°

EXAMPLES:

Complex brackets, multi-feature parts

Classification Priority Order

Validation

Invalid parts are rejected

Circle Detection

Rotations: 0° only

Long Strip Detection

Rotations: 0°, 90°

Rectangle/Square Detection

Rotations: 0° (square) or 0°, 90° (rectangle)

Concavity Analysis

Rotations: 0°, 90° (concave) or 8 angles (convex)

Hybrid Classification

Rotations: 0°, 90°

Parts are evaluated in this sequence, stopping at the first match to determine classification and allowed rotations

How PartIdentification Works

Deep dive into the algorithms and techniques we use

Geometric Containment Algorithm

Our system uses a robust geometric containment algorithm to distinguish between outer contours and holes. The process involves:

1

Normalization: All contours are normalized to ensure consistent geometric representation

2

Area Sorting: Contours are sorted by absolute area (largest first)

3

Containment Testing: For each larger contour, we test which smaller contours are contained within it

4

Hole Assignment: Contained shapes are assigned as holes to their parent parts

5

Net Area Calculation: Final part area = outer area - sum of hole areas

Classification Priority System

Parts are classified using a strict priority order. The system evaluates parts in this sequence, stopping at the first match:

1
Geometry Validation (area, self-intersections, vertex count)
2
Circle Detection (direct circles, near-circular shapes)
3
Long Strip Detection (high aspect ratio, convex)
4
Rectangle/Square Detection (4 vertices, rectangular bounds)
5
Concavity Analysis (convex vs concave irregular)
6
Hybrid Classification (complex mixed shapes)

Key Measurements & Calculations

Aspect Ratio

max(width, height) / min(width, height)

Used to identify long strips and near-circular shapes

Area Ratio

actual area / bounding box area

Determines how well a shape fills its bounding box

Concavity Ratio

measures indentations and L-shapes

Calculates deviation from convex hull

Vertex Count

number of points defining the shape

Critical for rectangle and circle detection

Convex Hull

smallest convex shape containing the part

Used for concavity and area ratio calculations

Self-Intersection

detects invalid geometries

Validates polygon integrity before classification

Supported DXFEntity Types

Full compatibility with standard AutoCAD entities

LWPOLYLINE

POLYLINE

CIRCLE

ELLIPSE

ARC

SPLINE

LINE

POINT

RelatedFeatures

Ready to ProcessYour DXF Files?

Experience intelligent part identification and classification

Start Nesting Now

Explore All Features

Discover all the powerful capabilities of our nesting software