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

Add view capturing capability #230

Merged

Conversation

IsakNaslundBh
Copy link
Contributor

@IsakNaslundBh IsakNaslundBh commented Sep 20, 2022

Issues addressed by this PR

Closes #224

Add capability to capture rhino view.

  • Method for capturing currently active view
  • Method for capturing all named views

Note that this requires an uptick in the nugets to Rhino 6, as the ViewCapture class used is internal in rhino 5. There are ways around this for rhino 5 as well, but from testing them, they perform significantly worse and does not give the same level of control.

Before this PR is merged an agreement that this uptick is ok, as it means no more support for rhino 5 (as in, might still work, but can not be as relied upon any longer). @al-fisher @FraserGreenroyd , have discussed this with you before raising this, but noting you in here as well.

Test files

Changelog

Additional comments

@IsakNaslundBh IsakNaslundBh added the type:feature New capability or enhancement label Sep 20, 2022
@IsakNaslundBh IsakNaslundBh self-assigned this Sep 20, 2022
Copy link
Contributor

@michaelhoehn michaelhoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice and easy to use! It took a minute to understand the distinction between a DimensionView and a ScaleView since this functionality is unified in a standard Rhino command line prompt, but I think I'm good with the approach generally. I did notice however that there are some performance quirks when using one or the other when exporting a sample image 5000x5000 (likely larger than standard outputs, but I noticed similar behaviors with anything over 3K).
image
This is entirely not in our perview as I see it, but good to simply document here it seems capture methodology could have varying nuances between the different types (dimensioned on the left, and scaled on the right).

I'm happy to provide an approving review when needed, but as noted in the PR and in my comments, we need to discuss our decision to leave Rhino 5 behind in support of these newer features.

Rhinoceros_Engine/packages.config Show resolved Hide resolved
@IsakNaslundBh IsakNaslundBh changed the base branch from main to develop January 3, 2023 09:17
@michaelhoehn michaelhoehn mentioned this pull request Jan 3, 2023
@michaelhoehn michaelhoehn force-pushed the Rhinoceros_Toolkit-#224-ViewCaptureCapability branch from f375759 to fd2ee7c Compare January 3, 2023 15:44
michaelhoehn
michaelhoehn previously approved these changes Jan 3, 2023
Copy link
Contributor

@michaelhoehn michaelhoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very happy with this implementation!

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

There are 27 requests in the queue ahead of you.

@michaelhoehn michaelhoehn force-pushed the Rhinoceros_Toolkit-#224-ViewCaptureCapability branch from fd2ee7c to 928d573 Compare January 4, 2023 17:08
@michaelhoehn
Copy link
Contributor

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@michaelhoehn to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@michaelhoehn fix requested for copyright headers.

The errors with the copyright headers on the CS (.cs) files have been recorded as annotations on the checks tab.

I will apply the fixes to every case detailed on the checks tab. If you want to perform the fixes in a different manner please resolve this manually and rerun the check.

Each CS (.cs) file that does not have the current copyright header will have it applied. The current copyright header can be examined here.

If you are happy for me to go ahead and perform this action, please reply with:

@BHoMBot fix copyright headers ref. 10441140689

@michaelhoehn
Copy link
Contributor

@BHoMBot fix copyright headers ref. 10441140689

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@michaelhoehn I have queued up your request to fix copyright headers. There are 0 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@michaelhoehn I'm sorry, but I cannot take that instruction from you. As this action would modify this Pull Request, this instruction can only come via an authorised user, per our Code of Conduct for Bots

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@michaelhoehn fix requested for project compliance.

The errors with the CSProject (.csproj) files have been recorded as annotations on the checks tab.

I will apply the fixes to every case detailed on the checks tab with the exception of any references to the target framework. I am unable to provide fixes to the Target Framework automatically, these will need to be performed manually. If you want to perform the fixes in a different manner please resolve this manually and rerun the check.

If you are happy for me to go ahead and perform this action, please reply with:

@BHoMBot fix project file ref. 10441133049

@FraserGreenroyd
Copy link
Contributor

@BHoMBot fix copyright headers ref. 10441140689

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@FraserGreenroyd I have queued up your request to fix copyright headers. There are 0 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@FraserGreenroyd I am now going to fix the copyright compliance in accordance with the annotations previously made.

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@FraserGreenroyd to confirm I have now resolved the copyright compliance and pushed a commit to this Pull Request.

Rhinoceros_Engine/Compute/CaptureNamedViews.cs Outdated Show resolved Hide resolved
Rhinoceros_Engine/Compute/CaptureView.cs Outdated Show resolved Hide resolved
Rhinoceros_oM/Properties/AssemblyInfo.cs Outdated Show resolved Hide resolved
Rhinoceros_oM/Properties/AssemblyInfo.cs Outdated Show resolved Hide resolved
Rhinoceros_oM/Properties/AssemblyInfo.cs Outdated Show resolved Hide resolved
Rhinoceros_oM/ViewCapture/DimensionViewCaptureSettings.cs Outdated Show resolved Hide resolved
Rhinoceros_oM/ViewCapture/IViewCaptureSettings.cs Outdated Show resolved Hide resolved
Rhinoceros_oM/ViewCapture/ScaleViewCaptureSettings.cs Outdated Show resolved Hide resolved
Co-authored-by: Fraser Greenroyd <[email protected]>
@michaelhoehn
Copy link
Contributor

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 4, 2023

@michaelhoehn to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

Co-authored-by: Fraser Greenroyd <[email protected]>
@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 5, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check null-handling

There are 1 requests in the queue ahead of you.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 5, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check null-handling

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 5, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check core
@BHoMBot check serialisation
@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 5, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check core
  • check serialisation
  • check versioning

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 5, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check versioning

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 6, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check versioning

There are 18 requests in the queue ahead of you.

@FraserGreenroyd
Copy link
Contributor

I think I've figured out why versioning is failing - installer would too if we ran it - LadybugTools_Toolkit has a dependency on this toolkit, I think this PR is breaking LadybugTools_Toolkit's ability to compile, thus resulting in versioning issues when the methods/objects don't exist.

I will take another look when back on the laptop to see if I can compile LadybugTools_Toolkit against this branch and if not, work out what the rectification might need to be early in the week with @tg359

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 9, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check versioning

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 9, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 9, 2023

@IsakNaslundBh just to let you know, I have provided a check-installer result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on LadybugTools_Toolkit

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 9, 2023

@IsakNaslundBh just to let you know, I have provided a check-installer result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on Grasshopper_UI

Copy link
Contributor

@FraserGreenroyd FraserGreenroyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that checks are passing, approving based on previous reviews.

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 9, 2023

FAO: @FraserGreenroyd
@FraserGreenroyd is seeking dispensation on this Pull Request to skip a required check. Please can you provide authorisation for the check to be skipped, or provide assistance as appropriate.

The check they wish to have dispensation on is null-handling.

If you are providing dispensation on this occasion, please reply with:

@BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. 10455686053

@FraserGreenroyd
Copy link
Contributor

@BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. 10455686053

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 9, 2023

@FraserGreenroyd I have now provided a passing check on reference 10455686053 as requested.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 9, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check ready-to-merge

@FraserGreenroyd FraserGreenroyd merged commit 31ef701 into develop Jan 9, 2023
@FraserGreenroyd FraserGreenroyd deleted the Rhinoceros_Toolkit-#224-ViewCaptureCapability branch January 9, 2023 11:22
@bhombot-ci bhombot-ci bot mentioned this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ViewCapture Method
3 participants