@john_mcclenahan wrote:
After a concentrated 3 week effort, Steve Baumgartner (@slbaumgartner) a has coded a prototype Slope Marker tool, as first discussed in June 2017, and later followed up in a more recent topic
Here’s the RBZ file:
SLB_JWM_Slope_markers.rbz (125.5 KB)Please try it out and give us feedback (positive or negative, with or without Feature Requests).
Does anything not work as you expected? Are there forms of slope marker symbol you would like to use that aren’t included?
Planned enhancements for later versions include:
- Saving user-selected parameters as future defaults for subsequent SU sessions (they are saved now only for a single user session).
- Translation of the Input dialogue into other languages; and possibly also the User feedback messages and help/documentation, with a menu link to select language, and display the documentation as an HTML page.
- A user-input Note added to the slope marker.
Steve wants to take the time to clean up the code before formal publication on SketchUcation, as there are duplications and inelegancies in the code, to get the prototype working quickly.
So please don’t criticise the coding style just yet!
It has been tested so far only on Mac Mojave and SU 2019, but it should work the same on older versions of OS X and on Windows 7 or 10, and on versions of SU at least as far back as 2017, and perhaps earlier. When I return from a two week trip away from home, returning on 1 May, I’ll try it out on as many older versions of SU as I can, on both Mac and Windows.
If slope markers are your thing, try it out!
And here’s our first attempt at documentation.
Purpose
A Slope Marker is a symbol or text annotation indicating the rise and run or slope of an edge or face.This plugin enables you to place slope markers with a single click on edges or faces, in a range of styles.
Introduction
The Configure dialogue allows the user to choose a style in which to mark the slope, using a range of symbols in use throughout the world; or only using text (for edges).
Slope Markers can display the slope as a Ratio, Fraction, Percentage or in Degrees .
Edge markers are placed in a vertical plane containing the picked edge, centred above the user’s pick point on the edge, and displaced from it by a user-selected Offset Fraction of the Marker Length.
Examples:
- In Architectural units, with a run denominator of 12
- In metric units with a run denominator of 100
Face markers are placed parallel to and on the picked face, centred on the user’s pick point on the face, and pointing down the steepest slope ‘as the water runs’ if it were a roof or floor face.
- In Architectural units, with a run denominator of 12
- in Metric units with a run denominator of 100
When picking a location to place a slope marker, make sure to wait a moment and verify that you see a “On Face”, “On Edge”, or “On Midpoint” tooltip before clicking. Due to limitations of the Ruby API, the extension cannot determine the correct point in space to place the marker when the tooltip is any variation of “From…”. In such cases, the extension will prompt the user to try clicking on another location.
Layers
Edge markers are placed on a layer named Scene name edge slopes .Face markers are placed on a layer named Scene name face slopes .
Level markers on an edge are placed on a layer named Scene name level edge slopes .
Level markers on a face are placed on a layer named Scene name level face slopes .
If the layer does not exist, it is created.
All Slope Marker layers are suppressed by default in all other scenes.
If there are no scenes present in the model at the time slope markers are placed, the Scene name part of the layer name shows No scene .
Normally, one would expect to turn on Edge Marker layers in one or more Elevation view scenes, and Face Marker layers in one or more Plan view scenes.
But either or both can be used in perspective or iso view scenes as well.
Marker text
Edge Marker Text is offset by a small amount from any vertical face including the edge, to prevent Z-fighting between the text fill and the face.Face Marker Text is similarly offset from the face by a small amount to prevent Z-fighting between the text fill and the marked face.
The text is oriented to appear as nearly as possible the right way up and readable left to right in the view in which it is placed. To ensure consistency of marker text placement, establish a scene or scenes in which to place the text without changing the view.
You can mark a level edge or face, which will show a zero slope.
You cannot mark near-vertical edges or faces with a slope mark.
User-definable parameters
Permanent default values can be changed only by editing the code, but user settings are remembered for an entire SU session.
Run Denominator
The base run for a displayed ratio or fractional marker slope value in the form rise:run or rise/run .
Defaults
When the model units are Architectural or Fractional Inch, slopes are shown relative to a run denominator of 12.
When the model units are Metric, slopes are shown relative to a run denominator of 100.
User settable to any positive integer value.
Marker Length
Specify the overall size of the slope marker.
Default :
- 1’ or 12" in Architectural or Fractional Inch units, respectively.
- 300mm, 30cm, or 0.3m in Metric units.
User settable to any valid SU length, in any valid SU unit (model units are used if no unit is specified).
[NOTE: The default settings for both Run Denominator and Marker Length in the Configure dialogue are reset to default values in response to a user change of Units via Model Info/Units settings.]
[WARNING: SU BUG - in versions earlier than SU 2019, input values expressed in feet and/or inches and fractions, when the model units are metric, will usually be interpreted wrongly . AVOID!]
For further information about this bug, and the ways in which it can produce wrong metric conversions without warning, see
SU doesn’t recognise fractional inches (e.g., 1/2") as an imperial measurement when units are mm SketchUp
I thought that SU would recognise imperial units (feet, inches and fractions) in the Measurements box, even if model units were set to mm. It doesn’t recognise fractional inches. And no, I’m not using curly quotes. Drawing in mm with two decimal places, I tried to push-pull 1/2" (where I type in the 1/2" characters. I get 0.5mm instead. if I type in 0.5", I get what I expect - half an inch or 12.7mm. This seems to me like a bug, or at least behaviour I don’t expect. It seems also to be true…
Offset Scale
Change the offset of an edge marker from the edge, as a fraction of the Marker Length.
Ignored for face markers.
Default: 0.1.
User settable to any valid Float value. To keep the text visually ‘connected’ to the edge, values less than 1.0 are recommended, but not required.
[NOTE: Negative values will offset the centre of the base of the marker below the selected edge.]
Text Scale
Set the height of the text as a fraction of the marker length. Overly large values may overspill the marker, unless it is an edge mark text only value. It may need to be relatively smaller in metric units, which typically have more digits to display.
Default: 0.15.
User settable to any valid positive non-zero Float value. 0.1-1.0 recommended but not required. Negative or zero values will be rejected with an error message to the user.
Edge Marker Style
Choose from Triangle, Rise and Run Lines, Text only . See images above for examples
Default: Triangle (a common US convention).
Face Marker Style
Choose from Equilateral Triangle, Long Arrow, Short Arrow, Upright Triangle, Upright Rise and Run Lines. See images above for examples.
Default: Equilateral Triangle.
The point of the triangle, or of an arrow, points down the steepest slope ‘the way the water runs’ on a roof or floor. The Rise line for an Upright style is on the ‘down’ side of the slope.
The Upright styles will only be visible as a line in Plan views, but may be useful in elevations, iso or perspective views.
Text Label Format
Ratio, Fraction, Percent (%) or Degrees (°).
Default: Ratio.
Triangle or Rise and Run Lines marker styles (whether on edge or face) show the run denominator above the horizontal line in the marker symbol, and the rise beside the vertical rise line. If the slope is horizontal there is no line for the rise, but the text will show a 0 for the rise value, beside the end of the horizontal marker line.
All other slope symbols, and text-only markers, can use any style of Text Label.
A note on display precision
Where the text label value is not exact to the Precision specified in Model Info/Units when the units are Decimal, or an exact fraction to the specified fractional Precision in Architectural or Fractional Inch units, the label will be preceded in the usual SU fashion by a tilde character ( ~ ) to indicate that the value is approximate.
Numbers in the rise part of the Text `marker Label, or percentages , will be displayed to the Precision specified in Model Info/Units for decimal numbers, and either as a fraction or to one decimal digit in Fractional units where the precision is 1/2, 1/4 or 1/8; or to two digits if the precision is 1/16, 1/32 or 1/64.
If Precision is set to 0 (no decimal places or fractions) text labels will be displayed to the nearest integer, with a tilde ( ~ ) if that is not exact.
If the Text Label Format is set to Degrees ( ° ), the value will be displayed to the Precision set for angles in Model Info/Units.
Posts: 4
Participants: 3