Conversation
…fy (Marko1olo Custom Fork License))
Two geometry fixes: 1. fix(bezier): symmetric control-point halving for opposite orientations (miroiu#281) controlPointVertical was computed from controlPoint *before* the 0.5 scale, so when SourceOrientation != TargetOrientation only one handle was halved. Moving the vertical copy after the scale makes both handles equal. 2. fix(offset): NaN-free GetRectangleModeOffset for axis-aligned connections (miroiu#284) For a horizontal connection with the default offset (Width=14, Height=0): both sides of the face-selection condition are zero, so < was false and the vertical branch ran, producing 1/Tan(0)*0 = Inf*0 = NaN — causing the connection to disappear silently. Changing < to <= prefers the horizontal face in ties, and an IsFinite guard stops any remaining degenerate NaNs.
|
I am not involved in this project, but I want to give a heads up that we recently banned this user from our project (https://github.com/python-control/python-control). They were also banned from another unrelated project: terrazzoapp/terrazzo#825 (comment) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two geometry bugs in connection rendering:
1. Asymmetric bezier handles for opposite orientations (fixes #281)
controlPointVerticalwas computed fromcontrolPointbefore the*= 0.5scale, so whenSourceOrientation != TargetOrientationonly one of the two Bézier handles was halved — the other kept the full-length vector, producing an asymmetric curve.Root cause:
System.Windows.Vectoris a struct; assigning it copies by value. The vertical copy captured the pre-halved value.Fix: derive
controlPointVerticalafter the scale so both handles share the same magnitude.2. NaN offset in
ConnectionOffsetMode.Rectanglefor axis-aligned connections (fixes #284)For a horizontal connection with the default offset
Size(14, 0), the face-selection condition evaluates to0 < 0(false), so the vertical branch runs and computes:WPF draws nothing for a non-finite geometry and raises no exception, making the connection invisibly disappear.
Fix: change
<to<=so ties (both sides zero) prefer the horizontal face; add anIsFiniteguard to catch any remaining degenerate combos.