Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)

src/r/h/rhinopython-HEAD/scripts/samples/advanced/MakeCircleWithRhinoCommon.py   rhinopython(Download)
  print "Got a point at ", pt
  # return a new Circle
  return Rhino.Geometry.Circle( pt, 1 )
 
# Add some points to the document that are on a circle

src/r/h/rhinopython-HEAD/scripts/rhinoscript/curve.py   rhinopython(Download)
    plane = rhutil.coerceplane(plane_or_center, False)
    if plane:
        circle = Rhino.Geometry.Circle(plane, radius)
        rc = scriptcontext.doc.Objects.AddCircle(circle)
    else:
        center = rhutil.coerce3dpoint(plane_or_center, True)
        view = scriptcontext.doc.Views.ActiveView
        plane = view.ActiveViewport.ConstructionPlane()
        plane.Origin = center
        circle = Rhino.Geometry.Circle(plane, radius)
    end = rhutil.coerce3dpoint(second, True)
    third = rhutil.coerce3dpoint(third, True)
    circle = Rhino.Geometry.Circle(start, end, third)
    rc = scriptcontext.doc.Objects.AddCircle(circle)
    if rc==System.Guid.Empty: raise Exception("Unable to add circle to document")
    if k<Rhino.RhinoMath.SqrtEpsilon: return scriptcontext.errorhandler()
    rv = cv / (k*k)
    circle = Rhino.Geometry.Circle(point, tangent, point + 2.0*rv)
    center = point + rv
    radius = circle.Radius

src/r/h/rhinopython-HEAD/scripts/rhinoscript/surface.py   rhinopython(Download)
        plane = Rhino.Geometry.Plane(base, normal)
        height = normal.Length
        circle = Rhino.Geometry.Circle(plane, radius)
        cylinder = Rhino.Geometry.Cylinder(circle, height)
    else:
        #base must be a plane
        if type(base) is Rhino.Geometry.Point3d: base = [base.X, base.Y, base.Z]
        base = rhutil.coerceplane(base, True)
        circle = Rhino.Geometry.Circle(base, radius)

src/l/a/ladybug-HEAD/src/ladybug_ladybug.py   ladybug(Download)
        if validCircle:
            # draw the circle base on these three points
            circle = rc.Geometry.Circle(*sunP)
            # intersect with the plan
            intersection = rc.Geometry.Intersect.Intersection.PlaneCircle(self.basePlane, circle)
    def drawBaseLines(self):
        circle1 = rc.Geometry.Circle(self.basePlane, self.scale)
        circle2 = rc.Geometry.Circle(self.basePlane, 1.03 * self.scale)
        lines= [] # will fix this part later. circles and lines will have different graphics
        lines.append(circle1.ToNurbsCurve())

src/r/h/rhinopython-HEAD/scripts/rhinoscript/line.py   rhinopython(Download)
    line = rhutil.coerceline(line, True)
    cylinder_plane = rhutil.coerceplane(cylinder_plane, True)
    circle = Rhino.Geometry.Circle( cylinder_plane, cylinder_radius )
    if not circle.IsValid: raise ValueError("unable to create valid circle with given plane and radius")
    cyl = Rhino.Geometry.Cylinder( circle, cylinder_height )

src/r/h/rhinopythonscripts-HEAD/GeomTools.py   rhinopythonscripts(Download)
        point = pointList[i]
        radius = radii[i]
        circles.append(Rhino.Geometry.Circle(point, radius))
    return circles