Пример #1
0
    def select_vertex(self, message="Select one vertex."):
        """Select one vertex of the mesh.

        Returns
        -------
        int
            A vertex identifier.
        """
        guid = compas_rhino.select_point(message=message)
        if guid and guid in self.guid_vertex:
            return self.guid_vertex[guid]
Пример #2
0
    def select_node(self, message="Select vertices."):
        """Select vertices of the volmesh.

        Returns
        -------
        list
            A list of vertex identifiers.
        """
        guid = compas_rhino.select_point(message=message)
        if guid and guid in self.guid_node:
            return self.guid_node[guid]
Пример #3
0
    def from_selection(cls):
        """Construct as point wrapper from a selected point object.

        Parameters
        ----------
        None

        Returns
        -------
        :class:`compas_rhino.geometry.RhinoPoint`
            The wrapped point.
        """
        guid = compas_rhino.select_point()
        return cls.from_guid(guid)
Пример #4
0
def RunCommand(is_interactive):
    scene = get_scene()
    if not scene:
        return

    guids = compas_rhino.select_point()
    if not guids:
        return

    pt = compas_rhino.get_point_coordinates([guids])[0]
    skeleton = Skeleton.from_center_point(pt)
    if not skeleton:
        return

    compas_rhino.delete_objects([guids])

    rhinoskeleton = scene.add(skeleton, 'skeleton')
    rhinoskeleton.dynamic_draw_self()
    rhinoskeleton.draw_self()
Пример #5
0
 def from_selection(cls):
     guid = compas_rhino.select_point()
     return cls.from_guid(guid)