save plugins Fusion 360

This commit is contained in:
2022-09-21 21:50:43 +02:00
commit 5a41c6454a
74 changed files with 1988 additions and 0 deletions

1
eyeCameraTest/.env Normal file
View File

@@ -0,0 +1 @@
PYTHONPATH=C:/Users/bartool/AppData/Local/Autodesk/webdeploy/production/9209df45963e1599ff476303834125d21fd43de4/Api/Python/packages

20
eyeCameraTest/.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,20 @@
{
"version": "0.2.0",
"configurations": [{
"name": "Python: Attach",
"type": "python",
"request": "attach",
"pathMappings": [{
"localRoot": "${workspaceRoot}",
"remoteRoot": "${workspaceRoot}"
}],
"osx": {
"filePath": "${file}"
},
"windows": {
"filePath": "${file}"
},
"port": 9000,
"host": "localhost"
}]
}

5
eyeCameraTest/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"python.autoComplete.extraPaths": ["C:/Users/bartool/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/Python/defs"],
"python.analysis.extraPaths": ["C:/Users/bartool/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/Python/defs"],
"python.pythonPath": "C:/Users/bartool/AppData/Local/Autodesk/webdeploy/production/9209df45963e1599ff476303834125d21fd43de4/Python/python.exe"
}

View File

@@ -0,0 +1,10 @@
{
"autodeskProduct": "Fusion360",
"type": "script",
"author": "",
"description": {
"": ""
},
"supportedOS": "windows|mac",
"editEnabled": true
}

View File

@@ -0,0 +1,27 @@
# Author-
# Description-
import adsk.core
import adsk.fusion
import adsk.cam
import traceback
def run(context):
try:
app = adsk.core.Application.get()
ui = app.userInterface
camera = app.activeViewport.camera
eye = camera.eye
target = camera.target
upvector = camera.upVector
baseExtent = camera.viewExtents
ui.messageBox('Eye: {0}, {1}, {2} \ntarget: {3}, {4}, {5} \nupvector: {6}, {7}, {8}, \nviewExtants: {9}'.format(
eye.x, eye.y, eye.z, target.x, target.y, target.z, upvector.x, upvector.y, upvector.z, baseExtent))
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))