DeskProto user forum
Forum: communicate with other users
|
|
|
|
page 1 of 2 |
The forum software said "Failed to post thread." and my thread apeared but with no content. Here is the content I wanted to post: I'm doing finishing passes with a very small toolpath-distance in materials that easily melt if you machine the same spot for too long a time. e.g. the desired outcome is a "Parallel" or "Crosswise" strategy with a "distance between toolpathes" of d/16. I'm thinking of writing a small program that takes a Deskproto project file with a D/4 strategy and copies that strategy with a different Y minimim point. Effectively doing a D/4 pass with an offset of 0 +D/8 +D/16 +D/8+D/16 +D/32 +D/16+D/32 +D/8+D/32 +D/8+D/16+D/32 ... So a) it passes over the same point only 4 times and then that point has time to cool down while the remainder of the material is being machines. b) the surface quality increases incrementally. This strategy can be stopped at any time when the machinist says that the desired quality is achieved c) If the operatre does a finishing at e.g. D/8 and then sees that the surface qualiity is not yet goot enough. It allows to do another (e.g. D/16) finishing pass that does not do cut the same pathes that the earlier D/8 one but only the additional ones. Having such a strategy inside Deskproto would be a great improvement but until then I'm trying to do this by modifying the project file with a small script. (because I don't want to copy&paste a strategy by hand quite that often . Nor adjust all of them when I want to make a change to the "master" pass.) |
|
![]() Hi Marcus, I do not know why the first two posts went wrong, perhaps a time-out issue...? It took me some time to understand what you meant: does the image above correctly visualize this suggestion ? I will add it to our idea's list, no idea though if there will be many users who would benefit from such addition. In the mean time this effect could be achieved by combining several operations with identical settings, only a very small change in the Y-min of the area to be machined (sub-segment) for each operation. Lex. |
|
Yes, that's the idea. I'll try to write a program to do modify project-files to insert these copy&pasted operations with the changed Y-Min. No need to do that manually in the UI. ;) |
|
I wrote a first version of my small java program to modify Deskproto project files to implement this strategy. github.com/MarcusWolschon/DeskProtoOperationReplicator/ tree/master/DeskProtoOperationReplicator/src/biz/wolschon/cnc/deskproto |
|
Update: I added a README.md to the guithub project, explaining what it does. |
|
I had a look at the scripting and wizards and I think I can re-implement this as a script or modify a copy of an existing wizard to output these operations. |
|
Hi Marcus, That is indeed a good option, making it available as easy-to-use feature. Be aware that scripting has changed in DeskProto V7. So in case you want to work in a new wizard you can best do this for V7, otherwise the result will soon be obsolete. I can email you the V7 scripting documentation if you like. Lex. |
|
Where can I find the "DeskProto Script Reference"? It sounds interesting to automate some more complex tasks. |
|
Hi Marcus, The script documentation is emailed on request, as we'd like to know how many DeskProto users are interested in scripting. So I will email the ZIP file to you. Lex. |
|
I wrote a simple script to automatically generate this complex finishing strategy (much easier then to do it outside Deskproto) based on an existing finishing operation as a template for a large number of automatically generated ones. Here is some feedback regarding scripting, that came up: bugs: * I got Deskproto to crash by adding the calculation var count = Math.pow(2, iteration) with iteration being either 1 or 2 * copyOperation(index) is documented as returning the index of the newly generated operation. However var newIndex = DPActivePart.copyOperation(3); DPActivePart.operation(4).name = "newIndex=" + newIndex; reveals newIndex as "undefined". * aparently Deskprotp will happily accept "nan" as any segment value through scripting documentation bugs: * ScriptOperationBase*operation(int index) does not document what is returned if the given index is invalid. * the documentation mentions constants.js for the operation names but Wizards/Common/constants.js does not contain these constants. feature requests: * there is no way to abort a script (that is accidentally running an endless loop) * A keyboard shortcut for File-Run Script would be nice. * If not using the default directory for development, having to select the directory again every single time command is painful. * The script documentation should cover how to display errors and how to do basic debug logging. (It may be covered in the QML documentation but I was coding offline, during a long train ride with no Wifi or cellphone reception.) * we do have DPActivePart.operation(int index) but I can not find any way to get the number of operations on that part. Just like DPProject has numberOfParts. That would allow me to make my script much more robust and to require no hardcoded configuration anymore. * A way to ask the user to select an operation or part would be nice. There is an activePart but no activeOperation. * I can calculate ALL toolpathes but not just some operations or even "visible only". That would be useful together with writeNCProgram(path) to automatically export all my generated operations into one file each. * what is a good method of referencing constants.js without making any assumptions about where in the file system the current script is? I have not yet seen how to chain operations in a script. setChaining(part, previousOperation) does not seem to create new chains. All operations that are chained to something at all seem to end up in "Chain 1". |
|
|
|
page 1 of 2 |

