====== Pascal Golay's Scripted Utilities for Rhino ====== >**Summary: **A bunch of Rhino scripts that I've made over the years Most of these are plain RhinoScripts, but a couple are more complex and involve several scripts. I have compiled these scripts into plug-ins using the Monkey script compiler. **Loading the scripts** All of these scripts are designed for drag and drop for V4 (and v5 for the most part). Extract, save, and then drag and drop the rvb files onto an open Rhino window. This will add the script to the list of scripts that load on startup (//Options>RhinoScript// page), and it adds one or more aliases to your alias list (//Options>Aliases//). Typing the alias or putting it on a button will run the script, much like a command. **Loading the plug-ins** Pretty much the same as loading scripts. Unzip and save the rhp plug-in files and then drag and drop them onto an open Rhino window. You can also use //Options>Plug-ins page>Install// button to navigate to the rhp file on your disk. The fancier ones of these add menus in Rhino. I'll add more of these and more info about use as I go. Let me know if you run into problems with these. Most have been working pretty well for me and others but there are no doubt bugs to squish. ---- ===Scripts=== {{:people:UpdateSelectedBlocks.zip|UpdateSelectedBlocks }} - Select specific linked blocks to update. Adds the following alias- **UpdateSelectedBlocks** {{:people:HatchDirection.zip|HatchDirection }} - Sets the direction of selected hatches, or sets the hatch base point and direction both. Adds the following aliases- **HatchDirection, HatchOrient** {{:people:ClippingPlaneCurves.zip|ClippingPlaneCurves }}- Gets the edge curves of objects clipped by a Rhino clipping plane as curves. Adds the following alias- **ClippingPlaneCurves** {{:people:dimensionoffset.zip|DimensionOffset }}- Set the distance of the dimension number from the dimensioned objects. Useful for tidying up drawings. Select multiple linear or aligned dimensions and set the offset distance. Adds the following alias- **DimensionOffset** {{:people:setbackfillet.zip|SetbackFillet }}- Like FilletCorners but fillets to a constant setback from the corner point, not a constant radius. //**Updated** 11/14/2016 - Tune ups to make it more reliable.// Adds the following alias- **SetbackFillet** {{:people:selparalleltoaxis_2_.zip|SelParallel }}- Select lines that are parallel to CPlane axes, or to a selected line, or to a line defined by two points. Adds the following alias- **SelParallel** {{:people:sprinkler_2_.zip|Sprinkler}} - Randomly sprinkle copies of an object onto a target surface, polysurface, or mesh. Optionally randomize scale and rotation (in World XY) of the copies. Useful for quickly populating a landscape with plants etc. Adds the following alias- **Sprinkler** {{:people:project_direction.zip|Project by direction}} - Project curves in any direction or use the current view direction. //**Updated** 05/30/2013 - Added TrimFromView to allow accurate trimming with curves from the current view direction.// Adds the following aliases- **ProjectDir, ProjectView, TrimFromView** {{:people:mirror_ex_2_.zip|MirrorEx}} - Mirror objects with some fancy options: mirror position only (objects are not inverted, position only for just text, and various nifty mirror plane options including the current cplane and selected planar surfaces. Adds the following alias- **MirrorEx** //**Updated** 09/1/2015 Handles mirroring multiple objects by position only.// {{:people:distribute.zip|Distribute objects}} - Evenly distribute objects in one direction by distance between centers or by gap between objects. //**Updated** 11/1/2012 - No longer constrained to 2D. New options for explicitly setting gaps or center to center distance. Limited support for groups. Groups are treated as single objects, unless only a single group is selected. In that case objects are distributed within the group. Note: Group support may not work well if objects are members of more than one group. **Updated** 10/1/2014 Fixed group handling. At least the top level groups should be respected now.// Adds the following alias- **Distribute** {{:people:retrim.zip|Retrim}} - Retrim a surface with the current trim curves. This is sometimes all that is needed to fix a bad object, e.g. from SelBadObjects or something that fails Check with a message including the words Trim, or Loop or Edge. //**Updated** 2/6/2012 to handle more cases.// Adds the following alias- **ReTrim** {{:people:qinfo.zip|QInfo}} - Quick info about selected curves, surfaces, polysurfaces and block instances. This is a handy script to add to the object context menu- //Options>Context Menu>Object menu//. Adds the following alias- **QInfo** {{:people:filletnonplanar.zip|FilletNonPlanar}} - //Rhino 5 only.// Fillet curves which are out of plane. Since no true-arc fillet exists for these cases, the result is an approximation formed by deforming a true arc along the arc normal. Unlike Fillet, input curves cannot be extended at the moment. //**Updated** 5/3/2012 to handle more cases.; **Updated** 12/19/2012 - Tuned up. Should be more reliable and make better fillets when the input curves cross one another.// Adds the following alias- **FilletNonPlanar** {{:people:matchoncrv_2.zip|MatchOnCrv}} - Match a curve end to any point on another curve. Select near the end of an open curve to match and select a target curve. Set the target point on the target curve and set the type of continuity. Since the match is not on the end of the curve, you get a chance to flip the direction of the match for Tangency and Curvature matches. Adds the following aliases- **MatchOnCrv** {{:people:SurfaceTangent.zip | Set surface tangent 'tension'}} - Select an untrimmed edge and adjust the distance from the edge of the second row of control points. Also has a tool for setting the tangent direction of a surface. This part is built in to V5 but handy for V4. Adds the following aliases- **TangentTensionSrf, TangentDirectionSrf** {{:people:facecamera.zip|FaceCamera}} - Turns surfaces to face the current camera location, pivoting them on their local World Z aligned axis. This is handy for forcing planes with decals, of figures or plants for example, to face the camera. Adds the following alias- **FaceCamera** {{:people:convertcurvedegree.zip|Convert curve degree}} - Changes the degree of a curve while maintaining point count and point locatiions. Not the same as ChangeDegree which will add or remove points as part of the change. This tool will change the shape of the curve. It does not work on rational curves. Adds the following alias- **ConvertCrvDegree** {{:people:silhouette_vp.zip|Silhouette from eyepoint}} - Get slihouette curves from a user defined view point and direction. Adds the following alias- **SilhouetteEyePt**. {{:people:matchcrvtansrf.zip| Match a curve tangent to a surface}} - Set the tangent point on the surface, adjust the tension (i.e. the distance of the second point from the end), and the tangent direction. Optionally maintain the other end's position, tangency, or curvature. Adds the following alias- **MatchCrvTanSrf**. [[http://wiki.mcneel.com/_media/legacy/en/AlignPlus.zip| Align objects to a point]] - Like the Align command but lets the user select an object or set the alignment point explicitly. Note: V5's Align tool makes this script obsolete, although it is still handy in V4. Adds the following aliases- **AlignToPoint, AlignToObject** [[http://wiki.mcneel.com/_media/legacy/en/CreateOutline.zip|Create outline]] - Automates CurveBoolean to just create the outer perimeter curve in one shot. This adds the following alias- **CreateOutline** {{:people:aligngrips.zip|Align object grips}} - Lets you snap grips in line with other points or 3D locations. Adds the following aliases- **AlignGrips, AlignGripsCrv** //**Updated** 07/12/10 - Clearer prompts. Added direction option.// {{:people:curvesymmetryauto.zip|Curve symmetry}} - Rearranges control points of a curve to make it symmetrical. Adds the following alias- **CurveSymmetry** [[http://wiki.mcneel.com/_media/legacy/en/PlanarizeCurve.zip|Planarize curves ]] - Makes curves planar to a best fit plane through the current curve. Adds the following alias- **PlanarizeCurve** //**Updated** 01/19/10 - Fixed a crash on closed curves// [[http://wiki.mcneel.com/_media/legacy/en/OffsetX.zip|Offset subcurves]] - Offset entire curves, sub curve segments of polycurves or user defined spans within curves. Adds the following alias- **OffsetX**. [[http://wiki.mcneel.com/_media/legacy/en/DivideLengthX.zip|Divide curves by length]] - Divide curve by length, with the ability to flip the direction of some curves to change the end from which the division is started. Output is grouped per curve. This adds the following alias- **DivideLengthX** {{people:findclearance.zip|Clearance}} - Finds the clearance between surfaces or polysurfaces. Adds the following alias- **Clearance** {{:people:setvolume.zip|Set object volumes}} - Scale objects to a user defined volume. Adds the following alias- **SetVolume** //**Updated** 8/27/10 - Added scaling in one and two dimensions; **Updated** 09/17/2010 - Added the ability to scale other objects by the same amount. Fixed wrong alias being added to run the script.// {{:people:findstackedpoints_11_03_2010.zip|SelStacked}} - Locate objects that have stacked control points and locates the the stacked points. Adds the following aliases- **SelStacked, StackedPoints**. {{:people:intersectplane.zip| IntersectPlane}} - Finds the intersection of objects and infinite planes defined by cplanes, planar surfaces, or user defined planes. //**Updated** 5/3/2010 - Added 'CutPlane' to the variety of planes that can be defined.; **Updated** 8/27/2010 - Better workflow on TrimWithplane.; **Updated** 5/21/2012 - Added **SplitWithPlane**, **BooelanSplitWithPlane**; **Updated** 12/19/2012 - Fixed some bugs, added tangent plane as a plane type.**Updated** 02/06/2013 - Added clipping planes to available planar objects to select. **Updated** 02/06/2013 - Bug fix // Adds the following aliases- **IntersectPlane, TrimWithPlane**. [[http://wiki.mcneel.com/_media/legacy/en/FileInfo.zip|File info]] - Returns information about the currently open file. Adds the following alias- **FileInfo** {{https://github.com/downloads/pgolay/PG_Scripts/Isolate_2.zip| Isolate objects}} - Isolate objects for editing then restore the starting view and object visibility. Adds the following alias- **Isolate, UnIsolate. IsolateLock, UnisolateLock, IsolateLayer, UnisolateLayer** //**Updated** 5/6/2011 - Added an option to save and restore the current view or not. Previous versions always saved and restored the view. Added Isolatelayer and UnisolateLayer.// [[https://github.com/downloads/pgolay/PG_Scripts/HowMany.zip|How many objects are selected?]] - Reports the total number of objects selected, or in the file. Handy to have in the context menus (//Options>Context// menu). Adds the following aliases- **HowMany, HowManyScene** {{:people:popupplanes.zip|Pop up a CPlane list}} - Pops up a list of saved CPlanes under the cursor. Clicking on a CPlane name in the list will make that the active CPlane in the current view. This alias is handy to put in the pop-up menu or in the context menu (//Options>Context// menu). Adds the following alias- **PopUpPlanes** [[http://wiki.mcneel.com/_media/legacy/en/WorldCPlaneToView.zip|Set cplanes according to view direction]] - Set cplanes according to view direction. WorldCPlanetoView sets a WorldCplanes that is most perpendicular to the current view, while OrientViewCplaneToWorld keeps the current CPlane origin but makes the cplane parallel to a World Cplane according to the current view. There is no difference between these if the current CPlane in one of the World planes. Adds the following aliases- **WorldCPlanetoView, OrientViewCplaneToWorld**. {{:people:zoomsame.zip|Zoom all views the same}} - Zooms all viewports to the same target and (approximate) zoom level as the current viewport. Adds the following alias- **ZoomSame** {{:people:extractunderlyingsrfs.zip|Extract Underlying surfaces from a polysurface}} - Returns the full underlying surfaces from a polysurface. Optionally deletes the input object. Adds the following alias- **ExtractUnderlyingSrfs** [[https://github.com/downloads/pgolay/PG_Scripts/UnderlyingSrf.zip| Underlying surface]] - Returns the full underlying surface from any trimmed surface or from trimmed or untrimmed fragments of spheres, cones, torii. Adds the following alias- **UnderlyingSrf** {{:people:planarsrfpt.zip|Planar surface from picked points}} - Creates a planar surface from points set by the user. Adds the following alias- **PlanarSrfPt** {{:people:scalecenters.zip|Scale centers}} - Scales the locations of selected objects based on their bounding box centroids. The objects themselves are not scaled. Adds the following alias- **ScaleCenters**. [[http://wiki.mcneel.com/_media/legacy/en/Orient2ptCrv.zip|Orient objects by two points on a curve]] - Set two points on an object and orient the object to a curve so that the points fall on the curve. Adds the following alias- **OrientCrv2Pt**. [[http://wiki.mcneel.com/_media/legacy/en/RotateOnNormal.zip|Rotate on normal]] - Allows rotation of objects about a surface normal. Add the following alias- **RotateOnNormal**. [[http://wiki.mcneel.com/_media/legacy/en/BallJoint.zip|BallJoint]] - Pivot objects freely in 3D around a point. This adds the following alias- **BallJoint** [[http://wiki.mcneel.com/_media/legacy/en/HighPt.zip|High point]] - Finds the local high or low point on a surface or polysurface starting from a user input (pick) point. Adds the following aliases- **HighPt, LowPt** [[https://github.com/downloads/pgolay/PG_Scripts/MoveProject%20(2).zip|Move-project]] - Move objects normal to the cplane until the Move 'from' point hits a target surface, polysurface or mesh. Adds the following aliases- **MoveProject**, **MoveProjectEach** //**Updated** 5/13/2011 - Added **MoveProjectEach**; **Updated** 10/01/2012 - Works better with block instances. Other tune ups.// {{:people:projectobjects_3.zip|Project objects }}- Projects 3D surface, polysurface, or mesh objects onto a target surface or polysurface. Adds thefollowing alias- **ProjectObjects.** //**Updated** 01/31/18// Should be faster now. [[http://wiki.mcneel.com/_media/legacy/en/ExtractWiresDir.zip|Extract surface wireframe in one direction only. ]] - Extracts surface wires in U or V. Adds the following alias - **ExtractWiresDir**. {{:people:RadialSections.zip|Section objects radially or along a path curve }} - Creates section curves radially from a center point at user defined intervals in degrees, or along a path curve at user defined intervals in file units along the curve. Adds the following aliases- **SectionRadial, SectionPath** ====Plug-ins==== {{:people:extracttangentfaces.zip|ExtractTangentFaces}} from a polysurface V5 plug-in. - Set the desired tangency tolerance in degrees, and select a starting face. Optionally allows the command to automatically find a starting face, as when extracting the A side if a thin wall shell. Plug-in adds this command: **ExtractTangentFaces** {{:people:ellipseviewangle.zip|Ellipse from view angle}} V5 plug-in. - Define an ellipse by specifying center point, the view angle to a circle that would result in that ellipse, and orientation. Adds **EllipseViewAngle** {{:people:numberer.zip|Numberer}} - Add a sequence of numbers as text or dots. A Python script and compiled V5 & V6 plug-in are included in the Zip archive. The plug-in adds this command: **Numberer** [[http://wiki.mcneel.com/_media/legacy/en/SelectionSets.zip|Selection Sets]] - Create, save, and recall named object and control point selection-sets. See the 'read me text file included in the download for more complete usage info. Adds the following commands- **SelectionSet, SelSetList, SelSetName, DeleteSeletionSets, RenameSelectionSet, SubtractSetsList, SubtractSetsName, GripSelectionSet, SelGripsName, DeleteGripSets, RenameGripSet, SubtractGripSets, SelGripsList** [[http://wiki.mcneel.com/_media/legacy/en/Light_Utilities.zip|Light utilities]] - Adds a menu and a lot of commands to manipulate lights. Rectangular lights in particular are hard to handle in Rhino and this adds tools for helping out. The plug-in and commands refer to rectangular lights as area lights. This is just goofy and I'll try to get back and change this to use the normal Rhino name for these lights. Adds the following commands- **AreaLightPlace, AreaLightResize, AreaLightOrient, AreaLightSlide, AreaLightTarget, AreaLightTargetToObjects, AreaLightLevel, LightToPlane, PlaneToLight, AreaLightScale, SpotlightAngle, SpotlightPivot, SpotlightSlide, SpotlightTarget, SpotlightTargetObjects**