GDL Polyline masking problems (again).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-27 05:04 PM
Any ideas where I'm going wrong?
PEN 1 MATERIAL 2 RESOL 16 hei = 0.1 ! Height wid = 0.15 ! Width thik = 0.02 ! Thickness !----outline of prism PUT 0 , 0 , 15, wid, 0 , 15, wid, hei, 15, 0, hei, 15, 0 , 0 , -1 !!---A rectangular hole xx=0.1 yy=hei/2 !PUT xx, yy, 15, ! xx+0.015, yy, 15, ! xx+0.015, yy+0.012, 15, ! xx, yy+0.012, 15, ! xx, yy, -1 !!----Two circular holes !The first circular hole in the sequence doesn't mask properly. PUT 0.035, yy, 900+79, 0.015, 360, 4000+79 PUT 0.065, yy, 900+79, 0.01, 360, 4000+79 !!-----Do the prism PRISM_ nsp/3, thik, GET (nsp)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-27 06:35 PM
I guess this issue must be related to the fact that each hole has to be finalized with a "-1" status code. Try to script both holes with a start node and repeat it with -1 status code in the end of each hole.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-27 06:56 PM
It sounds like you may be right with the -1 status code issue, but I can't seem to get your suggestion to work unfortunately. Would you mind posting an example of a hole with a start (and end) node - I can't visualise what this would look like in code form!


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-27 07:28 PM
Try something like this:
PRISM_ 31, 0.1, 0, 0, 15, 1, 0, 15, 1, 1, 15, 0, 1, 15, 0, 0, -1, 0.1421712065621, 0.2718219590103, 79, 0.2671712065621, 0.2718219590103, 979, 0, -90, 4079, 0.2671712065621, 0.3968219590103, 79, 0.2671712065621, 0.2718219590103, 979, 0, -90, 4079, 0.3921712065621, 0.2718219590103, 79, 0.2671712065621, 0.2718219590103, 979, 0, -90, 4079, 0.2671712065621, 0.1468219590103, 79, 0.2671712065621, 0.2718219590103, 979, 0, -90, 4079, 0.1421712065621, 0.2718219590103, -1, 0.4935412639657, 0.615680201261, 79, 0.6185412639657, 0.615680201261, 979, 0, -90, 4079, 0.6185412639657, 0.740680201261, 79, 0.6185412639657, 0.615680201261, 979, 0, -90, 4079, 0.7435412639657, 0.615680201261, 79, 0.6185412639657, 0.615680201261, 979, 0, -90, 4079, 0.6185412639657, 0.490680201261, 79, 0.6185412639657, 0.615680201261, 979, 0, -90, 4079, 0.4935412639657, 0.615680201261, -1
GDL object creation: b-prisma.de
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-27 08:07 PM
Seems strange to have to individually do each 90 degree quadrant separately! I will do some playing around to see if I can adapt what I've done already.
I suppose this could be considered a bug, so I'll report it and see what happens.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-27 09:10 PM
Peter wrote:I've used the 4000 status value with 360° for holes with no problem. Not sure if it makes much difference. I've just always been kind of obsessive about minimizing lines in the script.
Seems strange to have to individually do each 90 degree quadrant separately!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-27 09:22 PM
The mask value of the previous node controls the next node. If you change the mask of the last node of the prism to 79, it works fine. The 4th point (0, hei, 15,) not the 5th point (0, 0, -1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-27 10:34 PM
This works in 2D script
!!! ----- 1st hole ----- put 0.035, yy, 900, 0.015, 360, 4000+1 !!! ----- 2nd hole ----- put 0.065, yy, 900, 0.010, 360, 4000+1 !!! ----- 3rd hole an up ----- !put 0.095, yy, 900, ! 0.010, 360, 4000+1In 3D script, you must define the first and last points for the first hole,
to get a correct mask (status 4000). Further holes don't need that.
res = 16 resol res !!! ----- 1st hole ----- put 0.035+0.015, yy, 79, ! 1st point 0.035 , yy, 900, 0, 360-360/res, 4000+79, 0.035+0.015, yy, -1 ! closing !!! ----- 2nd hole ----- put 0.065, yy, 900, 0.010, 360, 4000+79 !!! ----- 3rd hole and up ----- !put 0.095, yy, 900, ! 0.010, 360, 4000+79
@ Zsolt : GDL ref guide is inconsistant on this point.
The fifteen years old example which explains the purpose ...
just shows that it doesn't work in the way it is intended for.
Sorry to be the eternal ranter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-27 11:58 PM
Olivier wrote:This gives me the error as the attached image, Olivier. Are you sure it runs on your machine? I'm on AC13 latest hotfix.
In 3D script, you must define the first and last points for the first hole,
to get a correct mask (status 4000). Further holes don't need that.
Michael wrote:This almost works, but the last boundary node gets shaded strangely with this method. If you then turn on the rectangular hole (with 15 masks) the circle masking fails again.
The mask value of the previous node controls the next node. If you change the mask of the last node of the prism to 79, it works fine. The 4th point (0, hei, 15,) not the 5th point (0, 0, -1)
However, this gave me the idea of inserting an extra duplicate final node with a mask value of 79 into both the prism and the rectangular hole, and it now seems to work as expected! It's not an ideal solution, but at least it's fairly painless to correct in the script.
hei = 0.1 ! Height wid = 0.15 ! Width thik = 0.02 ! Thickness !----outline of prism PUT 0 , 0 , 15, wid, 0 , 15, wid, hei, 15, 0, hei, 15, 0 , 0 , 79, !!Dummy node with mask 0 , 0 , -1 !!---A rectangular hole xx=0.1 yy=hei/2 PUT xx, yy, 15, xx+0.015, yy, 15, xx+0.015, yy+0.012, 15, xx, yy+0.012, 15, xx, yy, 79, !!Dummy node with mask xx, yy, -1 !!----Two circular holes PUT 0.035, yy, 900, 0.015, 360, 4000+79 PUT 0.065, yy, 900, 0.01, 360, 4000+79 !!-----Do the prism PRISM_ nsp/3, thik, GET (nsp)I appreciate the help guys. I think I can work around the problem with the extra dummy nodes in the rectangular polygons. I wonder if Zsolt could comment on whether this is the way it is meant to work, or if it is a bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-01-28 09:05 AM
Peter wrote:Peter, in your attachment (line 3), this is not the same code as in my example.
This gives me the error as the attached image, Olivier.
Try this
!!! ----- 1st hole ----- put 0.035+0.015, yy, 79, ! 1st point 0.035 , yy, 900, 0, 360-360/16, 4000+79, ! 16 is the resolution 0.035+0.015, yy, -1 ! closingIt works on 12. Don't know for 13.