Hello,
I've been trying to get the DXF import with GLFileDXF to work, but I keep getting errors in the TStream buffer/reader.
I've tried various files in both my own implementation and the GLSViewer demo without success. Has anyone been able to succesfully use the DXF import, and if so - are there any local changes to the class I need to make?
I'm using Delphi 10.1 Berlin with the newest GLScene version.
Thanks in advance,
Fukku
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Morten,
Something wrong with the unit to import dxf ffiles, but try to use LoadFromFile instead and if you'll have a success you may view the model in AdvDemo\GLSceneViewer, where there is GLFileDXF in uses claus.
PW
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There was another old project to import DXF into GLScene. See attachment updated for RAD 10.1. Try it and if bug fixed it could be added to GLScene.
PW
Hi Pavel, thanks for the reply and suggestions.
I've been trying with both GLFileDXF and the old project, but I'm running into problems with both.
For GLFileDXF I've changed the FBuffer from type String to TBytes, and made corrections in the reader function to support it. With this change I've had success with importing a simple cube, but anything more complex fails.
For the old project, which I would love to have work due to the export features as well, I'm running into issues with initializations. In unit GLDXFVectorFile, procedure TGLDXFFile.ReNewDXF I am getting access violations on the call to FDirectOpenGL.OnRender. I cannot seem to locate the issue, and was hoping you could help.
Fukku
EDIT: So I got past the OnRender issue by replacing
"FDirectOpenGL.OnRender(Self, rci);"
with
"FDirectOpenGL.OnRender := FGLDXFRenderer.Render;"
However, I do not know if this works as the stream reader isn't working for me.
I'm currently working on updating the reader, but it's a quite troublesome.
Last edit: Morten Berg 2017-01-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Morten,
I've added the GLSceneDXF demo in branches https://sourceforge.net/p/glscene/code/HEAD/tree/branches/Examples/
so you could compare it with your old version and correct. Let me know if it works for other then cube.dxf models. ps. and it would be nice if you'll translate interface to english.
PW
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've been trying to get the DXF import with GLFileDXF to work, but I keep getting errors in the TStream buffer/reader.
I've tried various files in both my own implementation and the GLSViewer demo without success. Has anyone been able to succesfully use the DXF import, and if so - are there any local changes to the class I need to make?
I'm using Delphi 10.1 Berlin with the newest GLScene version.
Thanks in advance,
Fukku
Hi Morten,
Something wrong with the unit to import dxf ffiles, but try to use LoadFromFile instead and if you'll have a success you may view the model in AdvDemo\GLSceneViewer, where there is GLFileDXF in uses claus.
PW
More of DXF,
There was another old project to import DXF into GLScene. See attachment updated for RAD 10.1. Try it and if bug fixed it could be added to GLScene.
PW
Hi Pavel, thanks for the reply and suggestions.
I've been trying with both GLFileDXF and the old project, but I'm running into problems with both.
For GLFileDXF I've changed the FBuffer from type String to TBytes, and made corrections in the reader function to support it. With this change I've had success with importing a simple cube, but anything more complex fails.
For the old project, which I would love to have work due to the export features as well, I'm running into issues with initializations. In unit GLDXFVectorFile, procedure TGLDXFFile.ReNewDXF I am getting access violations on the call to FDirectOpenGL.OnRender. I cannot seem to locate the issue, and was hoping you could help.
Fukku
EDIT: So I got past the OnRender issue by replacing
"FDirectOpenGL.OnRender(Self, rci);"
with
"FDirectOpenGL.OnRender := FGLDXFRenderer.Render;"
However, I do not know if this works as the stream reader isn't working for me.
I'm currently working on updating the reader, but it's a quite troublesome.
Last edit: Morten Berg 2017-01-30
Morten,
I've added the GLSceneDXF demo in branches https://sourceforge.net/p/glscene/code/HEAD/tree/branches/Examples/
so you could compare it with your old version and correct. Let me know if it works for other then cube.dxf models. ps. and it would be nice if you'll translate interface to english.
PW