Skip to content
Archee Docs

Facts and relations

What ARQL asks, the graph a drawing becomes, and the relations it holds.

ARQL asks a drawing which parts relate to which. You write a pattern, and ARQL returns the matching parts with the facts that justify each row. It only reads.

Run a query

agentcad search SHEET.dxf 'MATCH (b:bearing)-[:coaxial]-(s:shaft) RETURN b.id, s.id'

Inside an execute program, call agentcad.relate(path).query("QUERY"), where path is a .dxf or a facts .json. Over Archee MCP, search takes the same query.

The graph

A sheet becomes a graph.

  • A node is a part, a dimension or a view, named by an id such as shaft.II, bearing.I.left, dim.fit.bearing.I.left.outer or view.front. On an upload nobody tagged, ids look like block.1A3F.
  • The kind of a node is the first id segment: bearing, dim, block.
  • Node attributes are id, kind, source, diameter and name. A dim node also has measured_value and text_value.

An edge is a relation. Every edge carries three attributes:

AttributeMeaning
measuredA length, or null
evidenceThe text of the fact
confidencestated 1.0, measured 0.9 or inferred 0.6

Relations

RelationReads asDirection
contains / insideThe holder contains the held partHolder first
touchesOutlines share a stretch; measured is the shared lengthSymmetric
gapFaces side by side without touching; measured is the gapSymmetric
coaxialOn one axisSymmetric
parallel, perpendicularAxes parallel or squareSymmetric
spacedLike parts in a row or ring; measured is the pitch or centre distanceSymmetric
annotates / annotated_byA note or balloon lands on the partNote first
dimensions / dimensioned_byA dimension starts on the part; measured is its lengthDimension first
pattern / in_patternA named pattern such as 4 x M8 on D110 and its memberPattern first

No edge means the relation was not read. It does not mean the relation is absent.

Confidence

Read confidence before you rely on a relation. stated comes from the drawing itself, such as a dimension or a note. measured comes from geometry. inferred comes from boxes and axes, so confirm it when it matters.

Next