Recent

Author Topic: read, modify dxf etc etc  (Read 8080 times)

gioazz

  • Newbie
  • Posts: 3
read, modify dxf etc etc
« on: June 20, 2016, 11:38:59 am »
Hello I need to create, read and modify dxf files...
Drawing at runtime points, polylines etc etc...
I have not find clear examples... fpviewer does not work goods and it is not simple...
For example if I read a DXF, how is possible to show the coordinates of the DXF on the event
onmousemove?

Regards, Giorgio

Edson

  • Hero Member
  • *****
  • Posts: 1044
Re: read, modify dxf etc etc
« Reply #1 on: June 20, 2016, 06:06:12 pm »
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

Thaddy

  • Hero Member
  • *****
  • Posts: 8950
Re: read, modify dxf etc etc
« Reply #2 on: June 20, 2016, 08:02:35 pm »
He obviously has, since the viewer is a demo application for fpvectorial...
Most people that want to use threading should learn to patch their jeans first: use a needle.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: read, modify dxf etc etc
« Reply #3 on: June 21, 2016, 12:02:04 pm »
The wiki shows how to modify a file using fpvectorial.

Coordinates are already converted into mm by fpvectorial, so if you are using fpvectorial you no longer have the original coordinates, you will have to roll your own solution maybe based on our DXF code, or at least make some changes to fpvectorial to get the original coordinates.

wp

  • Hero Member
  • *****
  • Posts: 6235
Re: read, modify dxf etc etc
« Reply #4 on: June 21, 2016, 01:21:03 pm »
How to "modify" if there is no dxfwriter?
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

zamtmn

  • Sr. Member
  • ****
  • Posts: 365

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: read, modify dxf etc etc
« Reply #6 on: June 22, 2016, 09:55:41 pm »
How to "modify" if there is no dxfwriter?

hahaha ... good point! We are all programmers here, it should be trivial for a motivated person to write a writer. The reader is a huge base of knowledge, just needs to do the opposite of what it does.

zamtmn

  • Sr. Member
  • ****
  • Posts: 365
Re: read, modify dxf etc etc
« Reply #7 on: June 22, 2016, 10:45:44 pm »
felipemdc
I don't agree. Writer much harder to do. Documentation captures the essence for read, but a lot of dark places for writer

jmpessoa

  • Hero Member
  • *****
  • Posts: 1456
Re: read, modify dxf etc etc
« Reply #8 on: June 23, 2016, 01:50:50 am »


I have put  a dxfwrite here:

https://github.com/jmpessoa/tfpdxfbridge

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard