Labelling slopes: Architects’ and Civil Engineers’ help requested!

Interesting topic,
I do a lot of slope analysis and design. \

I use the extensions: Gradient Tools (Tag lines, tag faces) and also Height Above Datum,
I use a lot of labels when designing but then ideally I would like to add gradient tags (labels) in Layout.
Not sure where that go to as a feature…

some of my wish list items for Gradient tools are:
Slopes to be shown as % as an option.
Update dynamically,

And I wish that I could add gradient labels to an edge or face, and then enter the desired gradient and have the edge adjust to match that gradient. (not easy…).

I wish there was someway to generate a slope at a particular gradient. I know there are some roof tools and there’s a driveway slope extension, but these havent worked well for me for more complex shapes.

I’m keen to hear how you guys approach a task such as forming slopes for batters, retaining walls, sloped gardens, etc.
For this we need to a 3d edge (or selection of edges) and use these to define a new 3d surface which has a horizontal offset of 5m, and a slope of 1:5 (or 20%).

Right now if i had to, i would create a 1:5 triangle (height 1m, width 5m) and use Upright Extrude along the edges. Then have to trim and adjust geometry afterwards to clean it up. It’s accurate until you try and do that around the inside of a curve, and then Offset tool fails.

I can’t handle gradients in fractions. I can only deal with percentages… My mind doesn’t cope well.

That’s why I can’t use gradient tools and that’s also why I can’t use a fabulous old plugin from Tak2hata:

It is capable of dynamically displaying vertex elevations and face slopes. It also can make a curver rise to a given height, while keeping it’s horizontal projection right. So the curve’s plan will be kept, unlike what happens when you raise a curve in Sketchup using the move tool on an end vertex.

This is exactly what you need if you can cope with the data being displayed. I cannot.

Also I’d rather have temporary tags on screen, and that’s where overlays would come in handy. I hope Steve can help there.

There is also this plugin that is similar and allows more complex operations. You might want to check on it:

nz_Gradients&Driveways | SketchUp Extension Warehouse

It seems interesting but it’s not as simple as what I need.

The plugin that I found to be closer to what I need is the one here.

Apart from these. I also use height tag from datum:

SketchUp Plugins | PluginStore | SketchUcation

and Fredo’s Curvishear to make curves raise constant and keep it’s horizontal projection (as you can do with draw slope normals, but without all the other bells and whistles):

[Plugin] FredoTools::CurviShear 1.5a - 25 Aug 11 (ramps) • sketchUcation • 1

That would be great.

Upright extruder is the way to go here.

For the rest of the road profile and layers I would use Profile Builder, a lot of modelling in intersections and curviloft for all transition surfaces.

Curviloft | SketchUcation

Profile Builder 3 – Lightspeed modeling of smart building materials (profilebuilder4sketchup.com)

Progress Update #2:

Both the percent slope on edge markers and the batch marking of selected edges and faces are coded and seem to be working. More testing needed.

Starting to think about how to do an Overlay to monitor and update markers continuously.

2 Likes

That’s amazing Steve! If you want a tester just say so! :slight_smile:

1 Like

I pondered how to easily get a face’s slope vector and came up with:

normal = face.normal
z_down = Z_AXIS.reverse
angle  = normal.angle_between(z_down)
n_part = 90.degrees / angle
z_part = 1.0 - n_part
slope  = Geom.linear_combination(n_part, normal, z_part, z_down)

Then I thought perhaps the vector coordinates may be in local coordinates for faces within nested contexts, unless the context is open for edit. This thought makes me think that an overlay displaying changing slope markers should probably only apply to the current active edit context.

EDIT: What is not shown in the snippet is that the face normal would be checked if perpendicular to the Z axis and if so then there is no slope.

1 Like

Gradient tools does Tag by Face.

I would prefer model axis rather than component axis to inidcate a slope.

I quite often change a component axis for sloping objects (such as a roof, driveway or retaining wall), because it’s easier to stretch them. However all slope markers for architecutre, engineering and construction are relative to “horizontal”.

Shop drawings may be different (eg Plane this piece of wood to 5 degrees bevel) ?

Town panning rules in my region are the annoying exception and have boundary setbacks / recession planes measured from a vertical plane rather than ground.

Thanks this is really helpful.

Iive tried most of telhe extensions but they are more time cobsuming.

I use Atl+G to tag gradients on edges, plus shortcuts for Show Hidden Edges…makes a very fluid workflow.

ive been designing a park this week, with ponds, boardwalks, retaining walls,etc. I’ve used Gradient tools 1000s of times.

I’m also working alongaide civil engineers who are modelling it using Autodesk Civil3d so im seeing how they apprpach the modelling process. (Its fast and accurate, but less flexible & intuitive).

Yes, of course. But when double-clicked into an edit context, the API methods return results in world (model) coordinates, which makes things work much easier.

When outside of a component that say has an embedded slope marker, changing it requires knowing it’s instance path and the composed transforms. Also, when you change that component, you change all instances at once. If there are multiple instances, and they have differing transforms and so real slopes, then they would need to be uniquified if the slope markers were embedded. This can be overly complex.

This is why I suggested that they only be dynamically displayed via an overlay for the current edit context.

1 Like

My SlopeMarkers extension already takes care of edges and faces that are nested inside groups or components, giving the slope as seen in the model coordinates regardless of what edit context is currently open. Also, it puts the markers into the model’s entities not the component instance to avoid exactly the issue you mention - each instance could be rotated differently! The downside is that you can therefore move the marker or the face without affecting the other - they are not really anchored together! It tags face and edge markers so it is easy to turn all of them on or off together.

I just discovered that if an instance has been non-uniformly scaled vs just rotated, the extension may not handle the calculation of the slope or the drawing of the marker correctly! I’ll need to fix this…

I’ve also got a next version beta that colors the markers if the slope exceeds a configured threshold such as 8% slope.

I don’t think it would be safe to implement a version that would actually redraw the slope markers based on detecting edit of the associated face or edge. That would require using Observers, and the API docs explicitly warn that deleting or adding geometry within an Observer callback can potentially cause SketchUp to crash! If anyone has ideas and/or experience working around this limitation, I’d be interested in learning about it.

But it should be possible to create an Overlay that would draw a colored polygon over a face whose slope exceeds a threshold, triggered by an Observer, because Overlays do not add or delete any geometry from the model, they just draw to the screen. There are several issues I’m thinking through and experimenting with for this idea:

  • I don’t think it would be a typical use-case to process every face in the model. Only certain ones are of interest for slope markers. For example, roofs, roads, terrain, etc. are of interest, but walls, tabletops, trees, etc. are not. So there needs to be an efficient way to designate the faces of interest for monitoring. Doing so one-by-one would be very tedious if the model has hundreds or thousands of faces to mark.
  • Some kinds of edits that modify a face unpredictably do or do not reuse the original face’s id. This leads to confusion about which part to track (this was the cause of the notorious problem of leader texts flying to infinity that was fixed a few SketchUp versions ago). I need to experiment to see if there is logic that can deal with this.
1 Like

The markers are not gluing components ?

1 Like

Hi Steve,

Thanks for your continued work on this and thanks Dan for your contribution which is always very knowledgeable.

The way it could be done, would be to select a component or group to check for slopes. Then the slope overlays, when active, would be monitored only on that group.

If new faces would be created inside the group, the plugin would check them.

That would indeed help on face markers.

On edge markers, as the marker is vertical, the text could be created as a face me component and that would help us read it from any position. The triangle should be kept fixed to the edge. So the mark component would need two separate sub entities: a group or geometry for the mark, and a face me component for the text.

Finally the triangles and arrows shouldn’t be composed of loose edges. As the edges have no associated faces, some plugins like Cleanup or Edge Tools 2 might auto erase them. If they are inside a locked group or have an associated face though, they are immune from disappearing from model.

No, they are not. It is not possible to glue to an Edge, only to a Face, Group, Component Instance, or Image. It didn’t seem worth the confusion that would result if markers on Faces glued, but ones on Edges of the same Face did not!

@JQL and I took this out to PM to work on it. I now have a beta of a major revision ready for wider testing. It adds quite a few features, including an overlay for SketchUp 2023. Please PM me if you would like to test it.

2 Likes

there is a plugin to do “colour by slope”

Chris Fulmer, Color By Slope and Color by Z.

Those plugins really paint faces with colors. Steve’s overlays, when active, allow us to see which faces go beyond a certain slope threshold that we define. These are better for analysing while keeping the object’s material.

1 Like

I am pleased to announce the publication of V2.0 of the Slope Marker extension on SketchUcation’s Plugin Store.

This version adds two major capabilities to V1.1:

  • It colors the markers based on how the slopes fall in ranges defined by a configurable minimum and a configurable maximum, permitting quick visual checking of whether slopes meet requirements.
  • It adds a completely new Overlay (SketchUp 2023 and later only) that provides live monitoring of the slopes of selected edges and faces in your model, coloring them with the same ranges as the Slope Marker and placing a text label on each. The Overlay observes changes in the edges and faces it is monitoring and immediately redraws the coloring and labels as you edit the model using other Tools.

Many thanks to @JQL for input, advice, and testing during development of this version.

9 Likes

It has become an incredibly useful extension and very intuitive to use! An essential tool in my collection from now on!

Incredible work and very fast paced by @slbaumgartner !

I can’t thank you enough for hearing my thoughs and I’m really glad to have contributed the very little I did!