AI Agent Hub
Back to skills
CAD Profile Section and Weight Calculator icon

CAD Profile Section and Weight Calculator

Professional Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md and install @user_43b25fa4/cad-profile-calculator.

About this skill

Problem Addressed

Engineers processing profile drawings often need to extract net section area from DXF files and convert it to weight per meter. Manual inspection of outer contours, holes, arc segments, and open fragments is error-prone, especially when polylines contain bulge values or sections are built from HATCH boundaries and ARC + LINE geometry. This skill targets that workflow by turning section extraction, weight calculation, and report export into a reusable script-based process.

How It Works

The skill reads a DXF file, identifies closed or force-closable contours, and calculates net section area using the geometric rule outer contour minus holes. Key capabilities include:
- Entity support: LWPOLYLINE, CIRCLE, ELLIPSE, HATCH, SOLID, and combined ARC + LINE sections.
- Area algorithms: Shoelace formula with bulge correction for LWPOLYLINE; Green’s theorem integration for ARC + LINE; vertex and arc-segment calculation for HATCH PolylinePath boundaries.
- Hole detection: point-in-polygon checks whether a hole centroid lies inside the outer contour, then subtracts inner-ring areas from the outer area.
- Export: Excel, CSV, and annotated DXF outputs, sorted by X coordinate from left to right, with error rows and status flags.
The weight formula is weight per meter = net area / 1,000,000 × material density. The default material is 6063 aluminum at 2700 kg/m³, with densities for carbon steel, stainless steel, and other alloys available.

Boundaries

This skill is best suited to profiles with clear, closed contours or small openings. It does not silently repair shared edges, open polylines, or heavily fragmented geometry; instead it flags those cases as for reference only and records the issue in the output. Before use, confirm that the DXF entities are supported and verify material density, units, and grouping parameters against the project requirements.

Use Cases

  • Calculate net section areas from DXF profile drawings in batch and export CSV for procurement weight checks.
  • Convert net section area to kg/m using aluminum, carbon steel, or stainless steel densities when reviewing profiles.
  • Verify area calculations for LWPOLYLINE, HATCH, and ARC+LINE sections against manual CAD checks and flag bad contours.
  • Export results to Excel and annotated DXF with holes, net area, and weight per meter marked on the drawing.

Best For

  • Mechanical engineers who need to quickly calculate net section area and weight per meter from DXF profiles.
  • Structural or curtain wall design assistants who need consistent area, hole, and density extraction across profile drawings.
  • Procurement or pricing analysts who need to convert section area to kg/m by material density for quotes.
  • CAD data engineers who need to diagnose area issues in LWPOLYLINE, HATCH, and ARC+LINE sections and export annotations.