Skip to content

Conversation

baeoc
Copy link

@baeoc baeoc commented Aug 28, 2025

Ref #25
/claim #25

In the "before" video, you can see the tracing from pin 8 to pin 3 and pin 7, shown in two phases.

In the "after" video, the tracing is more accurate — from pin 8 to pin 7 and pin 3, showing the actual connection from capacitor and resistor.

BEFORE

before_REC.mp4

AFTER

afterREC.mp4

Copy link

vercel bot commented Aug 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
schematic-trace-solver Ready Ready Preview Comment Sep 3, 2025 4:12am

@baeoc
Copy link
Author

baeoc commented Aug 28, 2025

Hi @seveibar, This PR is ready for review. Would appreciate your feedback!

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getPinSide etc. is unnecessary because there's pin._facingDirection. The function canPinsConnect is fine, but it should not need to compute the side. The code will be simpler just using the facing direction. You may need to compute all the facing directions in preprocessing

if (dy >= halfH) return "top"
if (dy <= -halfH) return "bottom"
return null
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also the wrong way to compute the pin side, there's already a better implementation in this project

@seveibar
Copy link
Contributor

seveibar commented Aug 28, 2025

You may need to create more examples to demonstrate that you've thought through the test cases

  1. A basic MSP Connection Pair Example
  2. An msp connection pair where the "trace group" or "trace island" crosses a chip through another trace the evades the rule by not directly connecting the left/right sides of the chip

@baeoc
Copy link
Author

baeoc commented Sep 2, 2025

@seveibar I’ve simplified connection validation by rejecting MSP pairs whose pins face opposite edges of the same chip. I’ve also addressed all your comments — could you please review again?

@baeoc baeoc requested a review from seveibar September 2, 2025 14:21
@seveibar
Copy link
Contributor

seveibar commented Sep 2, 2025

@baeoc bounties require videos in the PR demonstrating the fixed issue, ideally with a before/after

@baeoc
Copy link
Author

baeoc commented Sep 2, 2025

hello @seveibar
I've added a video to the PR description.

In the "before" video, you can see the tracing from pin 8 to pin 3 and pin 7, shown in two phases.

In the "after" video, the tracing is more accurate — from pin 8 to pin 7 and pin 3, showing the actual connection from capacitor and resistor.

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really dont understand if this is correct or not. I should never have to paste input to test, download the page.tsx and insert so your code is testable, maybe in a separate pr so we can see the before/after. I dont understand the impact of this pr is it actually solves the problem because you’re not forbidding cross-chip connections, you’re just making them less direct

{
maxDistance: this.maxMspPairDistance,
canConnect: (a, b) =>
checkIfMspPairCanConnectDirectly(this.chipMap, a as any, b as any),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const [pair] = solver.mspConnectionPairs
const ids = pair.pins.map((p) => p.pinId).sort()
expect(ids).toEqual(["A", "B"])
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless, has no valid assertions for the problem we're replicating. Remove

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if anything, this test demonstrates that the issue isn't solved because you're creating a pair across a chip

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm pretty sure you have a bug where you've disabled any chip to chip connection with opposite directions. Please create an example that has two chips that connect together with opposite pin facing directions to validate you didn't break this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants