Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4140

Brep.Split returns Runtime Error: Multiple targets could match

$
0
0

Heya!

I’m quite new to scripting, trying to work with rhinocommon as exclusively as I can.
Now I’m creating a circle in the center of a Brep and then trying to extend lines to cut that Brep, the split command returns the Runtime Error:

Runtime error (ArgumentTypeException): Multiple targets could match: Split(IEnumerable[Curve], float), Split(IEnumerable[Brep], float)

Traceback:
  line 30, in script

This is the code:

import rhinoscriptsyntax as rs
import Rhino.Geometry as rg
import scriptcontext as sc

#Find Centroid and Circle to Curve
centroidPlot = rg.AreaMassProperties.Compute(srfs).Centroid
centCirc = rg.Circle(centroidPlot, 2)
circNurb = rg.Circle.ToNurbsCurve(centCirc)
circNurb.Domain = rg.Interval(0, 1)
rep = rg.NurbsCurve.PointAt(circNurb, 0.5)

#Domain
domain = rg.Interval(0, 1)

circDiv = rg.Curve.DivideByCount(circNurb, 10, True)

divPts = []
divLines = []

for pt in circDiv:
    divPt = rg.Curve.PointAt(circNurb, pt)
    divPts.append(divPt)
    divLine = rg.Line(centroidPlot, divPt)
    divLines.append(divLine)

for srf in srfs:
    rg.Brep.Split(srf, divLines, 0.001)

Thanks a lot!

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4140

Trending Articles