Skip to content

Conversation

@wawuwo
Copy link
Collaborator

@wawuwo wawuwo commented Mar 8, 2025

Hi!

In short: this is a big rework of schematic engine which defines the way all mutations (moving, mirroring, etc.) are performed.

I've been working on this for several months (don't mind the commit history, I've rewritten it). Multiple turned-out-to-be-unpromising approaches, dead branches, dozens of cherry-picks and rebases, a lot of consumed brain fuel and finally it's seems to be if not completely done but at least working. Of course some code is kind of "crude", "dirty" and suboptimal, I hope to polish it eventually.

Internally it's a complete rework the greatest feature of which is no dependency on any of Q3PtrList-specific features. So it's another step towards replacing Q3PtrList with something modern.

From the users' side this PR offers several new features:

It also possible that this PR fixes some bugs related to schematic mutations.

The bad part is that I had rewrite a lot of code in order to make different parts work like a single coherent system. A lot of opportunities to break something. Also, this PR migrates the build to C++20 which might be a breaking change.

Anyway, I'd like to get some feedback. I did a little testing on my own, but it cannot be reasonably compared to a real "battle-test". There can be bugs or new behaviour may seem unusual or even off-putting. This is an early-preview version, there is inevitably something to fix and adjust.

In short, these issues have to be addressed:

  • Transition to C++20
  • Bugs
  • Behaviour adjustments
  • overall correctness of schematics

@ra3xdh
Copy link
Owner

ra3xdh commented Apr 5, 2025

I confirm that the markers and label jump are fixed after the recent commits. I have encountered a crash when deleting a fragment in the complex schematic, but I cannot catch it anymore. Probably the recent commits has fixes this problem too. I will report if I find conditions to reproduce.

Nevertheless, the new schematic editor is almost ready. I am planning to merge this PR soon. Don't forget to put an indicator of the wiring more (orthogonal/diagonal) on the status bar at the bottom of main window.

@wawuwo
Copy link
Collaborator Author

wawuwo commented Apr 5, 2025

… wiring more (orthogonal/diagonal) …

Just to clarify the things: these are not modes, but different ways to connect two points offered by wire planners. Wire planners take two points (e.g. A and B) as input and return a sequence of points which when connected one by one establish a wired connection between A and B. So it's possible to have a wire planner which offers V-shaped, П-shaped, etc. connection between two input points. Diagonal wires are just result of work of the simplest wire planner 🙂

to put an indicator on the status bar

I'm okay with the idea, but what's the purpose of it? I mean when a wire is being created its form is visible on the screen… What use case I don't get?

I am planning to merge this PR soon

What about the settings likeallowWireReshaping? Shouldn't the setting value from here be applied by default?

Just in case, here are descriptions:

  • allowWireReshaping — enables or disables "flexible" wires
  • allowWireRelaying — enables or disables "laying wires anew"
  • wireRelayingDepth — controls how deep to go a long the wire to find "stable" node when laying wire a new. This setting has no meaning without allowWireRelaying=true

@ra3xdh
Copy link
Owner

ra3xdh commented Apr 5, 2025

but what's the purpose of it?

The idea is to give user a hint to press RMB to change the wiring. The caption may be like Orthogonal: press RMB to switch to diagonal

What about the settings like allowWireReshaping?

The allowWireReshaping in the keyboardMutationParams should be set to false.

@wawuwo
Copy link
Collaborator Author

wawuwo commented Apr 5, 2025

The idea is to give user a hint to press RMB to change the wiring. The caption may be like Orthogonal: press RMB to switch to diagonal

Got it! Somethings like this?

wiring-mode-hint.mov

@ra3xdh
Copy link
Owner

ra3xdh commented Apr 5, 2025

Got it! Somethings like this?

Yes, this would be acceptable.

@wawuwo wawuwo marked this pull request as ready for review April 5, 2025 14:10
@ra3xdh
Copy link
Owner

ra3xdh commented Apr 8, 2025

I have found a bugs with export schematic to graphic files.

  • Right click on diagram and select Export to image Then select SVG and open SVG with inkscape. The image will be shifted.
  • Select a fragment of schematic, then select in main menu File->Export to image, in the dialog select Export to selection The SVG will have a large white filed.
  • The same for export all schematic.
  • PNG export of schematic is partially affected, PNG export of diagram is also shifted

Here is the test schematic:
tst.sch.gz

1
2

@wawuwo
Copy link
Collaborator Author

wawuwo commented Apr 8, 2025

That's probably due to broken diagrams' bounding ("zoom to selected" is also affected). I'll look into it 🤝

@ra3xdh
Copy link
Owner

ra3xdh commented Apr 8, 2025

The problem with diagram export has been fixed by the recent commits.

@ra3xdh ra3xdh merged commit 387d631 into ra3xdh:current Apr 8, 2025
7 checks passed
@ra3xdh
Copy link
Owner

ra3xdh commented Apr 8, 2025

I am merging this PR. The remaining things may be fixed in a separate patches. @wawuwo , Please stay connected. Some feedback may appear after the users will test the continuous build.

@wawuwo
Copy link
Collaborator Author

wawuwo commented Apr 8, 2025

By the way, when do you plan to freeze before 25.2.0?

@ra3xdh
Copy link
Owner

ra3xdh commented Apr 8, 2025

The earliest possible release date for v25.2.0 is end of July. The latest is September. Everything should be ready by the July. We have plenty of time to implement remaining things.

@wawuwo wawuwo deleted the new-schematic-machinery branch April 9, 2025 17:32
wawuwo added a commit to wawuwo/qucs_s that referenced this pull request Jun 15, 2025
- remove macros isHWireLabel, isHMovingLabel, etc.
- always use 'isLabel' type for labels

Some of the removed macros, such as isHMovingLabel are pre-ra3xdh#1266
legacy and are no longer in use.

The distinction between HWireLabel and VWireLabel is relevant only
during painting a label and can be inferred directly from the host
wire of the label. No need to keep dedicated label types for that.

Node and wire labels can be distinguished via their respective host
elements, accessible through "owner()".
wawuwo added a commit to wawuwo/qucs_s that referenced this pull request Jun 15, 2025
- remove macros isHWireLabel, isHMovingLabel, etc.
- always use 'isLabel' type for labels

Some of the removed macros, such as isHMovingLabel are pre-ra3xdh#1266
legacy and are no longer in use.

The distinction between HWireLabel and VWireLabel is relevant only
during painting a label and can be inferred directly from the host
wire of the label. No need to keep dedicated label types for that.

Node and wire labels can be distinguished via their respective host
elements, accessible through "owner()".
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.

Subcircuit Symbol "jumps off Grid when Rotated Get rid of Q3PtrList wrapper

3 participants