Link Search Menu Expand Document

CLASSIFIER : GRImportedFile

uid: class-GRIMPORTEDFILE-CVEViewer-MetaModel@g-scop.grenoble-inp.fr

About

Abstract

A GROBJFile is a graphic node visualizing a polyhedron imported from a file. Wavefront files are managed and may include the polyhedron and its texture or material definition.

GROBJFile

To create a GROBJFile just call:

notebook=cve.viewer.GROBJFile(filename=None)

where :

  • filename : obj file to import

When creating such a node the filename is automatically scanned to integrate potential material file.

GROBJFile replaces GRImportedFile## Class Diagram

Class diagram of class of GRImportedFile.

Inherits

attribute type cardinality
file vfile [1,1]
attached vfile [0,-1]
texture TEXTURE [1,1]
texture-use vboolean [1,1]
group-color vstring [1,1]

Methods

  • set_file(self,..) : set filename < filename
  • get_file(self,..) : get file path > file
  • attach_file(self,..) : attach filename as a secondary ressource for the model example obj files may be associated with materiel and pictures for textures < filename
  • get_attached_files(self,..) : get list of attached files > the list
  • set_group_color(self,..) :

          Set the color of a sub group
          group color attribute is a string representing a dictionary with a given color as key and a set of group indices as values.
          :param self:
          :param group: group name
          :param color: color : if None group will come back to global color
          :return:
    
  • get_group_color(self,..) :

          get specific color of a give group
          :param self:
          :param group: group name
          :return:
    
  • unset_all_groups_color(self,..) :

          remove any subgroup color : default value indeed