Esempio n. 1
0
 def _get_num_components(self):
     stdout, stderr = openscad.run(
         self.input_file,
         os.path.join(self.output_folder, 'dummy.png'),
         output_size=[1, 1],
         variables=self._get_variables({
             'render_3d': False,
             'render_index': 0,
         }),
         capture_output=True,
     )
     return openscad.extract_values(stderr)['num_components']
 def _get_num_components(self):
     stdout, stderr = openscad.run(
         self.input_file,
         os.path.join(self.output_folder, 'dummy.png'),
         output_size=[1,1],
         variables = self._get_variables({
             'render_3d': False,
             'render_index': 0,
         }),
         capture_output=True,
     )
     return openscad.extract_values(stderr)['num_components']
Esempio n. 3
0
 def _get_num_components(self):
     stdout, stderr = openscad.run(
         self.input_file,
         os.path.join(self.output_folder, 'dummy.png'),
         output_size=[1, 1],
         variables=self._get_variables({
             '_is_projection_rendering': True,
             'render_3d': False,
             'render_index': 0,
         }),
         capture_output=True,
     )
     outputs = openscad.extract_values(stderr)
     for key, value in outputs.items():
         if key.startswith('debug_'):
             logging.debug('DEBUG VALUE %r = %r', key, value)
     return outputs['num_components']