This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscriptsyntax as rs | |
import Rhino | |
import scriptcontext as sc | |
x = Rhino.ApplicationSettings.SelectionFilterSettings.GetCurrentState() | |
y = Rhino.ApplicationSettings.SelectionFilterSettings.GetCurrentState() | |
types = [Rhino.DocObjects.ObjectType.Point, | |
Rhino.DocObjects.ObjectType.PointSet, | |
Rhino.DocObjects.ObjectType.Grip, | |
Rhino.DocObjects.ObjectType.Curve, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscriptsyntax as rs | |
import Rhino | |
import scriptcontext as sc | |
x = Rhino.ApplicationSettings.SelectionFilterSettings.GetCurrentState() | |
y = Rhino.ApplicationSettings.SelectionFilterSettings.GetCurrentState() | |
types = [Rhino.DocObjects.ObjectType.Point, | |
Rhino.DocObjects.ObjectType.PointSet, | |
Rhino.DocObjects.ObjectType.Grip, | |
Rhino.DocObjects.ObjectType.Curve, | |
Rhino.DocObjects.ObjectType.Brep, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python3 | |
import rhinoscriptsyntax as rs | |
import scriptcontext as sc | |
import System | |
import Rhino | |
def DistanceFromCamera(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscriptsyntax as rs | |
import Rhino | |
import scriptcontext as sc | |
import System | |
class DrawEdgesConduit(Rhino.Display.DisplayConduit): | |
def __init__(self, crvs): | |
self.crvs = crvs | |
self.pts = [crv.PointAtStart for crv in self.crvs] | |
self.pts += [crv.PointAtEnd for crv in self.crvs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscriptsyntax as rs | |
import Rhino | |
import scriptcontext as sc | |
import System.Drawing.Color | |
def CurveSlope(): | |
line_color = Rhino.ApplicationSettings.AppearanceSettings.FeedbackColor | |
dot_color = Rhino.ApplicationSettings.AppearanceSettings.TrackingColor | |
oref = rs.GetObject('Select a curve', 4, preselect=True, subobjects=True) | |
if not oref: return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Rhino | |
import rhinoscriptsyntax as rs | |
import scriptcontext as sc | |
import math | |
""" | |
rebuild arc segments of a polycurve | |
""" | |
def RebuildArc(arcCrv, deg): | |
pi = math.pi | |
a = arcCrv.Arc.Angle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Rhino | |
import rhinoscriptsyntax as rs | |
import scriptcontext as sc | |
import System | |
def polylcurve_from_polyline(pline): | |
segs = pline.GetSegments() | |
pc = Rhino.Geometry.PolyCurve() | |
for seg in segs: | |
pc.Append(Rhino.Geometry.LineCurve(seg)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Rhino | |
import rhinoscriptsyntax as rs | |
import scriptcontext as sc | |
""" | |
redistributes one curve along another by closest points. | |
""" | |
def MatchCurveStructure(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscriptsyntax as rs | |
import scriptcontext as sc | |
import Rhino | |
def FitTextToBoundary(): | |
""" | |
Get the BBs and center the text in the curve | |
Get the text BB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Rhino | |
import scriptcontext as sc | |
import rhinoscriptsyntax as rs | |
import System | |
import math | |
def PlaneAlignedBB(geo, plane): | |
wxy = Rhino.Geometry.Plane.WorldXY |
NewerOlder