Rhino 8 Feature: GH1 Is Now More Than Just Geometry!

As far as attributes are concerned, it seems like I can only query attribute keys with the ‘Field expression’ component paired with the ‘Evaluate text fields’ component (see top)

If I do the same with the Elefront component ‘Get User Value’ (see bottom), you can see it takes no additional computation time. I really do hope a faster native attribute workflow will be considered or is already in the works.

If you’re looking to extract the User Text keys or values from geometry, then I would recommend using the User Text component (Rhino → Content). Simply connect the object which contains some user text to the Content input and then the output will contain the keys and values of that object. If the value contains a formula (ie. expression) then you could use the Evaluate Text Fields component to parse the formula and return the numeric value.

I actually forgot about this component, for multiple attributes, it gets the job done with one more component than Elefront.

That’s handy. I never honestly tried that component :smile:

I put my Please! Please! In for this to. This would be the most amazing thing ever!

Ah. Ok. I guess I didn’t understand that you were trying to get a specific user key/value. Your solution is completely valid (and fairly concise). We did add some additional components for filtering/grouping data based on a user text key, but that solution is likely the same amount of components as what you showed in your example. Still, you might find this post useful for future reference.

Every WIP update I’m checking if Leaders can be modified. After a few months, I need to ask: should they work already? I’m kinda excited about Grasshopper annotation possibilities.

Leader is not outputting curve, can’t modify existing Leader only bake a new one

What happens if you use the new “Explode Objects” component. This was recently added and should work on leaders, dimensions, text, blocks, curves, breps, meshes, etc… It should return the same results as the “Explode” command in Rhino. Does this give you the curves you’re looking for?

I only get geometries if I reference the leader from the query, not when I directly point to the leader.

@Czaja I believe this is because you have no leader feeding into the leader component.

To be able to get the items from it you need to have a leader feeding into the Leader input, otherwise it will return empty values.

@AndyPayne Right Click “Set One Leader” works on my end, doesn’t mean that’s the case for them.

Actually, I think @Czaja is correct. There may be a bug here. I believe he’s right-clicked on the Leader input and selected “Set One Leader” and referenced the leader that way. I’m checking on this.

Yes, that’s what I did. I can extract parameter out of the Leader input but surprisingly Leader primitive component cant be found in the top bar or found using search.

Yes. That’s correct. We have hidden some of the new data type parameters only because there are so many of them. We may revisit that idea in the future… and as you pointed out, you can always get to them by using the “Extract Parameter” button.

Haha, maybe you will need a “show really obscure components” tick-box in preferences :sweat_smile:

Is it possible to scale the radial dimension based on the active viewport extents?

I don’t see a way to know which viewport is active. In this case, I have two top views, because I do all my work inside a single viewport. The viewport may even change to 3D later, so using name as input is bound to break.

I am working on a live curve fillet, for which I want to see the fillet dimensions in the viewport. Considering this is an urban layout, I have to zoom in quite a lot to see the dimensions, whereas larger dimensions would obscure the view when zoomed in. These are just for modeling aids that need to be scaled relative to have a fixed size regardless of the zoom level.

What would currently be the recommended method for doing this?

@Intuos probably there is a system exposed parameter that does this but in case not here’s a (probably stupid) possible solution:

Scaling the Text Size by Camera Distance:

import rhinoscriptsyntax as rs

# Get the camera location of the perspective view
camera_location = rs.ViewCamera()

# Calculate the distance between the camera and the object
distance = rs.Distance(camera_location, CP)

# Output the distance
TextSize = round(distance *.01,3)

ghenv.Component.Message = "Distance: " + str(distance) + "\nText Size: " + str(TextSize)

This is just an example and production wise would be a baking/performance nightmare.

I need to hunt for the actual method that could write dynamic text size automatically.

Then we just would apply that method to the output of the dimension component I believe.

Dynamically overriding this property I believe would do the trick.

image

I think the python could respond to an event handler and when the camera changes or mouse zooms the model space scale could change accordingly.

A really silly way would be to ignore the camera position all together and just increment the mouse scroll wheel or exploit the zoom function. zoom out + text size, zoom in -text size

image

Actually, I could just grab the first viewport and use the Y extents to set a value:

It’s rather rough but gets the job done. Expression isn’t all that correct, but I don’t have time to improve it now before posting.

Nice I forgot about the View nodes in R8!

It wasn’t immediately obvious to me that the component also worked on orthographic views. :sweat_smile:
Overall, I am really impressed by the radial dimension + viewport component. :+1::clap: