Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home View #6

Open
vondeliusc opened this issue Oct 28, 2021 · 3 comments
Open

Home View #6

vondeliusc opened this issue Oct 28, 2021 · 3 comments

Comments

@vondeliusc
Copy link

vondeliusc commented Oct 28, 2021

Thomas-
first let me say how AWESOME this is; as a SolidWorks user, I have a few shortcuts which to me are invaluable, but not available in F360. I use E, R, T for View.front, View.right, and View.top; N for View.lookat, W for Zoom.window, and F for Zoom.fit
I have been unsuccessful at creating I (i) for View.isometric (view.home). I have tried Named Views, but no luck using the viewcube or any menu items. Any thoughts?
Thank you,
-Christian

@Zxynine
Copy link

Zxynine commented Dec 22, 2021

Hey, That seems to be two separate commands which cannot be chained using anyshortcut. I am working on a macro creation tool which could help so keep a lookout. But for your problem, you need a couple seperate shortcuts. The home view is composed of multiple transitions like going to the view titled 'IsoTopRightViewOrientation' (in fusions view orientations not anyshortcut). There is also using the fitview and origin point while setting the camera in the api. The choice is to either manually interpolate the rotation and position of the camera towards a known home, or you string together the multiple camera settings to make an animation (of sorts).

    des:adsk.fusion.Design= app_.activeProduct
    root = des.rootComponent
    origin = root.originConstructionPoint.geometry
    
    camera_copy:adsk.core.Camera = app_.activeViewport.camera
    camera_copy.isFitView = True
    camera_copy.isSmoothTransition = True
    app_.activeViewport.camera = camera_copy
    
    camera_copy:adsk.core.Camera = app_.activeViewport.camera
    camera_copy.target = origin
    camera_copy.viewOrientation = adsk.core.ViewOrientations.IsoTopRightViewOrientation
    camera_copy.isSmoothTransition = True
    app_.activeViewport.camera = camera_copy

That is the code for going home (or at least as close to it as i could get) in python

@Zxynine
Copy link

Zxynine commented Dec 22, 2021

I submitted a pull request that includes the 4 Iso view corners in thomas' add-in, this in combination with the "fit" command (f6) should give you some close functionality without knowing how to code.

@vondeliusc
Copy link
Author

Thank you for your response. I will study it and do some experiments.
-Christian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants