コード例 #1
0
ファイル: mesh.py プロジェクト: rjodon-compas-forks/compas
 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
ファイル: point.py プロジェクト: rutvik-deshpande/compas
    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)