- Status Closed
- Percent Complete
- Task Type Bug Report
- Category QCAD (main)
-
Assigned To
andrew - Operating System All
- Severity Very Low
- Priority Very Low
- Reported Version 3.31.1
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#2607 - Draw > Circle > 3 Tangents: No or missing auxiliary shapes. Exceptions
Andrew,
In some cases when drawing tangent shapes I see that there are no to some missing auxiliary shapes. The preview was OK but once you are in the ChoosingSolution state some to all auxiliary shapes are missing. However, one can still point near them and a preview is displayed.
In debugger mode an exception is thrown in EAction.prototype.updatePreview
Line 1706 Argument 0 is not of type RShape*
For CT3 I traced it back to solutions added by Apollonius.getSolutionsCCCAlt
After elimination, typically the candidates created by ShapeAlgorithms.getOffsetShapes
From documentation I think I understand that these are of the type QSharedPointer.
The problem is that in debugger mode I can not distinguish the difference in the array previewShapes. All are listed as RCircle(RShape(address: ... and so on.
I also read:
this.getAuxPreview() Implementations must return an array of RShape objects.
Is there a way to spot the difference?
Sometimes it is unclear what to expect.
Got acquainted with a trial and error solution:
If it is not an RShape (RShape*) then let’s clone it....
Regards,
CVH
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
I've committed a fix:
https://github.com/qcad/qcad/commit/bd5ff65d4aaf8502a70db299a52d216d57ecf861
You can use getPtr() to strip the shared pointer from a pointer and isFunction(obj.data) to detect a shared pointer.
getPtr()
I know of this addition to library.js
And that it is based on isFunction(obj.data)
Including the route it took to implement it as it is today.
There are also sections of code that do this conversion for themselves.
Without testing for Qt6.
e.g. in Apollonius.getAngleBisectors
The question was: How can we spot the difference in an array in debugger mode?
And then the second question that pops up:
What is the advantage of a QSharedPointer over a common RShape when we constantly have to test and convert them to be usable for the next part of the process?
Regards,
CVH