Skip to content

Creating center line from curves or polylines in Rhino using a plugin

Notifications You must be signed in to change notification settings

suhas-hathwar/ColumnCenterLinePlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Column Centerline Plugin Documentation

Overview The ColumnCenterlinePlugin is a C# Rhino plugin designed to automate the creation of centerline drawings for columns in a Rhino model. It processes curves or polylines representing columns on a user-specified layer, generates horizontal and vertical centerlines, labels them with alphabets (horizontal) and numbers (vertical), and adds dimensions between the centerlines. The plugin is intended to streamline the drafting process for architectural or structural drawings.

Features

  • Layer Selection: Allows the user to input or select a layer containing column geometry (curves or polylines).
  • Curve Processing: Automatically joins curves to form closed polylines, if possible.
  • Centerline Generation: Creates horizontal and vertical centerlines based on the bounding box center of each closed polyline, extended by a user-defined length.
  • Labeling: Assigns alphabetical labels (A, B, C, ...) to horizontal centerlines and numerical labels (1, 2, 3, ...) to vertical centerlines, displayed inside circles at the line ends.
  • Linetype Styling: Applies a "Center" linetype (short-long-short dashes) to centerlines for clarity.
  • Dimensioning: Adds linear dimensions between adjacent horizontal centerlines (above) and vertical centerlines (to the right).
  • Output Layer: Places all generated geometry (centerlines, circles, text, and dimensions) in a new layer named <InputLayerName>_Centerlines.

Requirements

  • Rhino Version: Rhino 6 or later.
  • Development Environment: Visual Studio with .NET Framework (compatible with Rhino's version, typically .NET 4.8).
  • Dependencies: RhinoCommon SDK (included with Rhino).

Installation 1.Create a Rhino Plugin Project:

  • Open Visual Studio and create a new Rhino C# Plug-in project.
  • Ensure the RhinoCommon reference is added to the project.
  1. Add the Plugin Code:
    • Copy the provided ColumnCenterlinePlugin.cs code into the project, replacing the default command class.
  2. Build the Plugin:
    • Build the solution in Visual Studio to generate the .rhp file.
  3. Load in Rhino:
    • In Rhino, use the PlugInManager or drag-and-drop the .rhp file to load the plugin.
  4. Verify Command:
    • The command ColumnCenterline should be available in Rhino’s command line.

Usage

  1. Prepare the Model:
    • Ensure all column geometry (curves or polylines) is on a single layer.
    • Columns should ideally form closed shapes (e.g., rectangles or circles) or be joinable into closed polylines.
  2. Run the Command:
    • Type ColumnCenterline in Rhino’s command line and press Enter.
  3. Input Layer Name:
    • Enter the name of the layer containing the column geometry when prompted.
  4. Output:
    • The plugin will:
      • Join curves into closed polylines, if necessary.
      • Create a new layer (<InputLayerName>_Centerlines) for output.
      • Generate horizontal and vertical centerlines with a "Center" linetype.
      • Add labeled circles (alphabets for horizontal, numbers for vertical) at the line ends.
      • Place dimensions between centerlines.
      • The Rhino viewport will redraw to display the results.

Limitations

  • The plugin assumes columns are represented by curves or polylines that can be joined into closed shapes.
  • Non-closed or non-joinable curves are ignored.
  • Overlapping or invalid geometry may lead to unexpected results.
  • The plugin uses fixed values for extension length, circle radius, and text height, which may need adjustment for different project scales.
  • Dimensions are placed with a fixed offset, which may require tweaking for crowded drawings.

License

This plugin is provided as-is for use within Rhino. No warranty is implied. Users are responsible for validating the output for their specific needs.

Contact

For support or feedback, contact the plugin developer through the Rhino plugin community or relevant project channels.

About

Creating center line from curves or polylines in Rhino using a plugin

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages