Re: [Emc-users] Nurbs Q

2015-12-05 Thread andy pugh
On 5 December 2015 at 18:22, Gene Heskett  wrote:
> I can't find a method to reference a numbered variable
> indirectly

You can do:

#3 = 12345
#5 = 67890
#6 = 3

#1 = ##6
(DEBUG, The index is #6 and the value is #1)
#1 = #[1 + #6]
(DEBUG, the next number is #[#3 +1])

Is that what you mean?

The debug statement doesn't parse ## the way that G-code does.

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Nurbs Q

2015-12-05 Thread Gene Heskett
On Saturday 05 December 2015 08:57:52 Gene Heskett wrote:

> Greetings nurbs experts;
>
> I'm in the process of doing the code to carve the corner "keys" of
> these blanket chest lids.  The end decorators are 90 degree arcs of
> course.
>
> But it changes width at 1/3 the length of the key, by nominally 3/16"
> because the breadboard end is about that much longer than the lids
> panel is wide on each end.
>
> It seems to me that I don't have a small enough corner radius to pull
> two 45 degree arcs together at the meeting point in the center of of
> that 3/16" space.
>
> So I guess I'm going to test the nurbs code. :)
>
> I think 3 x,y points could do that, to specify the S curve I need.
> Start, center, end.

But when I do that, I get a straight line from A to C thru B. No curve 
anyplace on the stroke. This is with a P1 in every spec. And a P.1 makes 
no difference.  Does this mean I have to specify at least 5 points to 
get an S-curve like the middle 75% of a capital S's height?

In G90 mode, those are very long lines of code since the variable names 
are long enough to be descriptive, and would be shortened by 2/3rds with 
the use of G91, and a pre-calculated array of points.  Is this practical 
and doable?

The latest .pdf has only an example, and little discussion of the P & L 
effects, and even that is above it in the G5.1 Cubic spline text, none 
if that is excluded other than the default, which it won't let you leave 
out for the P, so there is no P default in 2.7.3.  There a link to the 
wiki in the pdf, but that gives source credits without fleshing out any 
of the howto info at all.

> So I'll likely be back with some questions that will earn me one of
> those "here's your sign ,stupid" signs.

Prophetic?  I'm doing pretty good at that I think. :)
>
> Any gotcha's I should watch for?

Thanks.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Nurbs Q

2015-12-05 Thread Gene Heskett
On Saturday 05 December 2015 12:02:46 Gene Heskett wrote:

> On Saturday 05 December 2015 08:57:52 Gene Heskett wrote:
> > Greetings nurbs experts;
> >
> > I'm in the process of doing the code to carve the corner "keys" of
> > these blanket chest lids.  The end decorators are 90 degree arcs of
> > course.
> >
> > But it changes width at 1/3 the length of the key, by nominally
> > 3/16" because the breadboard end is about that much longer than the
> > lids panel is wide on each end.
> >
> > It seems to me that I don't have a small enough corner radius to
> > pull two 45 degree arcs together at the meeting point in the center
> > of of that 3/16" space.
> >
> > So I guess I'm going to test the nurbs code. :)
> >
> > I think 3 x,y points could do that, to specify the S curve I need.
> > Start, center, end.
>
> But when I do that, I get a straight line from A to C thru B. No curve
> anyplace on the stroke. This is with a P1 in every spec. And a P.1
> makes no difference.  Does this mean I have to specify at least 5
> points to get an S-curve like the middle 75% of a capital S's height?
>
> In G90 mode, those are very long lines of code since the variable
> names are long enough to be descriptive, and would be shortened by
> 2/3rds with the use of G91, and a pre-calculated array of points.  Is
> this practical and doable?

Short answer, no.  I can't find a method to reference a numbered variable 
indirectly so that I can setup the init data code in a nice neat little 
WHILE/ENDWHILE loop.  This also intimates that I cannot access the 
#numbered data in a loop. So this code is going to a, take a while to 
write, and B, look like a bust code generator spit it out.

Thought, is this something that gcmc can be made to generate?

> The latest .pdf has only an example, and little discussion of the P &
> L effects, and even that is above it in the G5.1 Cubic spline text,
> none if that is excluded other than the default, which it won't let
> you leave out for the P, so there is no P default in 2.7.3.  There a
> link to the wiki in the pdf, but that gives source credits without
> fleshing out any of the howto info at all.
>
> > So I'll likely be back with some questions that will earn me one of
> > those "here's your sign ,stupid" signs.
>
> Prophetic?  I'm doing pretty good at that I think. :)
>
> > Any gotcha's I should watch for?
>
> Thanks.
>
> Cheers, Gene Heskett


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Nurbs Q

2015-12-05 Thread John Kasunich


On Sat, Dec 5, 2015, at 01:22 PM, Gene Heskett wrote:

> 
> Short answer, no.  I can't find a method to reference a numbered variable 
> indirectly so that I can setup the init data code in a nice neat little 
> WHILE/ENDWHILE loop.  This also intimates that I cannot access the 
> #numbered data in a loop. So this code is going to a, take a while to 
> write, and B, look like a bust code generator spit it out.

LinuxCNC g-code can do indirect accesses.

For example, this line:

#110 = [#[#200+1100]]

Assume that #200 contains the value "23".
This line reads the value from #1123, and assigns it to #110.
Basically I have an array of data starting at #1100, and #200 is the index
into the array.

This code was written ages ago (2008).  These days #200 and #110 could
be named variables.  The "array" still need to be numbered.

(the complete g-code program that I picked that line from does variable 
diameter, variable pitch threading, and is described in detail here:
http://jmkasunich.com/cgi-bin/blosxom/shoptask/fusee-1.html )

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Nurbs Q

2015-12-05 Thread Gene Heskett
On Saturday 05 December 2015 13:58:54 John Kasunich wrote:

> On Sat, Dec 5, 2015, at 01:22 PM, Gene Heskett wrote:
> > Short answer, no.  I can't find a method to reference a numbered
> > variable indirectly so that I can setup the init data code in a nice
> > neat little WHILE/ENDWHILE loop.  This also intimates that I cannot
> > access the #numbered data in a loop. So this code is going to a,
> > take a while to write, and B, look like a bust code generator spit
> > it out.
>
> LinuxCNC g-code can do indirect accesses.
>
> For example, this line:
>
> #110 = [#[#200+1100]]

So I could use [#[#200+4900]] to access the data at #4900 if #200 
contains 0.  4919 if #200 contains 19 etc etc?

That syntax I hadn't tried. I had assumed a #numbered access would start 
with a # sign, but wrap the rest in a set of []. I've scanned thru the 
most recent .pdf, about 2 weeks old I believe, and there do not appear 
to be any examples in it to guide one in writing something like this.

But see my msg to Andy just now, I cannot even get that far.

That last line fails to assign a value, even if the next line is an M2.

> Assume that #200 contains the value "23".
> This line reads the value from #1123, and assigns it to #110.
> Basically I have an array of data starting at #1100, and #200 is the
> index into the array.
>
> This code was written ages ago (2008).  These days #200 and #110 could
> be named variables.  The "array" still need to be numbered.
>
> (the complete g-code program that I picked that line from does
> variable diameter, variable pitch threading, and is described in
> detail here:
> http://jmkasunich.com/cgi-bin/blosxom/shoptask/fusee-1.html )

I have seen that before, you posted a link years ago, but my wet ram is 
not photographic anymore.  Darn it.

Thanks John K.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Nurbs Q

2015-12-05 Thread Gene Heskett
On Saturday 05 December 2015 12:02:46 Gene Heskett wrote:

I give up for the moment, unless someone can tell me how to access a #100 
type variable from the value stored in #<_tmp_nurbs>.

I thought maybe I could access #4900 by assigning like this, but
I apparently cannot even store 4900 into #<_tmp_nurbs>
#<_tmp_nurbs> = 4900

Then access #4900 by #[#<_tmp_nurbs>]

But LCNC gets stuck in the load loop, and if I esc out of it,
(debug,#<_tmp_nurbs>) prints ##, where it should print 49xx

I just stepped down the list of named vars used, in the order they appear 
in the code, and all are properly set UNTIL I use "nurbs" as part of the 
name, and these are set above the while/endwhile loops.  I'll change it 
to nerbs just for S

No effect.  What the heck?

Humm, this statement and everything below it returns ##
#<_angle_inc>   = [90.000 * 0.1000]
(debug,angle_inc=#<_angle_inc>) spits out ##

As does this:
#<_angle_inc>   = 9.000
(debug,#<_angle_inc>) also spits out ##

Do I have a real bug in 2.7.3 sim?  This does not compute...

Thanks everybody.

[...nurbs related stuff]

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Nurbs Q

2015-12-05 Thread Gene Heskett
On Saturday 05 December 2015 13:51:36 andy pugh wrote:

> On 5 December 2015 at 18:22, Gene Heskett  wrote:
> > I can't find a method to reference a numbered variable
> > indirectly
>
> You can do:
>
> #3 = 12345
> #5 = 67890
> #6 = 3
>
> #1 = ##6
> (DEBUG, The index is #6 and the value is #1)
> #1 = #[1 + #6]
> (DEBUG, the next number is #[#3 +1])
>
Not exactly Andy.

> Is that what you mean?
>
> The debug statement doesn't parse ## the way that G-code does.

Humm, my most recent attempt didn't even get that far. See the 
most recent msg. I can't even assign a value to a global named
variable now.

The last line here, fails:

snip header, this is First active code line:

#<_bb_section_lend> =   1. ( inches )
( we want a nice 1/8" radius on the transitions where )
( the width changes, but we are using a 1/16" tool )
#<_corner_rad>  =   [0.12500 + 0.03125000]
( slot in lid panel ought to be longer than it is, so will have )
( to be dug out to fit this for artistic reasons )
( touch off Z at surface, X, Y at left rear corner of workpiece )
#<_lid_section_lend>=   3. ( inches )
#<_key_width_end>   =   0.7500 ( at least 3/4" for strength )
#<_key_width_lid>   =   0.6250 ( and 5/8" in lid so 1/2" can be 
buried/glued in slot )
#<_key_thick>   =   -0.2550 ( trim to fit so it can move with 
the seasons )
#<_feed_rate_s> =   6.
#<_feed_rate_f> =   42.000
#<_z_tmp>   =   0.
#<_z_safe>  =   0.0250
#<_z_step>  =   [#<_key_thick> / 20.] (s/b minus value )
( -0.012750 is correct )
( now we need an array of data to feed nurbs with so initialize about 10 points 
for x,y )
( twenty total, even are x, odd are y )
#<_angle_inc>   =   9. ( in the code )

The above line fails, spitting out ## for #<_angle_inc>

Thanks Andy.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Nurbs Q

2015-12-05 Thread Gene Heskett
On Saturday 05 December 2015 13:58:54 John Kasunich wrote:

> On Sat, Dec 5, 2015, at 01:22 PM, Gene Heskett wrote:
> > Short answer, no.  I can't find a method to reference a numbered
> > variable indirectly so that I can setup the init data code in a nice
> > neat little WHILE/ENDWHILE loop.  This also intimates that I cannot
> > access the #numbered data in a loop. So this code is going to a,
> > take a while to write, and B, look like a bust code generator spit
> > it out.
>
> LinuxCNC g-code can do indirect accesses.
>
> For example, this line:
>
> #110 = [#[#200+1100]]
>
> Assume that #200 contains the value "23".
> This line reads the value from #1123, and assigns it to #110.
> Basically I have an array of data starting at #1100, and #200 is the
> index into the array.
>
> This code was written ages ago (2008).  These days #200 and #110 could
> be named variables.  The "array" still need to be numbered.

To be less confuzin to my ancient wet ram, I followed your format fairly 
closely, and now have it initializing the array of 10 value each for x & 
y. And the debug statement can't deal with the offsets, so the #number 
has to be specified on a per debug line basis.

But now that I have it working, I am going to go back and scale the data 
so the G moves don't have to calculate all that on the fly.  All this 
takes place in the space of 3/16" of both x & y motions if I do it 
right. :)

But, try as I might, it seems I can get nothing out of the G5.2/G5.3 code 
except straight lines at an angle.  And the first set of co-ords IS a 
continuation of the straight Y motion that got it to the starting point.

So while its been educational, I think I'll go back to trying to make a 
45 degree g3 meet another 45 degrees of g2 in the middle. I've spent the 
whole day on this and the best I can get, if I used all 10 points of the 
2 arrays of data, is an initial straight line in the right direction, 
followed by a hand drawn curve that while Y progresses as expected, x 
winds back up at its point of origin.

Thanks John K.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users