Share your favourite scripts, macros and plug-ins

I think that it would be useful for all Rhino users to share their favourite scripts, macros and plug-ins.

Below are the scripts and plug-ins I use most often. For a detailed information you could simply search the forum to find the topics where those scripts were originally posted by their respective authors. :slight_smile:

Mirror CPlane:
Mirror CPlane.py (418 Bytes)

Add bolt:
addBolt_v0.8.py (18.8 KB)

Boltgen:
BoltGen_py.rhi (1022.8 KB)

Angle between curves:
CurveAngle.py (1.5 KB)
DimCurveAngle.py (2.2 KB)

Fillet curve with preview:
FilletCurves.rhp (21.5 KB)

Pipe straightener:
PipeStraightener.py (3.1 KB)

Extract centerline of pipes:
ExtractCenterline.py (6.5 KB)

Select by object color:
SelByObjectColor.py (462 Bytes)

Select objects by volume:
SelSrfsByVol.py (3.0 KB)

Find objects with similar volume:
FindSimilarVolumes.py (3.8 KB)

Find perpendicular from point:
PerpsFromPt.py (562 Bytes)

ProjectObjects:
ProjectObjects.rhp (20.5 KB)

Remap plus:
RemapPlus.py (845 Bytes)

Highlight layers:
HighlightLayers.py (683 Bytes)

Move to tangent:
MoveToTangent.py (2.5 KB)

Arc line between curves:
spb_Crv_createArcLineArcBlend.py (7.6 KB)

Cycle display modes:
SetCycleModes.py (2.4 KB)
CycleDisplayModes.py (1.4 KB)

Dolly zoom slider:
slider.py (4.0 KB)

Revolve last axis:
RevolveSG.rhp (41 KB)
revolve_sg_fullcircle.py (896 Bytes)

Peter’s tools:
peterstoolsv221.zip (428.3 KB)

Select arcs and circles:
SelArc.py (466 Bytes)
SelCircle.py (474 Bytes)
SelByRadius.py (2.8 KB)
SelSameRadArcsCircles.py (3.0 KB)

Export selected with object’s name as DXF:
BatchExportDXFByObjName.py (1.9 KB)

Select by same name:
SelSameName.py (688 Bytes)

Closest points between objects:
ClosestPt2Objects.py (3.7 KB)

Unroll multiple surface with offset space between:
MultiUnroll.py (7.4 KB)

Flow along multiple surfaces:
Flow along multiple surfaces.py (475 Bytes)

Circle - tangent, tangent, center along curve:
CircFromTwoTanCrvsAndCentCrv2.py (2.4 KB)

Fillet surface corner:
FIlletSrfCorner.py (9.0 KB)

Straighten view:
ViewSetter.py (2.0 KB)

Toggle selection highlight (extremely useful for working with 3d scan data, because this will hide the yellow selection mesh):
ToggleSelectionHighlight.rvb (1.6 KB)

Circle on a surface normal
circOnSrfNormal.py (1.1 KB)

Select point pattern:
SelPointPattern.rhp (17 KB)
@Pascal accidentally set “SelPtPatterM” command for this plug-in, so make sure to add this command with “m” instead of “n” until it’s fixed. :slight_smile:

Select curves on active CPlane:
SelectCurvesOnActiveCPlane.py (549 Bytes)

PlanarizeSurfacePoints:
PlanarizeSurfacePoints.py (18.8 KB)

Fin extrusion (does not work on closed loops, must split them first):
FinTools.rhp (64.5 KB)

Editable curve on surface:
rhino6curveonsurface.rhp (166 KB)
! _CurveOnSurface
! _CurveOnSurfacePtOn


To use a script, you have to do the following steps:

  1. Save the script in some folder where you will keep it forever. Note that if you move or delete that file, the script will no longer work.

  2. Copy the directory where the file is saved.

  3. Open Rhino, then choose which icon you want to customize and hold Shift, then click with the right mouse button. That opens the icon editor.

  4. Paste the following text inside the “Command” field:
    _-RunPythonScript "D:\Your directory\Name of the script.py"

  5. Replace “YourDirectory” with your own directory which you already copied in step #2. Replace "Name of the script with the actual name of the script. Just an example:
    _-RunPythonScript "D:\Rhinoceros 7\Scripts\Unicorn fillet\UnicornFilletVer1.py"

  6. Press the “OK” button to confirm the changes and close the icon editor.

  7. Open a nice drink. :smiley:

28 Likes

Below some macro and scripts that I use a lot. I do a lot of 2D drawing usually, these are very simple but save a lot of time note having to find buttons in menu or do repetitive patterns.

  • One click match properties
    !_-MatchProperties _Pause _NoEcho _Pause _Enter

  • One click match hatch pattern
    !_-Properties _Pause _Hatch _Match _Pause _EnterEnd

  • One click select all objects on same layer
    -_Select _Pause _NoEcho _SetRedrawOff _SelNone _-SelLayer _Pick _SelPrev _Enter _SetRedrawOn _EnterEnd

  • Rotate viewport left / right (useful when in detail views for example)
    -RotateView a 90 l, -RotateView a 90 r

  • Control display order, super useful scripts by @Helvetosaur. They need a bit of refinement to be integrated in a smooth way, didn’t have the time yet to try to customize it.
    SetObjDisplayOrderOSD.py (4.4 KB)
    SetObjDrawOrder.py (1.6 KB)

10 Likes

Thanks for sharing those! I slightly modified your 4th macro to turn the camera at 180 degrees instead of 90 degrees, because this is handy when modeling cars.

  • Reverse camera view
    -RotateView a 180 l, -RotateView a 180 r

This is a macro that I created to overcome one weakness of Rhino’s default ! _Line _Tangent _Pause command. It will ask for a planar object to temporarily align the CPlane to it during the command, then it will revert to the previous CPlane.

  • Line: Tangent and perpendicular to curves
    ! _CPlane _Object _Pause _ProjectOsnap _Toggle Enter _Pause _Line _Tangent _Pause _Pause _Cplane _Undo _ProjectOsnap _Toggle Enter

Two macros for creating of a vertical dimension or aligned dimension directly in the Perspective viewport:

  • 3-D vertical dimension
    ! _CPlane _Object _Multipause _Dim _CPlane _Undo

  • 3-D aligned dimension
    ! _CPlane _Object _Multipause _DimAligned _CPlane _Undo

This video shows how to use the 3d dimensions:

10 Likes

I added a short video tutorial in my original post showing how to setup a script and run it from a custom icon in Rhino.

3 Likes

Thanks for the post Bobi!

Here’s a few of my favourites:


Coming from modelling in SW and NX, I highly disliked the default Rhino camera movement and settings. I use this 100s of times per session, so thank you @Jarek !

Set target to cursor
DIG_SetTargetToCursor.rvb (3.8 KB) – Original post


I’ve got this at the top of my Viewport Context Menu (also, I’m impatient so I set the context menu delay speed to 100ms) since I frequently add common-use commands to my Aliases to save a few precious microseconds

Open Aliases
! _OptionsPage _Aliases


These are both pretty useful for creating a temporary CPlane

setc3
'_CPlane _3Point

setwt
'_CPlane _World _Top


I love making macros for pop-up toolbars

Alias Macro Personal comments
a _NoEcho '_PopupToolbar "Lines" I wanted to use \ as an alias for this :pensive:
aa _NoEcho '_PopupToolbar "Analyze" so that I could use a for this
bw between i’m lazy efficient
c _NoEcho '_PopupToolbar "Circle"
cc _NoEcho '_PopupToolbar "Curve"
ct _NoEcho '_PopupToolbar "Curve Tools"
e _NoEcho '_PopupToolbar "Ellipse"
sca _NoEcho '_PopupToolbar "Scale"
scr _NoEcho '_PopupToolbar "Surface Creation"
st _NoEcho '_PopupToolbar "Surface Tools"
tr _NoEcho '_PopupToolbar "Transform"

EDIT: i pre-posted, i may come back and add to this later

1 Like
  • Axis from arcs and circles
    ! _CPlane _Object _Pause _ProjectOsnap _Toggle Enter _Pause _Line _Vertical 0 _BothSides _Pause _Pause _Cplane _Undo _ProjectOsnap _Toggle Enter

Creates a line which represents the aligned axis of a true arc or circle. Made to work no matter what’s the orientation of the input arc or curve. Starts from the center of the arc or circle and goes in both directions.
Useful if you need to create a bent pipe via “Revolve” from the end of an existing straight pipe.

Extracting axis (the black line) from the white arc:

Revolve from the white circle using the previously extracted axis:

Revolve from the white circle using the previously extracted axis:


  • Line: Tangent and perpendicular to curves
    ! _CPlane _Object _Pause _ProjectOsnap _Toggle Enter _Pause _Line _Tangent _Pause _Pause _Cplane _Undo _ProjectOsnap _Toggle Enter

Overcomes the disadvantage of the default “Line: Tangent, Perpendicular” command (! _Line _Tangent _Pause), which does not work good with arcs and circles that are not aligned to the active CPlane. Creates a temporary CPlane during the command so that the output tangent line is properly aligned to the input arc or circle, then reverts to the previous CPlane.

Using this macro to create the black line tangent to the white arc:

5 Likes

Quickly Copy a Surface from an Object:

! -selectionfilter Subobjects=Yes Enter _Copy _InPlace=yes Enter -selectionfilter Subobjects=No Enter _SelLast

2 Likes

Quickly create a new Extrusion from a Face from an Object:

! -selectionfilter Subobjects=Yes Enter _Copy _InPlace=yes Enter -selectionfilter Subobjects=No Enter _SelLast Enter _-ExtrudeSrf _Solid=Yes _DeleteInput=yes Pause _SelLast Enter

I was looking for this yesterday! It would be great if copy and paste would create new surfaces/points when you are trying to copy objects from a sub-object selection.

1 Like

Great idea @Rhino_Bulgaria

I want to share one of my favorites, it creates the intersection between the untrimmed version of the surfaces you select.
I use it a lot in combination with _ReplaceEdge

Many times you need to untrim surfaces just to get the intersection with other surfaces, this script by @emilio saves you a lot of time.

windows tip: to copy the full path of a script in windows file explorer shift+right clic the file and look for “copy as path”

Untrimmed_Intersection_2.py (1.2 KB)

9 Likes

That script looks like something I could use sometimes. Thank you for sharing it, and thanks to @emilio for creating it!

1 Like

Start Numberer and click any place in the viewport to add numbered dots or text to the scene. Numberer keeps track of the sequence until you reset it. Optionally add prefixes and suffixes to the sequence.

numberer_0.py (11.2 KB)

5 Likes

infiltrate copy option into command

I call this concept “paste from the future”… after undoing (© @Tom_P :nerd_face: )
I some times forget to check / set the copy option - then I use:

_selnone _sellast _copytoclipboard _undo _paste

this is quite powerful macro for lazy people ;-D
the nice thing about this macro is, it does not need extra user-interaction.

example: extendSrf

…and it also works to infiltrate the copy option into a single command that does not offer this option:

_extendSrf _pause _pause _sellast _copytoclipboard _undo _paste

4 Likes

As the name suggests, the “Extend surface edge” plug-in is capable to extend a surface edge while adjusting the whole control polygon accordingly. Great for cases where one of the edges is far from the target edge of nearby geometry in needs a gradual adjustment of one edge while keeping the opposite edge in place.

The command to run this plug-in is ! _ExtendEdge

ExtendSurfaceEdge.rhp (42.5 KB)

10 Likes

byRhinoGadget includes many, many great tools, but my favourite among them is the ! _SymmetricSrf command which makes the surface points symmetrical by manually placing a mirror plane. This is a huge helper for those who do industrial design with curved surfaces, such like car windshields, bonnets, etc. This is a must have plug-in for any Rhino user!

Description from the original author:

byRhinoGadget is a collection of script-based commands that were internally used by the Plus Plastic design team to help with simple repetitive tasks or to make small, annoying tasks easier. It is composed of commands that support many Rhino commands and improve work efficiency. The user interface is similar to the Rhino command, so if you are a Rhino user, you can use it immediately after checking the function of the command.

byrhinogadget-1010-any-win.zip (1.3 MB)

6 Likes

Holy ****, finally something approximating a NURBS mirror (kinda)! Thanks for the tip Bobi!

1 Like

I’m surprised that Rhino does not have such an important tool natively. :smiley:

Great idea to start this! Maybe at some point it will be worth it to create a shared google/dropbox folder as a library. :thinking:

I’ll post more favorites soon, but this one’s a legit game-changer in Rhino. Edit Groups and Blocks (and Nested Blocks) in double-click Sketchup style. :exploding_head:

5 Likes

Toggle the standard toolbar at the top of the Rhino window to save space:

_NoEcho '-Toolbar Group "default" Toggle "Standard Toolbar Group" EnterEnd

I have it set to ‘std’ which is left hand typable like most of my macros, so I don’t have to take my right hand off the mouse.

1 Like

This is a good one.

Would be great if there were an “Insert/Change” option, so you could either Insert a number that already exists, or Change a number that already exists, and it would bump all the other existing successive numbers in turn:

Insert – Say #1 - #10 already exists. You realize you missed numbering three points that need to be in specific slots of the sequence, so you Insert the numbers 4, 5, and 6 for those points, and the original 4-10 get bumped to 7-13.

Change – If you Change the existing #5 to #4A, the successive numbers change to 5-9.

Mind you, I don’t know how to do this – just a suggestion if someone feels like diving in! :sweat_smile: I’ll share some of my own scripts/macros, but this isn’t in my small wheelhouse.

2 Likes