Changeset 8962:7b2526198a2a in orange


Ignore:
Timestamp:
09/14/11 11:07:47 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
f3031f328433daa8ea7e3e12bd703afdb9749690
Message:

Fixed a bug in obj parsing

Location:
orange/OrangeWidgets/plot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/plot/owplot3d.py

    r8936 r8962  
    602602                #self.renderText(x,y,z, label, font=self._theme.labels_font) 
    603603            #else: 
    604             self.renderText(x,y,z, ('%f' % label).rstrip('0').rstrip('.'), 
     604            self.renderText(x,y,z, ('%.3f' % label).rstrip('0').rstrip('.'), 
    605605                            font=self._theme.labels_font) 
    606606 
  • orange/OrangeWidgets/plot/primitives/owprimitives3d.py

    r8802 r8962  
    8787        file_name = os.path.join(os.path.dirname(__file__), file_name) 
    8888    lines = open(file_name).readlines() 
    89     normals_lines =  filter(lambda line: line.startswith('vn'), lines) 
    90     vertices_lines = filter(lambda line: line.startswith('v'), lines) 
    91     faces_lines =    filter(lambda line: line.startswith('f'), lines) 
     89    normals_lines =  filter(lambda line: line.startswith('vn '), lines) 
     90    vertices_lines = filter(lambda line: line.startswith('v '), lines) 
     91    faces_lines =    filter(lambda line: line.startswith('f '), lines) 
    9292    normals =  [map(float, line.split()[1:]) for line in normals_lines] 
    9393    vertices = [map(float, line.split()[1:]) for line in vertices_lines] 
     
    144144 
    145145    lines = open(file_name).readlines() 
    146     vertices_lines = filter(lambda line: line.startswith('v'), lines) 
    147     edges_lines =    filter(lambda line: line.startswith('f'), lines) 
     146    vertices_lines = filter(lambda line: line.startswith('v '), lines) 
     147    edges_lines =    filter(lambda line: line.startswith('f '), lines) 
    148148    vertices = [map(float, line.split()[1:]) for line in vertices_lines] 
    149149    edges_indices = [map(int, line.split()[1:]) for line in edges_lines] 
Note: See TracChangeset for help on using the changeset viewer.