Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

ClipPolyline -object study

Pertti Paasky
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...

Start a new conversation!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!