1 Son düzenleyen, aydinufuk (11.04.2013 18:17:33)

Konu: GPC library ...

arkadaşlar

http://www.cs.man.ac.uk/~toby/alan/software/

adresindeki kütüphaneyi vfp da kullanmak mümkün müdür ?  Benim kafam karıştı biraz ...

derdim iki poligonun kesişim hattı bulmak..

şimdiden teşekkürler..

2

Re: GPC library ...

Aydin,
Indirip baktim oluyor. Sayfada asagiya gidersen COM Wrapper var (FLL yapmakla ugrasacagini sanmam). Onu indir ve ac. Icinde:

Polygons\England.gpf
Polygons\arrows.gpf

dosyalarini c:\ 'a kopyala (orneklerde c:\... olarak kullanmislar).

DOS command windowda:

regsvr32 C:\Users\Cetin\Downloads\GPCCOM\GPCCOM\BIN\GPCCOM.dll

ile register et (pathi degistir, ben denerken hemen orada actim).

Samples dizinindeki VB orneklerinin hazir exeleri var, calistirip bakabilirsin. Bu da Samples\VB Script\GPC.vbs'in VFP uyarlamasi:

Visual Fox Pro
clipDifference     = 0

clipIntersection     = 1
clipXOR         = 2
clipUnion     = 3
 
*Create subject polygon
pPolygonSubject = Createobject("GPCCOM.GPC_Polygon")
 
*Test creation
If Isnull(pPolygonSubject)
  Messagebox( "Unable to create GPC_Polygon object!" )
  Return
Endif
 
*Create clip polygon
pPolygonClip = Createobject("GPCCOM.GPC_Polygon")
 
*Test creation
If Isnull(pPolygonClip)
  Messagebox("Unable to create GPC_Polygon object!")
  Return
Endif
 
 
*try loading the "england" polygon
If pPolygonSubject.Load("c:\england.gpf")
 
  *try loading the "arrows" polygon
  If pPolygonClip.Load("c:\arrows.gpf")
    Local nStart, nEnd &&use to calculate performance
 
    nStart = Seconds()
    pPolygonRet = pPolygonSubject.Clip(clipIntersection, pPolygonClip)
    nEnd = Seconds() - m.nStart
 
    If !Isnull(pPolygonRet)
 
      *write polygon to local disk
      pPolygonRet.Save( "c:\retVFP.gpf" )
 
      Messagebox(Textmerge("Successfully intersected polygons in: <<m.nEnd>> seconds!"))
 
      *free result polygon
      pPolygonRet = Null
    Else
      Messagebox("Failed to clip polygons!")
    Endif
  Else
    Messagebox("Unable to load Arrows polygon!")
  Endif
 
Else
  Messagebox("Unable to load England polygon!")
Endif
 
 
*free subject polygon
pPolygonSubject = Null
 
*free clip polygon
pPolygonClip = Null

3

Re: GPC library ...

çetin teşekkürler smile

hemen deneyeceğim..

4

Re: GPC library ...

komik bir durum..

win7 64 bit pc de ...

Visual Fox Pro
regsvr32 C:\gPCCOM\BIN\GPCCOM.dll


komutu hata verdi..sanirim yetkimi beğenmedi
..ama vfp da

Visual Fox Pro
RUN /n regsvr32 C:\gPCCOM\BIN\GPCCOM.dll


ile denediğimde işlemi yaptı smile

5

Re: GPC library ...

64 bitlerde register işlemi aşağıdaki gibi yapılıyor abi.

If the DLL is 64 bit:
Copy the DLL to C:\Windows\SysWoW64\
In elevated cmd: %windir%\SysWoW64\regsvr32.exe %windir%\SysWoW64\namedll.dll

if the DLL is 32 bit:
Copy the DLL to C:\Windows\System32\
In elevated cmd: %windir%\System32\regsvr32.exe %windir%\System32\namedll.dll

6

Re: GPC library ...

mgunes,
saol.  not ettim.

vfp da kolayca yapılması bana ilginç geldi smile