Design forum
Showing results for 
Search instead for 
Did you mean: 

ClipPolyline -object study

Pertti P__sky
Hi all Polygon Operation masters.
I tried GDL to Clip a polyline with another polyline but failed, Polyline offset works fine yet. Some other options also failed, please check the attacment.
This function is great, but I can´t get it work.
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.

The problem is that you forgot to differentiate between polylines and polygons. The calls that save them should go something like this:

PREPAREFUNCTION ch, "StorePolyline", "polyline1", nVertices4,vertArr4,defaultInhEdgeInfo, inhEdgeInfos
dim cont1[]
cont1[1]=vardim1(vertArr)  ! points to the last vertex of the contour
! Store = Store _polygon_
PREPAREFUNCTION ch, "Store", "poly1", nVertices,1,vertArr,cont1 

Similarly you need two versions of "draw respolyarr" - one that draws polylines that OffsetPolyline and ClipPolyline produce (with GetPolylineVertices), and another to draw the polygons that PolyCut and CopyPolygon produce:

! GetVertices = Get _polygon_ vertices
nVertices = CALLFUNCTION (ch, "GetVertices", polylineID, resPolylineVertices) 
Polygon Operations sure is full of gotchas...

Didn't find the answer? Start a new discussion


Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!