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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(extra): Add the correct docstrings for set view #371

Merged
merged 1 commit into from Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file modified ladybug_grasshopper/icon/LB Set View.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions ladybug_grasshopper/json/LB_Set_View.json
@@ -1,5 +1,5 @@
{
"version": "1.7.0",
"version": "1.7.1",
"nickname": "SetView",
"outputs": [
[]
Expand All @@ -8,21 +8,21 @@
{
"access": "item",
"name": "_direction",
"description": "A sun vector from which the the Rhino view will be generated.\nUse the \"LB SunPath\" component to generate sun vectors.",
"description": "A vector for the direction that the viewport camera faces.",
"type": "Vector3d",
"default": null
},
{
"access": "item",
"name": "_position_",
"description": "The target point of the camera for the Rhino view that will be\ngenerated. This point should be close to the Rhino geometry that\nyou are interested in viewing from the sun. If no point is provided,\nthe Rhino origin will be used (0, 0, 0).",
"description": "A point for the position of the vieport camera in 3D space.\nIf no point is provided, the Rhino origin will be used (0, 0, 0).",
"type": "Point3d",
"default": null
},
{
"access": "item",
"name": "look_around_",
"description": "An optional interger for the width (in pixels) of the Rhino\nviewport that will be generated.",
"description": "Optional 2D point (aka. UV coordinates) to tilt the viewport\ncamera off from from the input _direction. Values for UV\ncoordinates must be between 0 and 1 and these correspond to a\ntilt of 90 degrees in either direction (with 0.5, 0.5 being\ncentered on the _direction). Inputting a native Grasshopper\nSlider MD component will allow the most control of view offsetting.",
"type": "Point3d",
"default": null
},
Expand All @@ -43,14 +43,14 @@
{
"access": "item",
"name": "lens_len_",
"description": "An optional interger for the height (in pixels) of the Rhino\nviewport that will be generated.",
"description": "An optional number that sets the lens length of the viewport\ncamera in mm. Typical values are around 20-50mm but wider angle\nviews can be achieved by lowering this number to 10 or less.\nIf unspecified, the lens length of the currently active Rhino\nviewport will be used.",
"type": "double",
"default": null
},
{
"access": "item",
"name": "mode_",
"description": "An optional text input for the display mode of the Rhino viewport\nthat will be generated. For example: Wireframe, Shaded, Rendered, etc.",
"description": "An optional text input for the display mode of the Rhino viewport\nthat will be generated. For example: Wireframe, Shaded, Rendered, etc.\nIf unspecified, the mode of the currenlty active Rhino viewport\nwill be used",
"type": "string",
"default": null
}
Expand Down
24 changes: 17 additions & 7 deletions ladybug_grasshopper/src/LB Set View.py
Expand Up @@ -15,26 +15,36 @@
-

Args:
_vector: A sun vector from which the the Rhino view will be generated.
Use the "LB SunPath" component to generate sun vectors.
_center_pt_: The target point of the camera for the Rhino view that will be
generated. This point should be close to the Rhino geometry that
you are interested in viewing from the sun. If no point is provided,
the Rhino origin will be used (0, 0, 0).
_direction: A vector for the direction that the viewport camera faces.
_position_: A point for the position of the vieport camera in 3D space.
If no point is provided, the Rhino origin will be used (0, 0, 0).
look_around_: Optional 2D point (aka. UV coordinates) to tilt the viewport
camera off from from the input _direction. Values for UV
coordinates must be between 0 and 1 and these correspond to a
tilt of 90 degrees in either direction (with 0.5, 0.5 being
centered on the _direction). Inputting a native Grasshopper
Slider MD component will allow the most control of view offsetting.
width_: An optional interger for the width (in pixels) of the Rhino
viewport that will be generated.
height_: An optional interger for the height (in pixels) of the Rhino
viewport that will be generated.
lens_len_: An optional number that sets the lens length of the viewport
camera in mm. Typical values are around 20-50mm but wider angle
views can be achieved by lowering this number to 10 or less.
If unspecified, the lens length of the currently active Rhino
viewport will be used.
mode_: An optional text input for the display mode of the Rhino viewport
that will be generated. For example: Wireframe, Shaded, Rendered, etc.
If unspecified, the mode of the currenlty active Rhino viewport
will be used

Returns:
report: The name of the viewport that was opened.
"""

ghenv.Component.Name = 'LB Set View'
ghenv.Component.NickName = 'SetView'
ghenv.Component.Message = '1.7.0'
ghenv.Component.Message = '1.7.1'
ghenv.Component.Category = 'Ladybug'
ghenv.Component.SubCategory = '4 :: Extra'
ghenv.Component.AdditionalHelpFromDocStrings = '2'
Expand Down
Binary file modified ladybug_grasshopper/user_objects/LB Set View.ghuser
Binary file not shown.