Welcome! Log In Create A New Profile

Advanced

V-Stick Sharpening Angle Formula

Posted by jasonstone20 
Re: V-Stick Sharpening Angle Formula
February 22, 2018 09:47AM
Ok I figured it out. I just use the C++ ARCCOS function acos instead of 1/cos(Answer).

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
February 22, 2018 03:26PM
Updated on GitHub.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
September 03, 2018 08:43PM
I just wrote a CSS/JavaScript version of this program that should run in any modern web browser. If anyone wants a copy I will email it to you, just PM me, or you can copy/paste to a text editor and save it yourself from this code here:


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>VSharpAngle</title>
</head>
<body>
    <table>
        <tr><th> Enter Edge Bevel Width: </th>
             <td><input id="width" onchange="measureAngle();"</td></tr>
        <tr><th> Enter Edge Bevel Height </th>
             <td><input id="height" onchange="measureAngle();"</td></tr>
        <tr><th> Enter Desired Angle (Elevation)</th>
             <td><input id="desiredAngle" onchange="sharpmakerElevation();"</td></tr>
        <tr><th> Enter Sharpener Angle </th>
            <td><input id="sharpenerAngle" onchange="sharpmakerElevation();"</td></tr>
      <tr><th> Enter Desired Angle (Rotation) </th>
            <td><input id="rotationAngle" onchange="sharpmakerRotation();"</td></tr>
        <tr><th> Enter Sharpener Angle </th>
            <td><input id="rotationSharpener" onchange="sharpmakerRotation();"</td></tr>
        <tr><th> Enter Number of Passes </th>
            <td><input id="numberOfPasses" onchange="passCount();"</td></tr>
    
    
    
    <form name="demoForm">
       
        <h1> V-Sharp-Angle </h1>
        <p> Select Measure Angle, Elevation of Sharpmaker, Rotation of Sharpmaker, Pass Count</p>
        <select name="demoSelect" onchange="menuChoice()">
            <option value="zilch">Select:</option>
            <option value="A">Measure Angle</option>
            <option value="B">Elevation of Sharpmaker</option>
            <option value="C">Rotation of Sharpmaker</option>
            <option value="D">Pass Count</option>
        </select>
    </form>

    <p id="firstP">&nbsp;</p>
    <p id="secondP">&nbsp;</p>
    <p id="thirdP">&nbsp;</p>
    

    <script>
    function menuChoice() {
       var theSelect = demoForm.demoSelect;
        var firstP = document.getElementById('firstP');
       
    
    
    
      
     
        var optionChoice = theSelect.selectedIndex;
        switch (optionChoice) {
            case 1:                
                
                measureAngle();
                break;
            
            case 2:
                
                sharpmakerElevation();
                break;
            
            case 3:
     
                sharpmakerRotation();
                break;
                        
            case 4:
                
                passCount();
                break;
            
            default:
               alert("Please Choose a Selection"winking smiley;
               break;       
        }
    }         
        
    function measureAngle() {
        
       //alert("Run Measure Angle"winking smiley;
        
        var width = document.getElementById("width"winking smiley;
        var height = document.getElementById("height"winking smiley;
        var ans;
        var ang;
        ans = (((width.value)/2)/height.value);
        ang = asin(ans);
        alert(rad2deg(ang));
        
    }
        
    function sharpmakerElevation() {
        
        //alert("Run Sharpmaker Elevation"winking smiley;
        var desiredAngle = document.getElementById("desiredAngle"winking smiley;
        var sharpenerAngle = document.getElementById("sharpenerAngle"winking smiley;
        var deg;
        deg = ((desiredAngle.value - sharpenerAngle.value) * (0.125));
        alert(deg);
    }
    
    function sharpmakerRotation() {
        
        //alert("Run Sharpmaker Rotation"winking smiley;
        var rotationAngle = document.getElementById("rotationAngle"winking smiley;
        var rotationSharpener = document.getElementById("rotationSharpener"winking smiley;
        var deg = rad2deg(acos(dcsc(rotationSharpener.value)*dsin(rotationAngle.value)));
        alert(deg);
        
    }
    
    function passCount() {
        
        //alert("Run Pass Count"winking smiley;
        var x;
        var y;
        var total;
        var xStrokes;
        var startingNumber;
        var numberOfPasses = document.getElementById("numberOfPasses"winking smiley
        
        y = (numberOfPasses.value/10)+1;
        x = (numberOfPasses.value*y);
        startingNumber = (numberOfPasses.value*2);
        total = (x+2) + startingNumber;
        xStrokes = total *2;
        alert(xStrokes);
    }
    
    function deg2rad(deg) {
        return deg * Math.PI / 180;
    }

    function rad2deg(deg) {
        return deg / (Math.PI / 180);
    }

    function dcos(deg) {
        return Math.cos(deg * Math.PI / 180);
    }

    function dsin(deg) {
        return Math.sin(deg * Math.PI / 180);
    }

    function asin(ans) {
        return Math.asin(ans);
    }
         
    function acos(ans) {
        return Math.acos(ans);
        
    }
        
        function dcsc(deg){
    return 1/Math.sin(deg2rad(deg));
    }        
        
   

            
    </script>
</body>
</html>

replace any winking smilely faces with a close parentheses ) and semicolon ;

Since I am new to CSS and JavaScript, any improvements are welcome. GPL license is applicable.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser



Edited 2 time(s). Last edit at 09/03/2018 08:52PM by jasonstone20.
Re: V-Stick Sharpening Angle Formula
September 04, 2018 12:35AM
Quote
jasonstone20
I just wrote a CSS/JavaScript version of this program that should run in any modern web browser. If anyone wants a copy I will email it to you, just PM me, or you can copy/paste to a text editor and save it yourself from this code here:
...
Since I am new to CSS and JavaScript, any improvements are welcome. GPL license is applicable.
Hi,
nice work,

Use http://jshint.com/ it will show you things

https://validator.w3.org/ will also tell you things smiling smiley

My tips, you can continue editing here, alerting/switch/option not needed
https://jsfiddle.net/mfbs9jhr/5/
larger view of the sources here https://jsfiddle.net/mfbs9jhr/5/embedded/
download "save-as" from https://fiddle.jshell.net/mfbs9jhr/5/show/light/

____
Thanks
I don't mow smiling smiley
Re: V-Stick Sharpening Angle Formula
September 04, 2018 07:16AM
ShaperAndMower,
Thank you for the help. I had another version of the program but I thought the drop down menu would be nice. I also put placeholders in the html input command for the fill box. CSS/HTML/JavaScript are all new to me, the way you did the program was way cleaner and smoother.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
September 04, 2018 09:03AM
ShaperAndMower,
I am having trouble getting the Sharpener Elevation part of the program to work:

<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>VSharpAngle</title>

<div>
Measure the angle with calipers 
    <div> Bevel width: <input id="js20-measureAngle-width" oninput="measureAngle();"></div>
    <div> Bevel height: <input id="js20-measureAngle-height" oninput="measureAngle();"></div>
    <div> Angle: <span id="js20-measureAngle-out" ></span> </div>
</div>
    
<div>
Get height to raise V-Stick for desired angle 
    <div> Desired Angle <input id="js20-sharpmakerElevation-desiredAngle" oninput="sharpmakerElevation();"></div>
    <div> V-Stick Sharpener Angle <input id="js20-sharpmakerElevation-sharpenerAngle" oninput="measureAngle();"></div>
    <div> Height<span id="js20-sharpmakerElevation-out" ></span> </div>
</div>    

<script>
  function measureAngle() {
        var width = document.getElementById("js20-measureAngle-width"winking smiley.value;
        var height = document.getElementById("js20-measureAngle-height"winking smiley.value;
        var ans = (((width)/2)/height);
        var ang = asin(ans);
        document.getElementById("js20-measureAngle-out"winking smiley.textContent = rad2deg(ang) ;
        
    }
    
    
    function alert(s){
        document.getElementById('js20-out').append("\n" + s);
    }
    function menuChoice() {
       var theSelect = demoForm.demoSelect;
        var firstP = document.getElementById('firstP');
       
    
    
    
      
     
        var optionChoice = theSelect.selectedIndex;
        switch (optionChoice) {
            case 1:                
                
                measureAngle();
                break;
            
            case 2:
                
                sharpmakerElevation();
                break;
            
            case 3:
     
                sharpmakerRotation();
                break;
                        
            case 4:
                
                passCount();
                break;
            
            default:
               alert("Please Choose a Selection"winking smiley;;
               break;       
        }
    }         
        

        
    function sharpmakerElevation() {
        
        //alert("Run Sharpmaker Elevation"winking smiley;;
        var desiredAngle = document.getElementById("js20-sharpmakerElevation-desiredAngle"winking smiley.value;
        var sharpenerAngle = document.getElementById("js-20-sharpmakerElevation-sharpenerAngle"winking smiley;;
        var deg;
        var ans;
        deg = ((desiredAngle - sharpenerAngle) * (0.125));
      //  alert(deg);
       ans = document.getElementById("js20-sharpmakerElevation-out"winking smiley.textContent ;
    }
    
    function sharpmakerRotation() {
        
        //alert("Run Sharpmaker Rotation"winking smiley;;
        var rotationAngle = document.getElementById("rotationAngle"winking smiley.value;;
        var rotationSharpener = document.getElementById("rotationSharpener"winking smiley.value;;
        var deg = rad2deg(acos(dcsc(rotationSharpener)*dsin(rotationAngle)));
        alert('sharpmakerRotation('+rotationAngle+','+rotationSharpener+')='+deg);
        
    }
    
    function passCount() {
        
        //alert("Run Pass Count"winking smiley;;
        var x;
        var y;
        var total;
        var xStrokes;
        var startingNumber;
        var numberOfPasses = document.getElementById("numberOfPasses"winking smiley; 
        
        y = (numberOfPasses.value/10)+1;
        x = (numberOfPasses.value*y);
        startingNumber = (numberOfPasses.value*2);
        total = (x+2) + startingNumber;
        xStrokes = total *2;
        alert(xStrokes);
    }
    
    function deg2rad(deg) {
        return deg * Math.PI / 180;
    }

    function rad2deg(deg) {
        return deg / (Math.PI / 180);
    }

    function dcos(deg) {
        return Math.cos(deg * Math.PI / 180);
    }

    function dsin(deg) {
        return Math.sin(deg * Math.PI / 180);
    }

    function asin(ans) {
        return Math.asin(ans);
    }
         
    function acos(ans) {
        return Math.acos(ans);
        
    }
        
    function dcsc(deg){
        return 1/Math.sin(deg2rad(deg));
    }
   

       </script>

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
September 04, 2018 02:18PM
Quote
jasonstone20
ShaperAndMower,
I am having trouble getting the Sharpener Elevation part of the program to work:

jsfiddle too fiddly? yeah it is kinda cramped even though you can resize a lil bit
You can always share your code github

Compare this to what you have
One of your oninput was calling measureAngle
textContent goes on left side = of assignment
the new alert function needed

Its easier to read with more functions, but then you have to name 'em

<div oninput="sharpmakerElevation();">
Get height to raise V-Stick for desired angle 
    <div> V-Stick Sharpener Angle <input id="js20-sharpmakerElevation-sharpenerAngle"> </div>
    <div> Desired Angle <input id="js20-sharpmakerElevation-desiredAngle" > </div>
    <div> Height <span id="js20-sharpmakerElevation-out" ></span> </div>
</div>

<div style="border: 1px solid black; white-space: pre-wrap; overflow: scroll;" id="js20-out" />


function idVal( id ) {
  return document.getElementById( id ).value ;
}

function idOut( id, val ) {
  return document.getElementById( id ).textContent = val ;
}

function sharpmakerElevation() {
  var desiredAngle = idVal( "js20-sharpmakerElevation-desiredAngle" ) ;
  var sharpenerAngle = idVal( "js20-sharpmakerElevation-sharpenerAngle" ) ;
  var answer = ( ( desiredAngle - sharpenerAngle ) * ( 0.125 ) ) ;
  alert( "sharpmakerElevation( " + answer ) ;
  idOut( "js20-sharpmakerElevation-out", answer ) ;
}

____
Thanks
I don't mow smiling smiley
Re: V-Stick Sharpening Angle Formula
September 04, 2018 05:29PM
ShaperAndMower,
That worked. Thank you.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
September 15, 2018 11:05AM
I think I got all the smiley faces out, along with a few minor tweaks:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>VSharpAngle</title>
</head>
<body>
    <table>
        <tr><th> Enter Edge Bevel Width: </th>
             <td><input id="width" onselect="measureAngle() ; "</td></tr>
        <tr><th> Enter Edge Bevel Height </th>
             <td><input id="height" onchange="measureAngle() ; "</td></tr>
        <tr><th> Enter Desired Angle (Elevation)</th>
             <td><input id="desiredAngle" onselect="sharpmakerElevation() ; "</td></tr>
        <tr><th> Enter Sharpener Angle </th>
            <td><input id="sharpenerAngle" onchange="sharpmakerElevation() ; "</td></tr>
      <tr><th> Enter Desired Angle (Rotation) </th>
            <td><input id="rotationAngle" onselect="sharpmakerRotation() ; "</td></tr>
        <tr><th> Enter Sharpener Angle </th>
            <td><input id="rotationSharpener" onchange="sharpmakerRotation() ; "</td></tr>
        <tr><th> Enter Number of Passes </th>
            <td><input id="numberOfPasses" onselect="passCount() ; "</td></tr>
    
    <form name="demoForm">
              
                   
                //document.write("Run Measure Angle" ) ;
                measureAngle() ;
                break;
            
            case 2:
                //document.write("Run Sharpmaker Elevation" ) ;
                sharpmaker<h1> V-Sharp-Angle </h1>
        <p> Select Measure Angle, Elevation of Sharpmaker, Rotation of Sharpmaker, Pass Count</p>
        <select name="demoSelect" onchange="menuChoice() ">
            <option value="zilch">Select:</option>
            <option value="A">Measure Angle</option>
            <option value="B">Elevation of Sharpmaker</option>
            <option value="C">Rotation of Sharpmaker</option>
            <option value="D">Pass Count</option>
        </select>
    </form>

    <p id="firstP">&nbsp;</p>
    <p id="secondP">&nbsp;</p>
    <p id="thirdP">&nbsp;</p>
    

    <script>
    function menuChoice() {
       var theSelect = demoForm.demoSelect;
        var firstP = document.getElementById('firstP' ) ;
       // var secondP = document.getElementById('secondP' ) ;
       // var thirdP = document.getElementById('thirdP' ) ;
     
    //   firstP.innerHTML = ('This option\'s index number is: ' + theSelect.selectedIndex ) ;
     //   secondP.innerHTML = ('Its value is: ' + theSelect[theSelect.selectedIndex].value ) ;
     //   thirdP.innerHTML = ('Its text is: ' + theSelect[theSelect.selectedIndex].text ) ;
      
    
    
    
      
     //  var optionChoice = document.getElementById('secondP' ) ;
        var optionChoice = theSelect.selectedIndex;
        switch (optionChoice) {
            case 1:     Elevation() ;
                break;
            
            case 3:
                //document.write("Run Sharpmaker Rotation" ) ;
                sharpmakerRotation() ;
                break;
                        
            case 4:
                //document.write("Pass Count" ) ;
                passCount() ;
                break;
            
            default:
               alert("Please Choose a Selection" ) ;
               break;       
        }
    }         
        
    function measureAngle() {
        
       //alert("Run Measure Angle" ) ;
        
        var width = document.getElementById("width" ) ;
        var height = document.getElementById("height" ) ;
        var ans;
        var ang;
        ans = (((width.value)/2)/height.value ) ;
        ang = asin(ans ) ;
        alert(rad2deg(ang) ) ;
        
    }
        
    function sharpmakerElevation() {
        
        //alert("Run Sharpmaker Elevation" ) ;
        var desiredAngle = document.getElementById("desiredAngle" ) ;
        var sharpenerAngle = document.getElementById("sharpenerAngle" ) ;
        var deg;
        deg = ((desiredAngle.value - sharpenerAngle.value) * (0.125) ) ;
        alert(deg) ;
    }
    
    function sharpmakerRotation() {
        
        //alert("Run Sharpmaker Rotation" ) ;
        var rotationAngle = document.getElementById("rotationAngle" ) ;
        var rotationSharpener = document.getElementById("rotationSharpener" ) ;
        var deg = rad2deg(acos(dcsc(rotationSharpener.value)*dsin(rotationAngle.value)) ) ;
        alert(deg) ;
        
    }
    
    function passCount() {
        
        //alert("Run Pass Count" ) ;
        var x;
        var y;
        var total;
        var xStrokes;
        var startingNumber;
        var numberOfPasses = document.getElementById("numberOfPasses" )
        
        y = (numberOfPasses.value / 10 ) + 1;
        x = (numberOfPasses.value * y ) ;
        startingNumber = (numberOfPasses.value * 2 ) ;
        total = ( x + 2 ) + startingNumber;
        xStrokes = total * 2;
        alert(total ) ;
    }
    
    function deg2rad(deg) {
        return deg * Math.PI / 180;
    }

    function rad2deg(deg) {
        return deg / (Math.PI / 180 ) ;
    }

    function dcos(deg) {
        return Math.cos(deg * Math.PI / 180 ) ;
    }

    function dsin(deg) {
        return Math.sin(deg * Math.PI / 180 ) ;
    }

    function asin(ans) {
        return Math.asin(ans ) ;
    }
         
    function acos(ans) {
        return Math.acos(ans ) ;
        
    }
        
        function dcsc(deg){
    return 1/Math.sin(deg2rad(deg) ) ;
    }        
        
    function dOut() {
        $('#debuggerytextarea').append(Array.from(arguments) ) ;
        return;
    }

    function CosOut(R) {
        dOut('COS(R=', R, ') = ', dcos(R) ) ;
    }

    function SinOut(D, A) {
    dOut('SIN(D=', D,
           ') / SIN(A=', A,
           ') = ', ( dsin(D) / dsin(A) )
     );
    }

            
    </script>
</body>
</html>


ShaperAndMower,
I tried your last change but I couldn't get it to not expand the result box. I like your solution to the program, it is a lot cleaner than my program.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser



Edited 1 time(s). Last edit at 09/15/2018 11:34AM by jasonstone20.
Re: V-Stick Sharpening Angle Formula
September 16, 2018 01:28AM
Jason, its amazing You got to try to code something like that.
I will wait one more week and will try the program grinning smiley
You know - I dont like early versions smiling smiley

www.instagram.com/jscuttingtools
Re: V-Stick Sharpening Angle Formula
September 16, 2018 11:41AM
JSCT,
Thank you. It's on it's third or fouth version, or v1.3 or v1.4, so I'd say it's ok to use!. Plus I have tested and used it for a while, if something doesn't work write, let me know.


ShaperAndMower,
I couldn't get the first change you made to work with more than one function, the answer box doesn't work when I add another function to it. I don't know enough HTML, CSS, and JavaScript to figure out what the issue is, so I just stuck to what I had working. Thank you for the help, I was able to make the program a little better with your input. I would like to have the whole thing more like how you had it, with the answer showing up in a box vs using the alert call. Also, thank you for showing me JSfiddle, it is awesome. I have a similar program on my Chromebook, but I didn't know how to use it until I saw you use JSfiddle.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser



Edited 2 time(s). Last edit at 09/16/2018 11:45AM by jasonstone20.
Re: V-Stick Sharpening Angle Formula
September 16, 2018 02:55PM
So I copy paste it into web console of my ff browser and got syntax error after hitting an enter..
Any ideas ? I dont code at all.. tried it 3 times but no success..

www.instagram.com/jscuttingtools
Re: V-Stick Sharpening Angle Formula
September 16, 2018 05:04PM
JSCT,
The steps to run to program should be this:
Open a text editor, copy and paste the code, save as a .html file, enter in the web browser box file:/// and the directory path and file name, ex file:///~/Downloads/VSharpAngle.html for Linux/Unix or file:///C:\Downloads\VSharpAngle.html for Windows.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
September 16, 2018 09:34PM
Quote
jasonstone20
ShaperAndMower,
I tried your last change but I couldn't get it to not expand the result box. I like your solution to the program, it is a lot cleaner than my program.
ShaperAndMower,
I couldn't get the first change you made to work with more than one function, the answer box doesn't work when I add another function to it. I don't know enough HTML, CSS, and JavaScript to figure out what the issue is, so I just stuck to what I had working. Thank you for the help, I was able to make the program a little better with your input. I would like to have the whole thing more like how you had it, with the answer showing up in a box vs using the alert call. Also, thank you for showing me JSfiddle, it is awesome. I have a similar program on my Chromebook, but I didn't know how to use it until I saw you use JSfiddle.

well, could be idOut isn't compatible with your browser version ...
i see you have dOut from vadero but that relies on jquery

here is your whole last thing, might want to double check that it does what you expect


<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">

<script src="http://code.jquery.com/jquery-latest.js" ></script>
<title>VSharpAngle</title>

<style>
.container {
    background: black;
    display: flex;
}

.left {
    width: 50%;
    background:white;
}

.right {
    background:white;
    width: 50%;
}
#js20-out {
    height: 100%;
    width: 100%;
    white-space: pre-wrap; 
    overflow: scroll;
}

</style>

<div class="container">
  <div class="left">

<div oninput="measureAngle() ;">
Measure the angle with calipers 
    <div> Bevel width: <input id="js20-measureAngle-width" size=3></div>
    <div> Bevel height: <input id="js20-measureAngle-height" size=3></div>
    <div> Angle: <span id="js20-measureAngle-out" ></span> </div>
</div>

<hr>

<div oninput="sharpmakerElevation() ;">
Get height to raise V-Stick for desired angle 
    <div> Desired Angle <input id="js20-sharpmakerElevation-desiredAngle" size=3> </div>
    <div> Angle setting (ex 15/20)
        <select id="js20-sharpmakerElevation-sharpenerAngle">
            <option value="15" selected>15</option>
            <option value="20" >20</option>
            <option value="25" >25</option>
        </select>
    </div>

    <div> Height <span id="js20-sharpmakerElevation-out" ></span> </div>
</div>

<hr>

<div oninput="sharpmakerRotation() ;">
The angle yout get when you Rotate sharpmaker
    <div> Desired Angle  <input id="rotationAngle" size=3> </div>
    <div> Angle setting (ex 15/20)
        <select id="rotationSharpener">
            <option value="15" selected>15</option>
            <option value="20" >20</option>
            <option value="25" >25</option>
        </select>
    </div>
    <div> Rotate base by <span id="id-out-sharpmakerRotation" ></span> degrees </div>
</div>

<hr>

<div oninput="passCount()">
    Enter Number of Passes <input id="numberOfPasses" type="number" size=4 value=9>
    = <span id="id-out-passCount" ></span>
    </div>

</div>
    <div class="right">
        <div><button onclick="$('#js20-out').text('');"> [x] clear  </button></div>
        <div  id="js20-out"  > </div>
    </div>
</div>



<script>
function deg2rad(deg) {
  return deg * Math.PI / 180;
}

function rad2deg(deg) {
  return deg / (Math.PI / 180) ;
}

function dcos(deg) {
  return Math.cos(deg * Math.PI / 180) ;
}

function dsin(deg) {
  return Math.sin(deg * Math.PI / 180) ;
}

function asin(ans) {
  return Math.asin(ans) ;
}
   
function acos(ans) {
  return Math.acos(ans) ;
  
}
  
function dcsc(deg){
  return 1/Math.sin(deg2rad(deg)) ;
}


function idVal( id ) {
  return $('#'+id).val() ;
}

function idOut( id, val ) {
  return $('#'+id).text( val ) ;
}


function dOut( s){
  $('#js20-out').append("\n" ) ;
  $('#js20-out').append(Array.from(arguments) ) ;
}

function sharpmakerElevation() {
  var desiredAngle   = idVal( "js20-sharpmakerElevation-desiredAngle" ) ;
  var sharpenerAngle = idVal( "js20-sharpmakerElevation-sharpenerAngle" ) ;
  var answer         = ( ( desiredAngle - sharpenerAngle ) * ( 0.125 ) ) ;
  dOut(  "sharpmakerElevation = " + answer ) ;
  idOut( "js20-sharpmakerElevation-out", answer ) ;
}

function measureAngle() {
  var width     = idVal( "js20-measureAngle-width" ) ;
  var height    = idVal( "js20-measureAngle-height" ) ;
  var ans       = (((width)/2)/height) ;
  var ang       = rad2deg( asin(ans) ) ;
  dOut(  "measureAngle = " + ang ) ;
  $('#js20-measureAngle-out').text( ang ) ;
}
    
    
function sharpmakerRotation() {
  var rotationAngle     = idVal( "rotationAngle" ) ;
  var rotationSharpener = idVal( "rotationSharpener" ) ;
  var deg               = rad2deg(acos(dcsc(rotationSharpener )*dsin(rotationAngle )) ) ;
  dOut( ' ?  sharpmakerRotation ' + deg) ;
  idOut( 'id-out-sharpmakerRotation', ' ? ' +deg ) ;
}



function passCount() {
  var numberOfPasses = idVal( "numberOfPasses" ) ;
  var y              = (numberOfPasses / 10 ) + 1;
  var x              = (numberOfPasses * y ) ;
  var startingNumber = (numberOfPasses * 2 ) ;
  var total          = ( x + 2 ) + startingNumber;
  var xStrokes       = total * 2;
  dOut( "passCount" );
  for( startingNumber; numberOfPasses >= 9; numberOfPasses -= 10 ){
      dOut(  "\t-----" + numberOfPasses + "-----\n" );
  }
  
  dOut(  "\t-----05-----\n" );
  dOut(  "\t-----03-----\n" );
  dOut(  "\t-----02-----\n" );
  dOut(  "\t-----01-----\n" );
  dOut(  "\t     " + total + " Total Passes Per Side Counted\n"  );
  dOut(  "\t     " + xStrokes + " Total X-Strokes\n"  );
  
  dOut(  '? passCount = ' + total ) ;
  idOut('id-out-passCount', total ) ;
}

</script>

____
Thanks
I don't mow smiling smiley
Re: V-Stick Sharpening Angle Formula
September 17, 2018 07:41AM
ShaperAndMower,

Yes, that worked. I think idOut was the problem. Thank you for the help!

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser



Edited 1 time(s). Last edit at 09/17/2018 07:44AM by jasonstone20.
Re: V-Stick Sharpening Angle Formula
September 18, 2018 11:55AM
Quote
jasonstone20
JSCT,
The steps to run to program should be this:
Open a text editor, copy and paste the code, save as a .html file, enter in the web browser box file:/// and the directory path and file name, ex file:///~/Downloads/VSharpAngle.html for Linux/Unix or file:///C:\Downloads\VSharpAngle.html for Windows.

Works well, thanks Jason smiling smiley

www.instagram.com/jscuttingtools
Re: V-Stick Sharpening Angle Formula
September 18, 2018 07:40PM
JSCT,
Glad you got it to work. You should try ShaperAndMowers version, it is not as clumsy.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser



Edited 1 time(s). Last edit at 09/18/2018 07:41PM by jasonstone20.
Re: V-Stick Sharpening Angle Formula
September 28, 2018 08:41AM
Downloadable versions:

ShaperAndMower's version:
[drive.google.com]

My version:

[drive.google.com]

Linux C++ version:

[drive.google.com]

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
October 06, 2018 09:14AM
Edge Pro Angle Measurement:
[www.bladeforums.com]

I wonder if there is a way to do a software version of the Knife Grinders program (for the Tormek) for the Edge Pro or Wicked Edge to get all the angles set:
[youtu.be]

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
February 28, 2019 11:18PM
I put the JavaScript versions on my phone, they work just like an app, all you have to do is download the files, open the file manager, make them a shortcut on the home screen, and select the browser as the default app to open with.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
November 07, 2019 04:56PM
I asked Larrin Thomas if I could use his TCC formula for steel edge retention for the program, and he said yes. I have a Linux C++ version up and running, I will upload it soon to Google Drive. I going to start working on the JavaScript version tomorrow hopefully. Thanks goes to Larrin for putting in the work on the TCC formula.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
November 18, 2019 02:37PM
OK, the JavaScript version is up and running:
[drive.google.com]

I want to thank Larrin Thomas for allowing me to use his formula. Thank you to ShaperAndMower for helping with the original C++ version, the later JavaScript version, and re-writing the JavaScript version into a way more useful program. Thank you to everyone in the knife community for inspiring me to do projects like this one. If you have any ideas, suggestions, or comments about this project, please feel free to contact me.

"I am still discussing issues of steels and performance at this stage."
--Cliff Stamp

"Cause geometry cuts, .....steel determines the level and the duration"
--Roman Landes

"But in general, I'm all about high performance, Ergos, safety. That's why I've been accused of 'designing in the dark' "
--Sal Glesser
Re: V-Stick Sharpening Angle Formula
November 19, 2019 06:52AM
Nice work Jason!
Sorry, only registered users may post in this forum.

Click here to login