-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3D cartesian plot is broken #386
Comments
it seems, the new code does not print as many cross connections. the missing blue sample dots in the left picture are more interesting. is this related to the z buffer? what happens if you slightly turn the plot to the left (= move the camera to the right), will they reappear? please post the data file and the schematic somewhere, i will have a look. |
Here is test schematic https://gist.github.com/ra3xdh/eb92c81d7d72d401668b/raw/12be21db82ff579e91a9a7e4aa63370a25df2ba3/diode_dblswp_qucs.sch 3D cartesian plot is embedded in schematic.
Yes, missing points could appear when plot is rotated at specific angle around Z-axis. |
thanks whether the cross connections are painted or not depends on the angle. must be a bug in the zbuffer code. also, i get a lot of "dangerous: returning negative screen coordinate" messages, which may or may not be related... |
apparently, hideLines is broken for 3dplots. i am working on this in #370. previously the z buffer has been monkey-patched into the 2d ploting routines. these have been replaced by the QtPainter. i think i will implement 3dgraphs with their own drawings... |
If at a certain angle the user still can get a useful image, then I will count it as know issue/regression. |
i have failed to make the old code work again. wasted a lot of time on this using qt for the 2d plots is working pretty well. i think we should head for something like qwtplot to do the 3d plots. unfortunately qwtplot does not support multiple layers (yet)... |
Simple check with x= 3 ... 5 SweepPts : y=5 SweepPts
Screenshots using 0.0.19 and different point size of the x-Sweep |
Is there any Unit-test associated to rect3ddiagram.cpp? |
i remember we had been discussing unit tests for the GUI, something about graphical diffs and they are somewhere on a whishlist. |
Environment: Win7, qucs-HEAD, CMake in QtCreator 3.1.2 @ Qt4.8.6, mingw482. There is a significant difference of appearance between debug-mode (significant more line segments visible in 0.0.19, regardsless breakpoints) vs. non-debug-mode. Have you experienced similar behavior? |
as you might have guessed, the debug mode must not interfere with the behaviour of the programme (except for printout to stderr), so that's another bug. |
...interesting, maybe some floating point comparisons are giving different results, since the variables may end in registers instead of memory. I think we saw something similar in the simulator in the past. Doing a quick diff of |
@in3otd ... current version vs version 0.0.6 ... Do you mean Qucs version 0.0.6, because for
In addition it seems some changes are caused by graph.cpp/.h respective lead to changes in graph.h/.cpp. It's not expect with rect3ddiagram beeing the only 3D diagram and the associated requirements. |
Not verified/debugged yet . . . just guessing (!!!) . . . will check it next days. What is the more appropriate direction . . . taking into accound all the side effects
|
... also try to plot 3D data (i.e. sweep over 3 parameters). that gives a rough idea of what the code is trying to do. then 4. |
I really like to get a feedback regarding appropriate direction . . . taking into accound all the side effects
It guides my debug strategy/procedure ... even the recommended one may not be the best solution. |
the reason why i rewrote parts of the plotting (mostly unmerged work) is, that i would like to read data from other sources than just .dat files. think of hdf5 or a simulator as a possible alternative souce (for now). the dat format is absolutely unsuited for this type of task, but unfortunately, the plotting routines more or less work on a binary image that is layed out like these .dat files... which is where the shit is hitting the fan. that said, when i tried to fix the 3d plot (yes, i'd better be able to, but i wasnt), it was pretty clear to me that this would the wrong track. it never worked right (and not only the comments indicate that it is trial-and-error-spaghetticode). one part of this desaster is, that the 3dplot and the 2dplot are heavily entangled, and they should not be. if you can untangle it, then yes, lift 0.0.9. but please only for the 3d plotting. if you prefer a sane path, please help with #370, it fixes some other problems with the markers as well... please let me know, if you need more info. will have more time for this after the symbols are in place... |
... continuing debug with HEAD (9d924ca) Finding-3
rect3ddiagram.cpp : removeHiddenLines() + hideLines=true (!)
rect3ddiagram.cpp : calcLine(...)
|
Finding-4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^^^ |
Finding-5 In order to chase the random behavior the initial Adding test-case diode_dblswp_qucs.sch with 200pts @ SW1 has brought up a memory issue (segmentation fault at With the modified setting ( |
0.0.19Mod @ 13th Nov 2016 ... modifications are in rect3ddiagram.cpp . The file is based on commit 9d924ca Comparison ... 0.0.9 ... 0.0.19 ... 0.0.19 Mod @ 13th Nov 2016 ... and how it looks at my screen. |
wow. care to open a PR with the modified recd3dthing.cpp? |
@ldpgh can you share your fix? If you do we can include it already on 0.0.19 which is about to be released. |
@ guitorri & Felix ... "share the files" is the plan. Understand Git/Github PR-procedure is still a hurdle. And I'm still fiddling with my debug comments spread over the entire file ... to a large degree no longer valid. Is there any deadline? My plan is to get it done until end of this week. |
I tentatively put December 1st for the release. So take your time and let us know if you need any assistance. This might help: https://github.com/Qucs/qucs/wiki/Contribution. In particular the workflow section. |
|
…to bring the hidden lines back. Test case are in qucs-test\testsuite\GUI_rect3ddiagram_prj
Modify rect3ddiagram.cpp to bring the hidden lines back. Test cases are in qucs-test\testsuite\GUI_rect3ddiagram_prj.
fix #386, hidden lines on 3D diagram
Fix merged into |
Modify rect3ddiagram.cpp to bring the hidden lines back. Test cases are in qucs-test\testsuite\GUI_rect3ddiagram_prj.
I have just found another critical bug in Qucs-GUI. 3D-cartesian plot is broken in

master
. Open two schamtics with 3D plots in 0.0.18 and 0.0.19 and compare results to reproduce this bug. 3D plot in 0.0.19 looks unreadable. Here is example screenshot. Left is Qucs-0.0.18, right is Qucs-0.0.19.The text was updated successfully, but these errors were encountered: