Units in a dxf file and dealing with blocks
Posted: Tue Mar 25, 2014 6:18 pm
Hi all, I've recently started using dxflib and have had some success, but have also come across a couple of things I'm not sure how to proceed with.
1) I'm dealing with files that have different units (one in mm, one in m [for example]). Is there a function that detects this?
2a) Some lines are absent and some are clearly in the wrong place when I re plot them (in opengl) and I think this is to do with blocks. I see there is a block data type in the class reference and function calls at the start and end of a block, but there doesn't seem to be enough information about how to use them. Surely it would need orientation of the block, not just its xyz position? And there appears to be no documentation on how they are dealt with generally. Does dxflib define the definition of the blocks as it reads them then produce the equivalent lines/polylines etc? Or is that left to us?
2b) A related question to do with dealing with format: In one of my files polyline structures obviously had say n=4 vertices associated with it, but the member Dl_PolyLine::number was 0 each time (it worked properly for another file). I *think* I have a workaround (based on the assumption that vertex data is only ever in a polyline, but is this a bug?
3) Finally, this might be a relevant point. I'm using version 2.2.0.0.1 because it is the only download (I could find) that came with a ./configure script and a makefile. The version 3.3.4 on the ribbonsoft website doesn't have either of these things (only a Qt project file?) yet the developer instructions clearly refer to a configure script and make file.
Thanks!
Rich.
1) I'm dealing with files that have different units (one in mm, one in m [for example]). Is there a function that detects this?
2a) Some lines are absent and some are clearly in the wrong place when I re plot them (in opengl) and I think this is to do with blocks. I see there is a block data type in the class reference and function calls at the start and end of a block, but there doesn't seem to be enough information about how to use them. Surely it would need orientation of the block, not just its xyz position? And there appears to be no documentation on how they are dealt with generally. Does dxflib define the definition of the blocks as it reads them then produce the equivalent lines/polylines etc? Or is that left to us?
2b) A related question to do with dealing with format: In one of my files polyline structures obviously had say n=4 vertices associated with it, but the member Dl_PolyLine::number was 0 each time (it worked properly for another file). I *think* I have a workaround (based on the assumption that vertex data is only ever in a polyline, but is this a bug?
3) Finally, this might be a relevant point. I'm using version 2.2.0.0.1 because it is the only download (I could find) that came with a ./configure script and a makefile. The version 3.3.4 on the ribbonsoft website doesn't have either of these things (only a Qt project file?) yet the developer instructions clearly refer to a configure script and make file.
Thanks!
Rich.