Jump to content
Developer Wiki and Function Reference Links ×

legacy function


Recommended Posts

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;

 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...