easyeda / easyeda/easyeda-api-skill

解决通过坐标校验引脚连接状态时的“引脚悬空”误报问题

Open Beginner friendly
#9 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
699
Forks
60
PR merge metrics
No merged PRs in 30d

Description

本人在使用过程中发现LLM经常误判网络标签与器件引脚是否连接,时常误以为"未连接"

个人推测试一下原因,LLM认为:“网络端口的坐标”和“元器件引脚的坐标”不一致,就判定该引脚是悬空(未连接)的。

详细分析如下:

当使用 `SCH_PrimitiveComponent.getAll()` 获取网络端口的位置时,系统返回的 x 和 y 坐标通常是该符号的锚点或主体中心,而不是它真正与引脚接触的箭头尖端(电气接触点)。
由于网络端口符号的形状和旋转角度不同,锚点和真正的接触点之间往往会有 15 到 20 个单位(甚至更大)的距离偏差。因此,哪怕网络端口和引脚的坐标数据完全不同,它们在图纸上依然可能是连接在一起的。

所以可以在SKILL.md追加一部分信息让LLM不要仅凭两个端口的坐标不一致就胡说八道(仅供参考)

### Do Not Infer a Floating Schematic Pin from Net-Port Coordinates

`SCH_PrimitiveComponent.getAll()` reports a net-port component's symbol anchor/body position, not necessarily the electrical contact point at the arrow tip. The offset depends on the net-port symbol and rotation and may be 15–20 schematic units or more. Therefore, a net port whose `x`/`y` differs from a pin's `x`/`y` can still be electrically attached to that pin.

When checking schematic connectivity:

1. Read the target component's real `pinNumber` and `pinName` with `getAllPinsByPrimitiveId()`; never infer the pin order from symbol appearance.
2. Resolve the net port's actual contact point from its symbol geometry and rotation, or verify the connection through wire endpoints/document connectivity data.
3. Use a rendered schematic as corroborating evidence when API connectivity data is incomplete.
4. Never label a pin as floating solely because the net-port component anchor does not exactly match the pin coordinates. If the electrical endpoint cannot be resolved, report the connection as **unverified**, not floating.

For example, a left-facing net-port arrow may have its component anchor at `x = 1085` while its arrow tip contacts a chip pin at `x = 1100`; exact anchor-to-pin coordinate matching would produce a false floating-pin report.

Contributor guide

No contributing guide indexed for this repository

Research direction

Update SKILL.md with the provided guidance on net-port anchors versus electrical contact points. Start by locating the existing schematic connectivity or pin-inspection guidance, including getAll() and getAllPinsByPrimitiveId(). Done means the document explains why coordinate mismatches do not prove a floating pin and recommends reporting unresolved connections as unverified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.