示例#1
0
 def from_guid(cls, guid):
     obj = compas_rhino.find_object(guid)
     mesh = cls()
     mesh.guid = guid
     mesh.object = obj
     mesh.geometry = obj.Geometry
     return mesh
示例#2
0
文件: surface.py 项目: Licini/compas
 def from_guid(cls, guid):
     obj = compas_rhino.find_object(guid)
     surf = cls()
     surf.guid = guid
     surf.object = obj
     surf.geometry = obj.Geometry
     return surf
示例#3
0
 def from_guid(cls, guid):
     obj = compas_rhino.find_object(guid)
     point = cls()
     point.guid = guid
     point.object = obj
     point.geometry = obj.Geometry.Location
     return point
示例#4
0
 def from_guid(cls, guid):
     obj = compas_rhino.find_object(guid)
     curve = cls()
     curve.guid = obj.Id
     curve.object = obj
     curve.geometry = obj.Geometry
     return curve
示例#5
0
    def from_guid(cls, guid):
        """Construct a Rhino object wrapper from the GUID of an existing Rhino object.

        Parameters
        ----------
        guid : str
            The GUID of the Rhino object.

        Returns
        -------
        :class:`compas_rhino.geometry.BaseRhinoGeometry`
            The Rhino object wrapper.
        """
        obj = compas_rhino.find_object(guid)
        wrapper = cls()
        wrapper.guid = obj.Id
        wrapper.object = obj
        wrapper.geometry = obj.Geometry.Location
        return wrapper
示例#6
0
    def from_guid(cls, guid):
        """Construct a curve from the GUID of an existing Rhino curve object.

        Parameters
        ----------
        guid : str
            The GUID of the Rhino curve object.

        Returns
        -------
        curve : compas_rhino.geometry.RhinoCurve
            The wrapped curve.
        """
        obj = compas_rhino.find_object(guid)
        curve = cls()
        curve.guid = obj.Id
        curve.object = obj
        curve.geometry = obj.Geometry
        return curve
示例#7
0
 def guid(self, guid):
     self.object = compas_rhino.find_object(guid)