bug with use-stepdown and use-stepover in adsk.cam.ToolLibrary.createFromJson(str)

bug with use-stepdown and use-stepover in adsk.cam.ToolLibrary.createFromJson(str)

fei_shenU7T5P
Explorer Explorer
263 Views
2 Replies
Message 1 of 3

bug with use-stepdown and use-stepover in adsk.cam.ToolLibrary.createFromJson(str)

fei_shenU7T5P
Explorer
Explorer

The values of use-stepdown and use-stepover in the input (str) are false.

But the values of them are changed to true after adsk.cam.ToolLibrary.createFromJson(str).

 

Why don't the values match? Is this a bug or feature? How to keep the value consistent?

str = '{"data": [{"BMC": "carbide", "description": "Keyseat Cutter - D3/8\\", reach 1.145\\"", "geometry": {"CSP": false, "DC": 0.375, "LB": 1.195, "LCF": 0.02, "NOF": 6.0, "OAL": 2.195, "SFDM": 0.375, "shoulder-length": 0.02, "HAND": true, "RE": 0.0, "tip-length": null, "assemblyGaugeLength": 1.0}, "guid": "12c02570-7bae-4c31-ab3b-b4f1ced3b482", "post-process": {"number": 0, "diameter-offset": 0, "length-offset": 0, "turret": 0, "comment": "", "manual-tool-change": false, "live": true, "break-control": false}, "type": "slot mill", "unit": "inches", "start-values": {"presets": [{"name": "AluWrought_Keyseat", "description": null, "guid": "49d714b5-c3a8-40c8-8957-34aabe94908a", "n": 10200.0, "v_f": 216.0, "v_c": 1001.382658331746, "f_z": 0.003529411764705882, "f_n": 9.80392156862745e-05, "n_ramp": 10200.0, "v_f_leadIn": 216.0, "v_f_leadOut": 216.0, "v_f_transition": 216.0, "v_f_retract": 180.0, "v_f_ramp": 216.0, "v_f_plunge": 60.0, "use-stepdown": false, "use-stepover": false, "stepdown": 0.0, "stepover": 0.0, "use-feed-per-revolution": false, "tool-coolant": "flood", "material": {"category": "all", "query": ""}}]}, "shaft": {"segments": [{"height": 1.125, "lower-diameter": 0.187, "upper-diameter": 0.187}, {"height": 0.05, "lower-diameter": 0.375, "upper-diameter": 0.375}], "type": "shaft"}, "holder": {"segments": [{"height": 0.148, "lower-diameter": 1.5, "upper-diameter": 1.97}, {"height": 0.836, "lower-diameter": 1.97, "upper-diameter": 1.97}, {"height": 0.176, "lower-diameter": 1.57, "upper-diameter": 1.57}, {"height": 0.09, "lower-diameter": 1.57, "upper-diameter": 1.75}, {"height": 0.425, "lower-diameter": 1.75, "upper-diameter": 1.75}, {"height": 0.05, "lower-diameter": 1.75, "upper-diameter": 1.85}, {"height": 0.03, "lower-diameter": 2.442, "upper-diameter": 2.502}, {"height": 0.145, "lower-diameter": 2.502, "upper-diameter": 2.502}, {"height": 0.079, "lower-diameter": 2.502, "upper-diameter": 2.215}, {"height": 0.118, "lower-diameter": 2.215, "upper-diameter": 2.215}, {"height": 0.079, "lower-diameter": 2.215, "upper-diameter": 2.502}, {"height": 0.143, "lower-diameter": 2.502, "upper-diameter": 2.502}, {"height": 0.03, "lower-diameter": 2.502, "upper-diameter": 2.442}, {"height": 0.125, "lower-diameter": 1.75, "upper-diameter": 1.75}], "type": "holder", "gaugeLength": 0.0, "guid": "2c36d80b-c99b-4673-a3f9-5d9ff60f2dc5", "unit": "inches"}}], "version": 0}'
toollib = adsk.cam.ToolLibrary.createFromJson(str)
tool = toollib[0]
tool.toJson()






'{"BMC":"carbide","GRADE":"Mill Generic","description":"Keyseat Cutter - D3/8\\", reach 1.145\\"","geometry":{"CSP":false,"DC":0.37499999999999994,"HAND":true,"LB":1.195,"LCF":0.02,"NOF":6,"NT":1,"OAL":2.195,"RE":0,"SFDM":0.37499999999999994,"TA":0,"TP":0,"assemblyGaugeLength":3.669,"shoulder-diameter":0.37499999999999994,"shoulder-length":0.02,"thread-profile-angle":60,"tip-diameter":0.37499999999999994,"tip-length":0,"tip-offset":0},"guid":"12c02570-7bae-4c31-ab3b-b4f1ced3b482","holder":{"description":"","gaugeLength":2.4739999999999998,"guid":"2c36d80b-c99b-4673-a3f9-5d9ff60f2dc5","product-id":"","product-link":"","segments":[{"height":0.148,"lower-diameter":1.5,"upper-diameter":1.97},{"height":0.836,"lower-diameter":1.97,"upper-diameter":1.97},{"height":0.176,"lower-diameter":1.57,"upper-diameter":1.57},{"height":0.09,"lower-diameter":1.57,"upper-diameter":1.75},{"height":0.425,"lower-diameter":1.75,"upper-diameter":1.75},{"height":0.05,"lower-diameter":1.75,"upper-diameter":1.85},{"height":0.03,"lower-diameter":2.442,"upper-diameter":2.502},{"height":0.145,"lower-diameter":2.502,"upper-diameter":2.502},{"height":0.079,"lower-diameter":2.502,"upper-diameter":2.215},{"height":0.118,"lower-diameter":2.215,"upper-diameter":2.215},{"height":0.079,"lower-diameter":2.215,"upper-diameter":2.502},{"height":0.143,"lower-diameter":2.502,"upper-diameter":2.502},{"height":0.03,"lower-diameter":2.502,"upper-diameter":2.442},{"height":0.125,"lower-diameter":1.75,"upper-diameter":1.75}],"type":"holder","unit":"inches","vendor":""},"post-process":{"break-control":false,"comment":"","diameter-offset":0,"length-offset":0,"live":true,"manual-tool-change":false,"number":0,"turret":0},"product-id":"","product-link":"","shaft":{"segments":[{"height":1.125,"lower-diameter":0.187,"upper-diameter":0.187},{"height":0.05,"lower-diameter":0.375,"upper-diameter":0.375}],"type":"shaft"},"start-values":{"presets":[{"description":"","f_n":0.0058823529411764705,"f_z":0.0035294117647058825,"guid":"49d714b5-c3a8-40c8-8957-34aabe94908a","material":{"category":"all","query":"","use-hardness":false},"n":10200,"n_ramp":10200,"name":"AluWrought_Keyseat","ramp-angle":2,"stepdown":0,"stepover":0,"tool-coolant":"flood","use-stepdown":true,"use-stepover":true,"v_c":1001.3826583317464,"v_f":216,"v_f_leadIn":216,"v_f_leadOut":216,"v_f_plunge":60,"v_f_ramp":216,"v_f_transition":216}]},"type":"slot mill","unit":"inches","vendor":""}'

 

0 Likes
Accepted solutions (1)
264 Views
2 Replies
Replies (2)
Message 2 of 3

stephen.irvine
Autodesk
Autodesk
Accepted solution

Hi,

 

You are using a version 0 tool library here, and so the data will be run through many layers of migration. If you use a more recent version we will make less changes to the incoming data.

 

However we may always need to make some changes to the incoming data so there's no assurances that what you put in and what you get out will be exactly the same.

 

In this case I don't know where you got this JSON from, so I don't know what version would be appropriate, but you may find that if you change it to something greater than 10 it no longer changes the use-stepdown/stepover values.

 

Thanks


Stephen Irvine
Principal SW Engineer
Message 3 of 3

fei_shenU7T5P
Explorer
Explorer

Thanks a lot for the help. Updating the version to 24 works.

0 Likes