[go: up one dir, main page]

0% found this document useful (0 votes)
49 views18 pages

Section Tools Primer

Uploaded by

Minton JP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views18 pages

Section Tools Primer

Uploaded by

Minton JP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

SectionTools Plug-in for

®
Rhinoceros
Copyright © 2021 Robert McNeel & Associates. All rights reserved.
Rhinoceros is a registered trademark and Rhino is a trademark of Robert McNeel & Associates.

Copyright © 2021 Robert McNeel & Associates 2


Table of Contents
Introduction 5
Toolbars 5
Check for updates 5

Dynamic 3D Sections 5
stCreate Command 6
stCreate Options 6
Scripting Custom Sections 9
stExtractSections Command 11
stExtractSections Options 11

Extract Dynamic 2D Layouts 11


stLayout Command 11
stLayout Options 12
stNestLayout Command 12
stNestLayout Options 12
stMake2D Command 13
stMake2D Options 13

Edit Sections 13
stEditSections Command 13
stEditSections Options 13
stEditSectionsObjects Command 14
stEditSectionsHint Command 14
stEdit2DLayout Command 14
stEdit2DLayout Options 15

Update and View Sections 15


stUpdate Command 15
stViewSections Command 16
stViewSections Options 17
stClearSectionViews Command 17
stSaveSectionsView Command 17
stSaveSectionsView Options 17

Sections Utilities 18
Create Reports 18

Copyright © 2021 Robert McNeel & Associates. 3


stMoveSections Command 18
Delete and Rename Sections 18
Update the Lock and Visibility of Sections 18
Export Sections 18

Copyright © 2021 Robert McNeel & Associates 4


Introduction
SectionTools is a dynamic sectioning plug-in for Rhinoceros for Windows (no Mac). It provides an
intuitive way to create sections in their 3D space location, and projections on XY-Plane that are
dynamically linked to the sections. There are tools to help update the sections, manage options,
and extract information. SectionTools is used by architects, design professionals and engineers.

To install the SectionTools plug-in:

For Rhino 7:
Open Rhino 7, run the PackageManager command. Under Online tab > search for
SectionTools, select the latest version, and click Download and Install, then restart Rhino.
For Rhino 6:
Download and double click on the installation file SectionTools*.rhi. The latest download and
updates are available here: http://www.food4rhino.com/app/sectiontools-rhino
Note: Install the plug-in only once. After the initial installation, SectionTools automatically loads
when Rhino starts.

Toolbars
The SectionTools.rui file includes all plug-in commands and is installed with the plugin-in.

To load toolbars:

1 Start the Toolbars command (Tools >Toolbar Layout).


2 From the File field, you should See SectionTools listed that you can select and check to show
in the Rhino UI. If you don’t see SectionTools toolbar, you can click Open, and browse to
SectionTools.rui that will be located in the current version folder in Rhino 7:
%AppData%\McNeel\Rhinoceros\Packages\7.0\SectionTools\

Check for updates


SectionTools download and resources page is https://www.food4rhino.com/app/sectiontools-rhino
Suggestions, bug reports, and comments are necessary to develop the plugin. Please share your
stories, examples, and experiences with us. Post questions to our newsgroup or email us directly.
Visit https://discourse.mcneel.com/ for details.
You are welcomed to contact the developer for bug reports and development suggestions.

Dynamic 3D Sections
SectionTools allows you to import sections, create sections interactively, update, extract 2D
layouts, and generate basic reports. Sections data is saved to the document and can be updated
when the model changes. Each section plane has a corresponding clipping plane object hidden in
that section's layer. Sections cut through polysurface, surface, meshes, subD objects and blocks.
Each section curve is named following the format: LayerName_ObjectName. This allows sorting
the curves by object in the reports.
Section curves can be set to take the properties of the object they section; for example, color by
layer or by object.
For a short video demonstration, and 3dm file download, go to:
https://www.food4rhino.com/app/sectiontools-rhino

stCreate Command
This is the main command to create dynamic sections through selected objects (or all visible
objects at the time the command is created or updated). The output include curves, cap surfaces
and hatches.

To create a simple section:

1 Start the stCreate command.


2 Use the Dir option to set the direction if necessary.
Note: The section direction is set to CPlane_X by default.
3 Select the objects to section, or press Enter to section through all visible objects.
This allows adding new objects to the model later without having to recreate sections.
4 Place sections, and press Enter.
Note: The Flip option reverses the section direction.

stCreate Options
Dir
Sets section line direction:
Horizontal
Vertical
Custom
ExtrudeDir
Sets section extrusion direction:
CPlaneNormal
Custom
Replace
If Yes, overwrites an existing section that has the exact same name.
Name
Sets the prefix used for the section names. Section names are incremented, for example if you
set the Name=SEC, sections will be named: SEC_01, SEC_02, SEC_03, etc.
NumOfSections
Specifies the number of sections. If set to a number more than 1, the 2 other options appear:

Copyright © 2021 Robert McNeel & Associates 6


Spacing: Specifies the distance between sections.
BothSides: Create sections on both sides of the selected point.
Attributes
Changes assigned attributes to be:
ByLayer: set the attribute to be by the section layer.
FromSource: Inherit the same attributes as the source objects. If source attributes are set
ByLayer, then assign the source layer attributes.
SolidMode
If cutting through a solid, you can generate surfaces or hatches in addition to the intersection
curve. SolidMode options are:
None: create section curves only
Surfaces: Create caps (trimmed surfaces)
Hatch: add hatch to closed regions
Both: add surfaces and hatch
If Hatch or Both options is selected, following hatching options appear:
HPattern: list of patterns in the default hatch file.
HRotation: Hatch rotation angle in degrees.
HScale: Hatch pattern scale factor.
Labels
Sections add a curve with arrows to show section direction and a text with the section name.
This option is to control if labels should be shown or hidden:
ShowAll: Show both section curve and text dot
CurveOnly: Show section curve only.
TextOnly: Show text only.
HideAll: Hatch pattern scale factor.
ArrowScale
This option controls the size of the arrowhead. Minimum scale has to be 10*tolerance.
LoadFromFile
Help select an external file from which to load section locations and names.
Flip
Once accepted the options, you will be prompted to place the sections with an option to flip the
section direction. Press Enter when done.

There are three ways to create multiple sections:


● Use the stCreate command and set LoadFromFile=Yes.
● Use the stCreate command and set the NumOfSections option to be greater than 1.
● Create variable distances and variable directions with scripting.
This section describes the first two methods. For more details about scripting, see
SectionToolsScripting.pdf.

Copyright © 2021 Robert McNeel & Associates. 7


The LoadFromFile option loads an array of sections from a .txt, .dat, or .csv (comma separated)
file. The file specifies section names and a distance from a base point.

The format for the text file is: <SectionName>,<RelativeDistance>


Start a new line for each section. For an example text file, see SectionTools_LoadFormat.txt.
For example:
Section 00,-0.5
Section 01,2.5
Section 02,5.5

To create multiple sections from a file

1 Start the stCreate command.


2 Use the Dir option to set the desired direction if necessary.
Note: The section direction is set to CPlane_X by default.
3 Set the LoadFromFile option to Yes.
Note: If the Replace option to Yes when reloading a modified .txt file, existing sections with
the same name are overwritten.
4 Select the objects to section, or press Enter to section through all visible objects.
5 In the dialog box, select the text file.
6 Pick a base point.

Copyright © 2021 Robert McNeel & Associates 8


Scripting Custom Sections
To create radial sections or sections with variable distances following some formula, use
SectionTools scripting. Here are 2 examples:

Example to create variable distances section with RhinoScript


! -_Runscript
(
Call Main()
Sub Main()
Dim y, arrPt, i, str
'Base point (x,y,z)
'Fixed x = 0 and z = 0
'Variable y value
Const x = 0
Const z = 0
y = 0

Const Num = 5 'Number of Sections


Const Spacing = 0.5 'Spacing between sections

For i=0 To Num


y = y + i*Spacing
arrPt = Array(x,y,z)
str = "stCreate _Enter _Enter " & Rhino.Pt2Str(arrPt) & " _Enter"
'Call command line
Call Rhino.Command( str )
Rhino.UnselectAllObjects()
Next
End Sub

Copyright © 2021 Robert McNeel & Associates. 9


Example to create rotated sections by variable angles with RhinoScript
! -_Runscript
(
Call Main()
Sub Main()
'Declare variables
Dim fromPt, toPt, str, i, arrMatrix(3,3), Angle, DA
fromPt = Array(0,0,0)
toPt = Array(10,0,0)
Const Num = 5 'Number of sections
DA = 5 'Angle in Degrees
Angle = Rhino.ToRadians( DA ) ' Angle in Radians

For i=0 To Num


'Calculate Rotation Materix
arrMatrix(0,0)=Cos(Angle) : arrMatrix(0,1)=-Sin(Angle): arrMatrix(0,2)=0 :
arrMatrix(0,3)=0
arrMatrix(1,0)=Sin(Angle) : arrMatrix(1,1)=Cos(Angle) :arrMatrix(1,2)=0 :
arrMatrix(1,3)=0
arrMatrix(2,0) = 0 : arrMatrix(2,1) = 0 : arrMatrix(2,2)=1 : arrMatrix(2,3) = 0
arrMatrix(3,0) = 0 : arrMatrix(3,1) = 0 : arrMatrix(3,2)=0 : arrMatrix(3,3) = 1
'Call SectionTools commands and set direction
str = "!_stCreate _Enter Dir Custom " & Rhino.Pt2Str(fromPt) & " " &
Rhino.Pt2Str(toPt) & " _Enter " & Rhino.Pt2Str(fromPt) & " _Enter"
Call Rhino.Command( str )

'Rotate the "to" point by Angle using matrix


toPt = Rhino.PointTransform( toPt, arrMatrix )
'Set new angle
DA = DA+ (i/2)
Angle = Rhino.ToRadians( DA )
Rhino.UnselectAllObjects()
Next
End Sub

Copyright © 2021 Robert McNeel & Associates 10


stExtractSections Command
Extract static snapshots of your sections using stExtractSections. It allows extracting curves, caps
and slices.

stExtractSections Options
Curves
If set to Yes, then extract the curves.
Surfaces
If set to Yes, then extract surfaces. Notice that if the source object is a mesh, then it will extract
a planer mesh as well.
Slices with Thickness
If set to Yes, then extract slices using the thickness input. Notice that if the source object is a
mesh, then the extracted slice is a mesh too.

Extract Dynamic 2D Layouts


The stCreate and stCreateArray commands place sections data in the 3D locations while
stLayout projects the sections into the world xy plane. All three commands are dynamic (update
with model changes when you call stUpdateAllSections command)
All of the commands stCreate, stCreateArray and stLayout generate dynamic sections that
update with model changes.

stLayout Command
The command projects the sections onto the xy plane. Layouts update with model changes (using
stUpdateAllSections command).
Layouts are placed in a new sub-layer of the section they come from. A new layer with the name
format <SectionName>_<Layout> is created. The Layout layer is a sub-layer of the section layer.
Using the command on the same section overwrites the old layout. This does not affect context
(text, etc.) added to the Layout layer.

Copyright © 2021 Robert McNeel & Associates. 11


To create a 2D layout of sections:

1 Start the stLayout command.


2 Select sections from the list.
3 Select layout placement point.
Press Enter to project layout in place.
4 Set the placement grip to the bounding box center, minimum, or maximum.
The ApplyToAll option applies the first grip and placement point settings to all layouts.

stLayout Options
Grip
Sets the base point relative to each section bounding box. You can set to Center, Min and Max.
ShowLabel
If Yes, then show a Dot with the section layout name.
PlotWeight
Add print width to section curves in the layout.
ShowSolid
Add surfaces in the 2D layout.
ShowHatch
Add hatches in the 2D layout.
All
Apply the same options to all selected sections

stNestLayout Command
Projects the sections from 3D space to the world xy-plane in the default layer with the specified
spacing and arrangement. It creates static snapshots of the sections layout that do not update
with model changes.

To create nested layout:

1 Start the stNestLayout command.


2 Select sections from the list.
3 Pick a base point.

stNestLayout Options
ShowSolids
Shows surfaces and curves in the layout.
Arrange
Arranges layouts horizontally or vertically.
Spacing
Specify the gap between projected layouts.
Width
Arrange the layouts within a certain width starting a new row once exceeding the specified width.

Copyright © 2021 Robert McNeel & Associates 12


Label
Option to add a label with the section name.
LabelTag
If the Label=On, then set to use either a Dot or a Text.
LabelLocation
Either outside the layout, or inside.

stMake2D Command
Projects the sections and projections from background objects to the world xy-plane. It uses
parallel projection and arranges output in sublayers containing section curves, visible curves,
hidden curves and the overall outline.

stMake2D Options
AddHidden
If set to Yes, then add hidden curves.
AddTangent
If set to Yes, then add tangent and seam curves.
AddOutline
If set to Yes, then add the scene silhouette curves.

Edit Sections
Once created, sections’ options and direction can be changed using stEditSections command.
Also the user can change or reselect objects to section with stEditSectionsObjects and change
section location with stMoveSections command. There is also stEditSectionsHint to hide/show
section labels and change arrowhead scale.

stEditSections Command
The command allows changing attributes, solid mode, hatching pattern and direction of selected
sections.

stEditSections Options
Attributes
Changes assigned attributes.
ByLayer: By section layer
FromSource: From sectioned object. If attributes or source are ByLayer, then use the
source layer attributes.
SolidMode
If cutting through a solid, generates surfaces or hatches in addition to the intersection curve.
Options are (None Surfaces Hatch, Both). If Hatch or Both option is selected, following
hatching options appear:

Copyright © 2021 Robert McNeel & Associates. 13


HPattern: list of patterns in the default hatch file.
HRotation: Hatch rotation angle in degrees.
HScale: Hatch pattern scale factor.
Flip
Flip the direction of the section.
Label
Update labels options
ArrowSCale
Update arrow scale
All
Apply the same updates to all selected sections.

This is an example to show how to edit the hatch pattern.

stEditSectionsObjects Command
The command allows selecting new objects or cutting through all visible objects.
The All option allows applying the same objects selection to all sections.

stEditSectionsHint Command
The command allows to hide or show section curve hints and text labels. It also allows changing
the scale of the arrowhead.

stEdit2DLayout Command
The command allows changing the options for the dynamic 2D layout

Copyright © 2021 Robert McNeel & Associates 14


stEdit2DLayout Options
Grip
Sets the base point relative to each section bounding box. You can set to Center, Min and Max.
ShowLabel
If Yes, then show a Dot with the section layout name.
PlotWeight
Add print width to section curves in the layout.
ShowSolid
Add surfaces in the 2D layout.
ShowHatch
Add hatches in the 2D layout.
PlacementPoint
Add on-shot option to select new placement point for the layout
All
Apply the same updates to all selected sections

Update and View Sections


stUpdate Command
A section plane and the list of sectioned objects (or all visible) are used to create new section
curves and replace old ones. Sections curves and surfaces for all sections are updated.
Layout curves created with the stLayout command. Curves created with stNestLayout or
stMake2D do not update.

To update all sections

1 Start with a sectioned model.


The section is set to cut
through all visible objects.

Copyright © 2021 Robert McNeel & Associates. 15


2 The initial section is as
illustrated.

3 Add two more columns and a


step at the base.

4 Start the stUpdate command


and select the section to
update.

stViewSections Command
This command has options to Clips a view at one or more sections in any viewport. It also sets the
view and construction plane (CPlane) to align with the section plane.

Copyright © 2021 Robert McNeel & Associates 16


This is an example of how the view changes when SetView=Yes and SetCPlane=Yes.

stViewSections Options
Clip
Clips selected section in the selected view.
ClearOtherSections
Unclip all other sections not selected
SetView
Rotates the view of the selected viewport to align with section plane.
SetCPlane
Sets the viewport active construction plane to section plane.

stClearSectionViews Command
Clears the clipping display of one or more sections in one or more views. There is an All option to
clear selected sections from all views.

stSaveSectionsView Command
The command saves selected section to the Rhino NamedViews and NamedCPlanes

stSaveSectionsView Options
SaveToNamedViews
Save the section view to the Rhino NamedViews using the section name.
SaveToNamedCPlanes
Save the section plane to the Rhino NamedCPlanes using the section name.

Copyright © 2021 Robert McNeel & Associates. 17


Sections Utilities
Create Reports
The stReport command creates a .csv file that lists sections with basic calculation. In the
following example, there is one section in the file that cuts through six objects and for each object
(row), the report lists the name of the object that is cut, the layer it came from, the total sum of
curves area, the sum of curves perimeters and surface areas. The report also contains the base
point of each section, and its normal (Z) direction.

stMoveSections Command
The command prompts to select sections to move. Each section is moved normal to its plane.
When dragging the mouse, the section plane shows ghosted and new intersection dynamically
updates with mouse move. Users can enter a number value to shift the sections by that amount.

Delete and Rename Sections


Use the stDeleteSections command to delete the section.
Another way to delete sections is to delete the section layer.
If you like to change a section name you can do that through changing the layer name directly.

Update the Lock and Visibility of Sections


Use the stLockSections to lock sections layers and hide sections clipping-planes.

Export Sections
All sections and layouts are stored in layers. Use the Rhino SelLayer command to select layers
and then use the Export command to export them to a file.

Copyright © 2021 Robert McNeel & Associates 18

You might also like