@andrew Thank you for your previous response regarding the coordinate issue.
The coordinates in the file are at extreme positions:
e.g., 3’440’898’356’069 / -15’219’136’996’555
You confirmed that this is currently not supported by QCAD.
I would like to ask:
Is there any plan to fix this issue in a future version of QCAD? If so, when can we expect this to be addressed?
Are there any workarounds or compatibility methods available currently that would allow us to work with files opening blank?
We have an urgent need to process DWG/DXF files with these large coordinate values. Any information or suggestions you can provide would be greatly appreciated.
The extreme values are probably the issue. QCAD does not support a UCS at the moment.
In double float such values have hardly some digits left for some accuracy.
Concerning QCAD, sane numbers are between -1e12 and 1e12.
Even using an UCS and near the drawing origin of that, there won’t be an accuracy gain.
I had some luck with converting the drawing unit of your file.
Block “awrser” left lower corner is then at (3440898.33,-15219137.03) in km.
Note that 3 million kilometers is roughly 8 times the distance from the Earth to the Moon … There are no (round) buildings out there.
@sunlionjun I can confirm that this now loads and renders fine in the current development environment.
Note that there were also issues with Chinese text being legacy Maker Interchange Format encoded (\M+5…).
You report that ‘loading’ and ‘rendering’ is fine but how does it behaves while editing?
Note that the hatching engine already fails for entity with handle 0xff, even for solid filled.
And that many things in the drawing seem to be incomplete.
The latest commit on GitHub states:
‘allow for larger values, smaller arc segments’.
I don’t see the relation of larger values and with that also for shorter arcs.
The sane number limits within -1e12 to 1e12 are removed.
RMath::isSane(value) is now reduced to an analog of RMath::isNormal(value).
Shorter (not smaller) arc segments than 1e-9 rads are endorsed not reverting to a full circular arc.
(Based on RS::PointTolerance instead of RS::AngleTolerance but both are 1e-9.)
The new lower limit is now 1e-16 rads when a zero-length is not allowed.
But may I express my concerns about endorsing longer (not larger) arc segments:
Before, the maximum limit was 2Pi - RS::PointTolerance (1e-9)
Now the ‘FIXED’ code compares with 2Pi - 1.0e-16 for reverting to a zero length arc.
IMHO, 6.283185307179586 minus 1e-16 remains 6.283185307179586
Meaning that you can subtract 1e-16 from 2Pi several times over and still end up with 2Pi.
2Pi - 1e-16 - 1e-16 - 1e-16 - 1e-16 - 1e-16 === 2Pi
1ULP of 2Pi is 8.881784197001252e-16
Subtracting about half of that would have an influence on the LSB by binary rounding.
2Pi - 5e-16 = 6.283185307179585
Each time is questionable because rounding might alternate between up and down.
This fix is only applied in one place while checking for nearly 2Pi occurs at various places.
Please explain why we should support things in real world size (A chair, about 500 by 500mm)
placed at X = 3440898387387.5750mm (+/-1ULP is about +/-0.0005)
and Y = 15219137016394.785 in mm (+/-1ULP is about +/-0.002)
I DO NOT consider such coordinate values as sane.
The longest distance on earth is about 40075017000mm or about 1% and less.
Note that there are no more decimal places as listed above.
On the other hand, QCAD does not support short or small arc segments in polylines and that was dismissed as request by a long time user.
This so-called ‘FIX’ doesn’t changes anything to that.
But it breaks with well supported resources and features establisched 13 years ago.