michaelk Posted March 28, 2017 Share Posted March 28, 2017 What was the pre-2014 function for IsPolyClosed? Quote Link to comment
Pat Stanford Posted March 28, 2017 Share Posted March 28, 2017 IsPolyClosed dates back to at least 2012. I think it is much older than that. There was a post to the Vectorscript List in January 2013 that included this. Quote I found a polyline can be recognised as closed (with ispolyclosed) even though a segment can be shown as invisible and hence visually an open poly – so I wrote a more intelligent version – code below Could be rewritten to be more general – I already know the number of vertices and you may not want the end point/invisible status. Bill Wood function isclosedpoly(objH : HANDLE; vertnum : INTEGER; VAR vend,inviscnt : INTEGER) : BOOLEAN; Var polyclosed : BOOLEAN; i,vnum : LONGINT; begin inviscnt := 0; vend := 0; polyclosed := ispolyclosed(objH); vnum := vertnum-1; for i := 0 to vnum do begin if NOT GetVertexVisibility(objH,i) then begin polyclosed := FALSE; inviscnt := inviscnt + 1; vend := i + 1; end; end; isclosedpoly := polyclosed; end; Quote Link to comment
michaelk Posted March 28, 2017 Author Share Posted March 28, 2017 Hmmmmm http://developer.vectorworks.net/index.php/VS:IsPolyClosed says it's available from 2014. Or am I reading that wrong? mk Quote Link to comment
Pat Stanford Posted March 28, 2017 Share Posted March 28, 2017 You are reading it right, I just think the documentation is wrong. Quote Link to comment
michaelk Posted March 28, 2017 Author Share Posted March 28, 2017 [hit forehead on table] Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.