Post processor "entityClosed" always returning zero

Hi Les,

I’ve been at this several hours trying to figure out what I’m doing wrong.

Could you give me some guidance on how to use the Sheetcam variable “entityClosed”.

I believe this is supposed to test whether the next path is open or closed. Variable is 1 if path is closed and 0 if path is open.

My test part has one external cut and 17 internal cuts. 5 of these internal cuts are open lines and the rest are closed lines.

In the post I’m testing cut length, and also if the cuts are open or closed. Cut length is a doddle and does what I want. However, “entityClosed” is always having a value of 0, indicating open paths.
The attached screenshot shows the returned messaged when running the post (you might have to download the image to see it at full size, it’s reduced it’s size in this post. Or right click in it and open it in a new tab to get full size).
The following code is what I’ve written. However I have tried the code outside of “function OnNewEntity()” too, and “entityLength” works but “entityClosed” is still always at zero. Am I doing something wrong ?

function OnNewEntity()
  if entityLength > 80 then
      post.Message("PATH LONG entityLength == ", entityLength)
      post.Message("PATH SHORT entityLength == ", entityLength)
   if entityClosed == 1 then
	post.Message("PATH CLOSED entityClosed == ", entityClosed)
     post.Message("PATH OPEN entityClosed == ", entityClosed)

As far as the post is concerned the lead in and lead out are part of the shape so if you have leadins or leadouts the shapes aren’t closed.

Ah I see.

Thanks for that Les. Good job I didn’t keep trying, wouldn’t have got very far :laughing: