• Dummy Article For Plugin Page

SU Draw Parametric Shapes    v2.65

  • Overview
  • Quick Start
  • Documentation
  • Release Notes

This plugin enables Sketchup users to draw and subsequently edit a range of geometric 3D shapes by specifying in a dialogue box their size and (where relevant) the number of segments per 360 degrees to use when drawing circles, polygons, or helical shapes.

The latest version (2.5ff) creates each shape as a component definition rather than a group, and allows the user to place it at any pickable point, not just at the origin.

Version 2.6 preserves parameter order in Edit dialogue, thanks to Steve Baumgartner, who adapted parametric.rb to make this possible, by modifying the parameters to use an ordered array of key-value pairs.

And v2.65 removes duplicate entries from the context menu if you have two plugins using parametric.rb

The plugin installs a 3D Shapes (JWM) sub-menu in the standard Sketchup Draw menu, with a selection of shapes to choose from:

  • Box
  • Cylinder
  • Cone
  • Torus
  • Tube
  • Prism
  • Pyramid
  • Dome
  • Sphere
  • Helix
  • Helical Ramp
  • Helical Ramp with Sides

Note: this plugin also works in SU2015 32-bit and 64-bit Windows, and in SU 2015, 2016 and 2017, for both Mac and Windows, although the Compatibility text above right originally only showed versions 2013 and 2014

Install the plugin in the usual way (see notes at http://help.sketchup.com/en/article/38583 "Sketchup Knowledge Centre - Installing Ruby Plugins").

After installation, you should find a new Draw menu item 3D Shapes (JWM), with a sub-menu for each shape.

After drawing a shape, R-click on it and choose Edit [Shape name] from the context menu to edit any or all parameters.

If you are updating from an older version, restart SketchUp to see the latest one, two or three helical shapes in the menu, depending on which version you are upgrading from, and to use the updated parametric.rb plugin which preservers parameter order on Edits.

Draw Parametric Shapes v2.5

© Trimble Navigation Ltd Sketchup Team and John McClenahan 2014

Purpose

This plugin enables Sketchup users to draw and subsequently edit a range of geometric 3D shapes by specifying in a dialogue box their size and (where relevant) the number of segments per 360 degrees to use when drawing circles, polygons, or helical shapes.

It has been tested on Windows 7 Make and Pro, Windows 10 Pro, and Mac OS X from El Capitan to Mojave, and on Sketchup Make or Pro v8 (M2), 2013, 2014 and 2015 (64-bit), and on later SU versions up to 2019.

Language is English only.

The plugin installs a 3D Shapes (JWM) sub-menu in the standard Sketchup Draw menu, with a selection of shapes to choose from:

  • Box
  • Cylinder
  • Cone
  • Torus
  • Tube
  • Prism
  • Pyramid
  • Dome
  • Sphere
  • Helix
  • Helical Ramp
  • Helical Ramp with Sides

Edit the parameters to the desired size and (where relevant) number of segments or sides to use, and click [OK]. The shape is then drawn as a component, located at any pickable point chosen by the user.

The drawn shape can be undone in one operation using Ctrl+Z or Alt+Backspace keyboard shortcut, or using the Edit/Undo menu, or once undone, can be re-done by using the menu Edit/Redo/Shape Name, or Ctrl+Y immediately, before issuing any other command.

When any previously drawn Shape is selected, a right-click Context menu (Edit Shape Name) allows the user to change any of its defining parameters using a pop-up dialogue.

The plugin uses two other Ruby scripts – parametric.rb and mesh_additions.rb – which are included in the .rbz plugin file and automatically installed along with the shapes.rb file.

Additions to original v1

Additions extend the original v1 Trimble Sketchup Team plugin to provide:

  • Four additional shapes – Sphere, Helix, Helical Ramp, and Helical Ramp with Sides.

Additional options:

  • User selection of the number of segments to use when drawing shapes based on a circle, not just a fixed default (usually 24 in the original plugin).
  • Pyramid with any number of sides in its base polygon, not just a square base
  • Default sizes remembered from the previous use of that shape.
  • Initial default sizes on first use of a shape selected according to the model units and unit format, usually one unit for length, height, width, depth or radius (when units are feet, inches or metres) or 10 units (for millimetre and centimetre units).
  • Initial default number of segments to draw set at 16 for most shapes, and a matching 4 per 90 degrees for Dome or Sphere. It can be changed by the user (and will be remembered for the duration of the SketchUp session).
  • Helical Shapes can be drawn with positive or negative start and/or end heights: negative (start- end) height goes down.
  • Helical Shapes can be drawn with fractional values for Number of Rotations.
  • Helical Shapes can be drawn with option to start at specified angle from X-axis
  • A negative value for No of Rotations draws a left-handed helix or helical shape
  • Helical Ramp can have different widths at start and end, and start at optional angle from X-axis.
  • Helical Ramp with Sides, has additional option for angle of slope of sides from horizontal.

The appearance of Helical Ramp with Sides can be altered by R-click, Smooth/Soften Edges, and adjusting the smooth parameters. The default softens the top edges and joins between faces.

NOTE: To make a permanent change to the initial default number of segments, edit the jwm_shapes.rb file default_parameters method for each shape Class, and change the line @@segments = 16 to your desired default.

For support, email john.mcclenahan@gmail.com

v2.0 added Sphere (adapted from Dome) shape to the original v1.x SU Team plugin, and added Helix (adapted from draw_helix.rb). Added user-selectable number of segments for circle- and helix-based shapes. Also included negative pitch to draw helix downwards, and fractional and negative rotations to draw part-helix and left hand helix respectively.

v2.1 added new shape Helix Ramp, with variable start and end widths as well as pitch and rotations as for Helix.

v2.2 added HelicalRampWithSides class, with angle of slope of sides from horizontal as a parameter

v2.2.1 added starting height parameter for helical ramp with sides

v2.2.2 changed to specifying start and end heights, not pitch, for Helical Ramp with Sides, and calculating pitch from those

v2.2.3 Bug fixes - a validation rule for Helix was wrongly specified (number of rotations must allow at least one segment to be drawn); a validation rule for Helical Ramp required only 2 segments per rotation: changed to 3

v2.2.4 Changed Helical Ramp to ask for start and end heights instead of start height and pitch

v2.2.5 Changed Helix to ask for start and end heights instead of start height and pitch

v2.2.6 Fixed bug in all helical shapes where negative (end - start) height and negative rotations drew 'height' upside down.

v2.2.7 Changed module (namespace) name from CommunityExtensions to JWM to avoid potential clash with SketchUp Extension Warehouse version

v2.2.8 2014-11-21 Changed name of plugin from shapes.rb to jwm_shapes.rb since there was still a name conflict with the Extension Warehouse version of the plugin, and also changed module name from JWM::Shapes to JWM::JWMShapes. Changed Draw menu to read 3D Shapes (JWM) again to avoid confusion with Sketchup/Trimble version

v2.2.9 2014-11-22 Added missing validation for minimum number of segments for Tube, Torus and Pyramid

v2.5 2014-11-22 Converted the plugin to draw each shape as Component Definition (not a Group), and allow the user to place the shape at any pickable point, not just at the world origin. Based on Jim Foltz's adaptation of the code for a staircase stringer posted in the Plugins forum thread for this plugin.

v2.51 2014-12-01 Corrected version number in jwmshapes loader and jwmshapes.rb files to match published version number

v2.5.2 2014-12-01 Fixed typo in parametric.rb which gave error on loading

v2.5.3 2014-12-03 Fixed incorrect naming of modules which resulted in Torus, Dome and Sphere not working because they couldn't find the mesh_additions.rb modules.

v2.6 2019-03-23 Grateful thanks to Steve Baumgartner for updating parametric.rb and adding a def keys function to the shapes plugin, to preserve order of parameters on Edit