Beispiel #1
0
def curvePlnrNormalAtEnds(crv):
    up = (0, 0, 1)
    dom = rs.CurveDomain(crv)
    t0 = dom[0]
    t1 = dom[1]

    pln0 = rs.CurvePerpFrame(crv, t0)
    pln1 = rs.CurvePerpFrame(crv, t1)

    n0 = rs.VectorCrossProduct(pln0.ZAxis, up)
    n1 = rs.VectorCrossProduct(pln1.ZAxis, up)

    return n0, n1
Beispiel #2
0
 def transf_t(t, r, s):
     plane = rh.CurvePerpFrame(path, rh.CurveParameter(path, t))
     xform = rh.XformChangeBasis(plane, geo.Plane.WorldXY)
     xform = rh.XformMultiply(xform, rh.XformScale(s))
     xform = rh.XformMultiply(
         xform, geo.Transform.Rotation(r, geo.Vector3d(0, 0, 1), rawu0))
     return rh.TransformObject(profile, xform, True)
 def getVector(self):
     print self.Course.getCurve()
     print self.curveParameter, "----"
     print rs.CurvePerpFrame(self.Course.getCurve(), self.curveParameter)
     print rs.CurveTangent(self.Course.getCurve(), self.curveParameter)
z = []

for i in range(0, 25):
    x.append(rd.uniform(4, 7))
    y.append(rd.uniform(3, 5))
    z.append(rd.uniform(40, 150))

lineaire = x, y, z

# Intersection des perp frame de l'axe avec la surface

DomAxe = []
DomAxe = rs.CurveDomain(Axe)

OrigineAxe = rs.EvaluateCurve(Axe, DomAxe[0])
cutplane = rs.CurvePerpFrame(Axe, DomAxe[0])

clength = []

if cutplane:
    planesrf = rs.AddPlaneSurface(cutplane, 100, 100)
    curves = rs.IntersectBreps(srf, planesrf)
    rs.DeleteObject(planesrf)
    clength = rs.CurveLength(curves)

#Best Candidate
bat_Util = []

for j in range(len(z) - 1):
    bat_Util.append(0)