@@ -66,9 +66,7 @@ function calculateOffsets(){ //radial and angular offset
6666}
6767
6868function initializePath ( radius , nbPointsInLayer , pos = [ 0 , 0 , 0 ] ) { //code repurposed from ToolpathUnitGenerator
69- //set camera proportional to radius
7069 let circleGeometry = new THREE . CircleGeometry ( radius / 10 , 32 ) ;
71- camera . position . set ( 0 , 0 , radius * 2 ) ;
7270
7371 //Make three-js group for adding draggable circle points
7472 position = pos ;
@@ -159,40 +157,4 @@ controls.addEventListener( 'dragend', function ( event ) {
159157 event . object . material = circleMaterial ;
160158 calculateOffsets ( ) ;
161159 window . parent . postMessage ( { message :"run-codemirror" } , '*' ) ; // update TPV when dragend finished
162- } ) ;
163-
164-
165-
166-
167-
168-
169-
170-
171-
172- // TODO:
173-
174- //Clean up code
175- //Better UI/color palette
176-
177- //Updating parameters
178- //one: what to do if nbpointsinlayer updates
179- // - linear interpolation algorithm: can calculate the distance between points, divide by certain percentage?
180- // - should be O(n) ish
181- //two: what to do if radius updates:
182- // - scale up/down points from radius (fairly straightforward)
183-
184- //How to interpret path in TUG
185- // Toolpath Unit Generator should have a check for RSP to test whether
186- // RSP is an array or a list of point objects
187- // If it's a list of point objects, set the radius as those point objects directly
188- // (after confirming that the number of point objects = nbPointsInLayer)
189- // Same goes for profile editor
190-
191- //Future additions
192- // Add undo+redo+reset button, command+z shortcuts, shortcuts should only work if mouse is hovering over window
193- // Add a way to select multiple points
194- // Add a way to snap points to a cylindircal coordinate system/cartesian coordinates
195- // Include an svg to toolpath function in the coilcam library
196- // - Something like svgToRadius(radius, nbPointsInLayer, center=[0, 0])
197- // - layerviewer should also be able to take in an SVG as a starting point
198- // - Add function to display layerViewer as a popup or extra tab
160+ } ) ;
0 commit comments