Recent

Author Topic: read, modify dxf etc etc  (Read 9102 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: 1073
Re: read, modify dxf etc etc
« Reply #1 on: June 20, 2016, 06:06:12 pm »
Lazarus 2.0.6 - FPC 3.0.4 - x86_64-win64 on  Windows 8

Thaddy

  • Hero Member
  • *****
  • Posts: 10206
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...
I am more like donkey than shrek

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: 7250
Re: read, modify dxf etc etc
« Reply #4 on: June 21, 2016, 01:21:03 pm »
How to "modify" if there is no dxfwriter?
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

zamtmn

  • Sr. Member
  • ****
  • Posts: 372

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: 372
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: 1512
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

 

TinyPortal © 2005-2018