Problem while parsing some DXF files like VIQFN-36 CAD.dxf regarding enlargment mechanism of bottom left detail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
There are 2 example files to this question:
1) VIQFN-36 CAD.dxf
2) 778064PO0A.dxf
In these 2 example files, there are shapes that don't belong to a block and that are originally (before a 2D linear transformation) located in a small rectangular area in the left bottom:
Image of VIQFN-36 CAD.dxf without transform:
Detail at Bottom Left:
With (my imperfect attempt) transform toward the Viewport (central black rectangle in first image):
Remark the orange rectangle at the bottom left that contained everything to be transformed.
Similar problem for 778064PO0A.dxf:
But this time there is no origin rectangle available.
If you look well there is an assumed destination Viewport (black rectangle in the center inside the yellow rectangle)
Detail of area to be amplified and repositioned:
So no ‘origin’ rectangle available. So: mystery how the are with these 4 objects gets selected to be transformed. They are not in a block.
View of the same DXF in AutoCAD Treeview:
A transformation more or less similar to the first example has been done.
That’s the core of my question: what’s the mechanism in the DXF of this transform?
In general:
In mature DXF Viewers this rectangular area at the bottom left (if available) seems to be linearly transformed toward a a ViewPort rectangle, so that the shapes are enlarged and shown more or less centrally
The mechanism behind that is not clear.
In the case of "VIQFN-36 CAD.dxf" there is a candidate 'origin' rectangle (DXF line File Line 54122, a closed Polyline), which makes 2D interpolation transform possible toward the ViewPort defined at Line 56448.
I've implemented this transform, as shown above, and at first glance it looks well. But actually the transform is not precisely what it should be, the positions/amplifications are not exact. I tried several variants, but none resulting in the required precision.
Also this transform is not evident to generalize, it works only for "VIQFN-36 CAD.dxf", and even for that not with the required precision of position and size.
For 778064PO0A.dxf there even is no such 'origin' rectangle around the shapes to be amplified/moved. These shapes are also not in a BLOCK. So what mechanism *selects* these shapes to be transformed toward the only ViewPort in Layer with name 'VIEWPORT' (File Line 28338)?
Can I find a description somewhere of the mechanism? or can you yourself formulate this mechanism into enough detail?
Thank you very much for the help.