From ae7c46348e6fa0a8c727646471f8f0a583ff5406 Mon Sep 17 00:00:00 2001
From: Anton Tetov <anton@tetov.se>
Date: Tue, 30 Aug 2022 16:29:46 +0200
Subject: [PATCH] needs some markings for orientation and coordinate frame

---
 pointy_tool.scad         | 35 +++++++++++++++++++++++++++++++++++
 rsp_tc20_p102_clone.scad | 22 ++++++++--------------
 2 files changed, 43 insertions(+), 14 deletions(-)
 create mode 100644 pointy_tool.scad

diff --git a/pointy_tool.scad b/pointy_tool.scad
new file mode 100644
index 0000000..1a8eec5
--- /dev/null
+++ b/pointy_tool.scad
@@ -0,0 +1,35 @@
+include <rsp_tc20_p102_clone.scad>
+
+SHAFT_RADIUS = 5;
+TOTAL_LENGTH_WITH_CHANGER = 75;
+BASE_HEIGHT = 5;
+
+TIP_HEIGHT = 10;
+
+$fn = 100;
+
+module pointy_tool() 
+{
+    union() {
+        rsp_tc20_p102_clone();
+        // base
+        cylinder(h = BASE_HEIGHT, r1 = RSP_TC20_P102_CLONE_TOTAL_RADIUS, r2 = SHAFT_RADIUS, center = false);
+        
+        translate([0, 0, BASE_HEIGHT]) {
+        // body
+
+            body_height = TOTAL_LENGTH_WITH_CHANGER - RSP_TC20_P102_CLONE_TOTAL_HEIGHT - TIP_HEIGHT - BASE_HEIGHT;
+            cylinder(h = body_height, r = SHAFT_RADIUS, center=false);
+            
+            translate([0, 0, body_height])
+            {
+            // tip
+                cylinder(h=TIP_HEIGHT, r1 = SHAFT_RADIUS, r2 = 0);
+            
+            }
+        }
+    
+    }
+}
+
+pointy_tool();
\ No newline at end of file
diff --git a/rsp_tc20_p102_clone.scad b/rsp_tc20_p102_clone.scad
index 27a332e..6c8dfa2 100644
--- a/rsp_tc20_p102_clone.scad
+++ b/rsp_tc20_p102_clone.scad
@@ -1,18 +1,17 @@
 // RSP TC20 p102 clone
-side = 64;
-sideLong = 94;
-sqHeight = 12;
-cylHeight = 4;
+RSP_TC20_P102_CLONE_TOTAL_RADIUS = 64 / 2;
+RSP_TC20_P102_CLONE_HEIGHT_CHANGER = 12;
+RSP_TC20_P102_CLONE_TOTAL_HEIGHT =RSP_TC20_P102_CLONE_HEIGHT_CHANGER + 4;
 
 $fn = 100;
 
 module
-cylBody(side, height)
+cylBody(radius, height)
 {
     $fn = 360;
     translate([ 0, 0, height / 2 ])
     {
-        cylinder(h = height, r1 = side / 2, r2 = side / 2, center = true);
+        cylinder(h = height, r1 = radius, r2 = radius, center = true);
     }
 }
 
@@ -66,9 +65,7 @@ slantedCylx4()
 module
 rsp_tc20_p102_clone()
 {
-    translate([ 0, 0, (sqHeight + cylHeight) ])
-    {
-        rotate([ 180, 0, 0 ])
+        rotate([ 0, 180, 0 ])
         {
             difference()
             {
@@ -79,9 +76,7 @@ rsp_tc20_p102_clone()
                         // assign($fn = 100);
                         union()
                         {
-                            // sqBody(side,sqHeight);
-                            // sqBodyLong(sideLong,side,sqHeight);
-                            cylBody(side, sqHeight + cylHeight);
+                            cylBody(RSP_TC20_P102_CLONE_TOTAL_RADIUS, RSP_TC20_P102_CLONE_TOTAL_HEIGHT);
                         }
                         //  vvvvvvvv   add these rows again for standard
                         //  toolchanger ^^^^^
@@ -109,6 +104,5 @@ rsp_tc20_p102_clone()
             }
         }
     }
-}
 
-rsp_tc20_p102_clone();
+// rsp_tc20_p102_clone();
-- 
GitLab