[Plugin] FredoTools::ColorBySlope - v1.0a - 12 Sep 19

[Plugin] FredoTools::ColorBySlope - v1.0a - 12 Sep 19

Postby fredo6 » Thu Sep 12, 2019 8:10 pm



ColorBySlope is a standalone script which is part of FredoTools. It applies colors to a mesh of faces based on their slope.

The color scale is based on a list of slope angles given in degrees. Colors are uniform within each slope interval.

You can optionally add a legend and a 2D color map.

Color by Slope legend - color map.png





ColorBySlope is installed as part of FredoTools 3.5 and above.

See the main post for FredoTools for installation.

IMPORTANT: ColorBySlope is available for SU2017 and above only



No documentation, but you can have a look at Quick Start section and the Video below


  • SU Versions: SU2017 and above
  • Platforms: Windows and Mac
  • Languages: English, French
  • Menus: by default, ColorBySlope is installed in Tools > FredoTools. It also appears in the Contextual menu when you select a group or component.
  • Icon toolbar: Fredo6 Tools. There is only a single icon. By default, it is not shown. You need to go to the Default Parameters… dialog of FredoTools to enable the icon.
    ColorBySlope_32.png
  • The plugin is free, for private and commercial usage.




FredoTools::ColorBySlope Overview





First Launch
Faces are assumed to be enclosed at first level within a Group or a Component.

  1. Select one (or several) group or component containing a face mesh

    Fredo6_ColorBySlope - terrain.png

  2. Launch ColorBySlope (from the toolbar icon, menu, or FredoTools Quick launcher)

    ColorBySlope_32.png

  3. A dialog box will appear

Fredo6_ColorBySlope - dialog box - first.png


The list of angles is given in degrees, between 0 and 90, in any order, separated by space, semicolumn or comma. Angles are rounded to their integer value. This list of angles specifies the intervals for slope color mapping (one more than the number of values). Do not enter 0 or 90, which are implicit.
Ex: '10, 20, 50' with specify 4 intervals: <=10, >10 and <= 20, >20 and <= 50, >50.

For convenience, you can enter a single negative value, say '-10' to specify evenly spaced intervals, here equivalent to '10, 20, 30, 40, 50, 60, 70, 80'

The highest and lowest slope colors are the bounds of the color scale. The actual color for each intermediate interval is interpolated.

You can specify a Legend, which will appear as a FaceMe component next to the terrain. Optionally, you can assign the legend a background or no background.

You can specifiy a 2D color map, which will be put on top of terrain. One important parameter is the transparency given to the 2D color map.

When you have set your parameters, just click OK and the terrain will be colorized. Here is the result with the above parameters.

Fredo6_Color by Slope - result.png


Note 1: all parameters are remembered within the Sketchup session and across sessions.

Note 2: you can generate an image of the legend and 2D map by using my other plugin, FredoPortrait.


Fredo6_ColorBySlope - legend.png

Fredo6_ColorBySlope - 2D map.png


Modifying the slope color mapping or Restoring the initial state

You can reapply a slope color mapping to a group or component already processed. Just select the terrain group or component and launch ColorBySlope again.

Fredo6_ColorBySlope - dialog box - combo.png


You will notice an extra parameter at the top of the dialog box offering the option to
- Either process a color mapping with the modified parameters, or
- Restore the terrain to its original state. This works across Sketchup sessions.

If you choose restore, the slope colors will be removed, as well as the legend and 2D color map.

IMPORTANT: when you assign colors to terrains, be careful not to perform a 'Purge unused', as this may remove the original materials applied to the faces. Anyway, it is always advised to make the color mapping on a unique copie of the terrain to be on the safe side.




ColorBySlope 1.0b – 12 Sep 19: Initial public release in FredoTools 3.5a
1
Last edited by fredo6 on Wed Oct 16, 2019 10:54 pm, edited 2 times in total.
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: [Plugin] FredoTools::ColorBySlope - v1.0a - 12 Sep 19

Postby pilou » Fri Sep 13, 2019 10:00 am

Colorful plugin! :fro:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] FredoTools::ColorBySlope - v1.0a - 12 Sep 19

Postby pilou » Fri Sep 13, 2019 10:15 am

PS: Is it possible to add a randomise mode ?
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] FredoTools::ColorBySlope - v1.0a - 12 Sep 19

Postby Anton_S » Sat Sep 14, 2019 7:04 am

Fredo, that's very nice work you did there. Great job!
0

Anton_S 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: CHDEWTX, Google Bot and 10 guests

Visit our sponsors: