CAM stock dimension

CAM stock dimension

Anonymous
Not applicable
1,336 Views
10 Replies
Message 1 of 11

CAM stock dimension

Anonymous
Not applicable

Is it possible to get stock dimensions in API?

In my code i'm going trought all setups to generate G code and i would like to export all dimension of this setup for cutlist

 

Screenshot_1.png

1,337 Views
10 Replies
Replies (10)
Message 2 of 11

BrianEkins
Mentor
Mentor

Unfortunately, that's not exposed in the current CAM API.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 11

griptechshop
Advocate
Advocate

Hi,

 

As this feature been added since? It would be really helpful for stock management.

 

Thanks,

0 Likes
Message 4 of 11

BrianEkins
Mentor
Mentor

Nothing has changed.  The CAM team is responsible for the CAM portion of the API so it would be more effective to post something on the Manufacture forum or create an item in the IdeaStation.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 5 of 11

TechrimStandards
Enthusiast
Enthusiast

I also need this feature as well and am curious if it's even on the API/Manufacturing road map. 

0 Likes
Message 6 of 11

HughesTooling
Consultant
Consultant

What are you trying to do with the information? You could write a custom post processor or even add a function to an existing one to output the info to a text file.

Here's what I see using the Dump.cps post.

-1: onOpen()
0: onParameter('product-id', 'fusion360')
1: onParameter('generated-by', 'Fusion 360 CAM 2.0.5688')
2: onParameter('generated-at', 'Saturday, May 18, 2019 1:00:00 PM')
3: onParameter('hostname', '')
4: onParameter('username', '')
5: onParameter('document-path', '')
6: onParameter('document-id', '53c5aef4-a3da-416f-ae77-9e541db0018a')
7: onParameter('model-version', 'ece9a0f6-6943-4346-a5d3-cddcdf64b241')
8: onParameter('leads-supported', 1)
9: onParameter('job-description', 'LableInserts')
10: onParameter('machine-id', '18')
11: onParameter('machine-config', '<?xml version="1.0" encoding="UTF-16" standalone="no" ?><machine xmlns="http://www.hsmworks.com/xml/2009/machine" version="1.0"><vendor>Autodesk</vendor><description>EzTrak</description><machining jet="no" milling="yes" turning="no" wire="no"/><tooling maximumToolDiameter="0mm" maximumToolLength="0mm" maximumToolWeight="0kg" numberOfTools="100" toolChanger="yes" toolPreload="yes"/><machiningTime ratio="1" toolChangeTime="15s"/><coolant options="FLOOD"/><home x="0mm" y="0mm" z="0mm"/><capabilities workOffsets="10"/><spindle axis="0 0 1"/><post><postProcessor>cloud://EZTrak GCodeRepeats.cps</postProcessor><setupSheet></setupSheet></post><simulation retractOnIndexing="yes" shortestAngularRotation="yes" wcs="0mm 0mm 0mm"/><multiAxis adjust="yes" angle="10deg" cone="3deg" linearizationTolerance="0.04mm" method="off" tolerance="0.04mm"/><axis id="X" link="table" range="0mm 0mm"/><axis id="Y" link="table" range="0mm 0mm"/><axis id="Z" link="table" range="0mm 0mm"/></machine>')
13: onParameter('stock', '((-85, -30, -16), (85, 30, 0))')
15: onParameter('stock-lower-x', -85)
17: onParameter('stock-lower-y', -30)
19: onParameter('stock-lower-z', -16.00000000000001)
21: onParameter('stock-upper-x', 85)
23: onParameter('stock-upper-y', 30)
25: onParameter('stock-upper-z', 0)
27: onParameter('part-lower-x', -85)
29: onParameter('part-lower-y', -30)
31: onParameter('part-lower-z', -16.00000000000001)
33: onParameter('part-upper-x', 85)
35: onParameter('part-upper-y', 30)
37: onParameter('part-upper-z', 0)
39: onParameter('notes', '')

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 7 of 11

TechrimStandards
Enthusiast
Enthusiast

@HughesTooling wrote:

What are you trying to do with the information? You could write a custom post processor or even add a function to an existing one to output the info to a text file.

Here's what I see using the Dump.cps post.

-1: onOpen()
0: onParameter('product-id', 'fusion360')
1: onParameter('generated-by', 'Fusion 360 CAM 2.0.5688')
2: onParameter('generated-at', 'Saturday, May 18, 2019 1:00:00 PM')
3: onParameter('hostname', '')
4: onParameter('username', '')
5: onParameter('document-path', '')
6: onParameter('document-id', '53c5aef4-a3da-416f-ae77-9e541db0018a')
7: onParameter('model-version', 'ece9a0f6-6943-4346-a5d3-cddcdf64b241')
8: onParameter('leads-supported', 1)
9: onParameter('job-description', 'LableInserts')
10: onParameter('machine-id', '18')
11: onParameter('machine-config', '<?xml version="1.0" encoding="UTF-16" standalone="no" ?><machine xmlns="http://www.hsmworks.com/xml/2009/machine" version="1.0"><vendor>Autodesk</vendor><description>EzTrak</description><machining jet="no" milling="yes" turning="no" wire="no"/><tooling maximumToolDiameter="0mm" maximumToolLength="0mm" maximumToolWeight="0kg" numberOfTools="100" toolChanger="yes" toolPreload="yes"/><machiningTime ratio="1" toolChangeTime="15s"/><coolant options="FLOOD"/><home x="0mm" y="0mm" z="0mm"/><capabilities workOffsets="10"/><spindle axis="0 0 1"/><post><postProcessor>cloud://EZTrak GCodeRepeats.cps</postProcessor><setupSheet></setupSheet></post><simulation retractOnIndexing="yes" shortestAngularRotation="yes" wcs="0mm 0mm 0mm"/><multiAxis adjust="yes" angle="10deg" cone="3deg" linearizationTolerance="0.04mm" method="off" tolerance="0.04mm"/><axis id="X" link="table" range="0mm 0mm"/><axis id="Y" link="table" range="0mm 0mm"/><axis id="Z" link="table" range="0mm 0mm"/></machine>')
13: onParameter('stock', '((-85, -30, -16), (85, 30, 0))')
15: onParameter('stock-lower-x', -85)
17: onParameter('stock-lower-y', -30)
19: onParameter('stock-lower-z', -16.00000000000001)
21: onParameter('stock-upper-x', 85)
23: onParameter('stock-upper-y', 30)
25: onParameter('stock-upper-z', 0)
27: onParameter('part-lower-x', -85)
29: onParameter('part-lower-y', -30)
31: onParameter('part-lower-z', -16.00000000000001)
33: onParameter('part-upper-x', 85)
35: onParameter('part-upper-y', 30)
37: onParameter('part-upper-z', 0)
39: onParameter('notes', '')

 

Mark


Hey Mark,


Thank you for sharing this code and I appreciate your input. The project we have using 6-8 different stock sizes, all square. I would like to use a API feature to automatically setup my stock based on parameters given to it possibly from an ERP system or automated action. Currently we have 6-8 template files that we use with the stock modeled, and all the template setups/ toolpaths reference that stock model. It works well, but could be improved if we have have one template that automatically updates the stock. Not sure if this makes sense but feel free to ask questions.

0 Likes
Message 8 of 11

HughesTooling
Consultant
Consultant

@TechrimStandards  Sounds like you want to write the stock to the setup not read it? You might be able to model the stock in the design workspace using parameters and use From Solid in the CAM setup. Not sure if you can change parameters from the API. You'd have a lot of control this way as you could set an origin point as well as offsets from the stock edges etc.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 9 of 11

TechrimStandards
Enthusiast
Enthusiast

Hey Mark,

 

That is basically what I currently have going on I am just always looking to push the boundaries. I appreciate your input! 


@HughesTooling wrote:

@TechrimStandards  Sounds like you want to write the stock to the setup not read it? You might be able to model the stock in the design workspace using parameters and use From Solid in the CAM setup. Not sure if you can change parameters from the API. You'd have a lot of control this way as you could set an origin point as well as offsets from the stock edges etc.

 

Mark


 

Message 10 of 11

to3dornottobe
Advocate
Advocate

Currently building a plugin and debugging gave me this;

Name: surfaceZHigh, Expression: 10.30000000153319, Value: 1.0300000001533192
Name: surfaceZLow, Expression: 0.0, Value: 0.0
Name: surfaceXLow, Expression: 3., Value: 0.30000000000000004
Name: surfaceXHigh, Expression: 1413.10000000000309, Value: 141.3100000000003
Name: surfaceYLow, Expression: 3., Value: 0.30000000000000004
Name: surfaceYHigh, Expression: 2682.72744190954563, Value: 268.27274419095454
Name: stockZHigh, Expression: 10.30000000153319, Value: 1.0300000001533192
Name: stockZLow, Expression: 0.0, Value: 0.0
Name: stockXLow, Expression: 0.0, Value: 0.0
Name: stockXHigh, Expression: 1416.10000000000309, Value: 141.6100000000003
Name: stockYLow, Expression: 0.0, Value: 0.0
Name: stockYHigh, Expression: 2685.72744190954563, Value: 268.57274419095455

Message 11 of 11

to3dornottobe
Advocate
Advocate

And 

Name: job_stockOffsetSides, Expression: 3mm, Value: 0.30000000000000004
Name: job_stockOffsetTop, Expression: 0mm, Value: 0.0
Name: job_stockOffsetBottom, Expression: 0mm, Value: 0.0
Name: job_stockOffsetXBack, Expression: 0mm, Value: 0.0
Name: job_stockOffsetXFront, Expression: 0mm, Value: 0.0
Name: job_stockOffsetYBack, Expression: 0mm, Value: 0.0
Name: job_stockOffsetYFront, Expression: 0mm, Value: 0.0
Name: job_stockOffsetZBack, Expression: 0mm, Value: 0.0
Name: job_stockOffsetZFront, Expression: 0mm, Value: 0.0

0 Likes