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

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

src/r/h/rhinopython-HEAD/scripts/rhinoscript/curve.py   rhinopython(Download)
    curve = rhutil.coercecurve(curve_id, -1, True)
    tol = scriptcontext.doc.ModelAbsoluteTolerance
    mp = Rhino.Geometry.AreaMassProperties.Compute(curve, tol)
    return mp.Area, mp.AreaError
 
    curve = rhutil.coercecurve(curve_id, -1, True)
    tol = scriptcontext.doc.ModelAbsoluteTolerance
    mp = Rhino.Geometry.AreaMassProperties.Compute(curve, tol)
    return mp.Centroid, mp.CentroidError
 

src/r/h/rhinopython-HEAD/scripts/rhinoscript/mesh.py   rhinopython(Download)
        mesh = rhutil.coercemesh(id, True)
        if mesh:
            mp = Rhino.Geometry.AreaMassProperties.Compute(mesh)
            if mp:
                meshes_used += 1
    """
    mesh = rhutil.coercemesh(object_id, True)
    mp = Rhino.Geometry.AreaMassProperties.Compute(mesh)
    if mp is None: return scriptcontext.errorhandler()
    return mp.Centroid

src/h/o/Honeybee-HEAD/src/Honeybee_Separate By Normal.py   Honeybee(Download)
    def getSrfCenPtandNormal(surface):
        MP = rc.Geometry.AreaMassProperties.Compute(surface)
        area = None
        if MP:
            centerPt = MP.Centroid

src/h/o/Honeybee-HEAD/src/Honeybee_Glazing based on ratio.py   Honeybee(Download)
    def getAreaAndCenPt(surface):
        MP = rc.Geometry.AreaMassProperties.Compute(surface)
        if MP:
            area = MP.Area
            centerPt = MP.Centroid

src/r/h/rhinopython-HEAD/scripts/rhinoscript/surface.py   rhinopython(Download)
        surface = rhutil.coercesurface(object_id)
        if surface is None: return None
    if area==True: return Rhino.Geometry.AreaMassProperties.Compute(surface)
    if not surface.IsSolid: return None
    return Rhino.Geometry.VolumeMassProperties.Compute(surface)

src/r/h/rhinopython-HEAD/scripts/rhinoscript/geometry.py   rhinopython(Download)
def Area(object_id):
    "Compute the area of a closed curve, hatch, surface, polysurface, or mesh"
    rhobj = rhutil.coercerhinoobject(object_id, True, True)
    mp = Rhino.Geometry.AreaMassProperties.Compute(rhobj.Geometry)
    if mp is None: raise Exception("unable to compute area mass properties")

src/h/o/Honeybee-HEAD/src/Honeybee_Honeybee.py   Honeybee(Download)
 
        """check normal direction of the surfaces"""
        MP3D = rc.Geometry.AreaMassProperties.Compute(self.geometry)
        self.cenPt = MP3D.Centroid
        MP3D.Dispose()

src/l/a/ladybug-HEAD/src/Ladybug_Sky Dome.py   ladybug(Download)
            newPatch.Translate(movingVector) # move it to the right place
            movedSkyPatches.append(newPatch)
            MP = rc.Geometry.AreaMassProperties.Compute(newPatch)
            patchCenPt = MP.Centroid
            area = MP.Area

src/l/a/ladybug-HEAD/src/Ladybug_Shadow Study.py   ladybug(Download)
def getMeshCenter(mesh):
    mp = rc.Geometry.AreaMassProperties.Compute(mesh)
    return mp.Centroid
 
def findDiscontinuity(curve, style, includeEndPts = True):

src/l/a/ladybug-HEAD/src/Ladybug_Shading Mask.py   ladybug(Download)
    def getRayVector(brep, testPt):
        MP = rc.Geometry.AreaMassProperties.Compute(brep)
        centerPt = MP.Centroid
        vector = rc.Geometry.Vector3d(centerPt - testPt)
        return vector

  1 | 2  Next