Blender V4.3
blender::io::stl Namespace Reference

Classes

struct  Expectation
 
class  FileWriter
 
struct  PackedTriangle
 
class  stl_importer_test
 
class  STLExportTest
 
class  STLMeshHelper
 
class  StringBuffer
 
class  Triangle
 

Functions

void export_frame (Depsgraph *depsgraph, float scene_unit_scale, const STLExportParams &export_params)
 
void exporter_main (const bContext *C, const STLExportParams &export_params)
 
void stl_import_report_error (FILE *file)
 
Meshread_stl_file (const STLImportParams &import_params)
 
void importer_main (const bContext *C, const STLImportParams &import_params)
 
void importer_main (Main *bmain, Scene *scene, ViewLayer *view_layer, const STLImportParams &import_params)
 
static void parse_float3 (StringBuffer &buf, float3 &out)
 
Meshread_stl_ascii (const char *filepath, const bool use_custom_normals)
 
Meshread_stl_binary (FILE *file, const bool use_custom_normals)
 
static std::string read_temp_file_in_string (const std::string &file_path)
 
 TEST_F (STLExportTest, all_tris)
 
 TEST_F (STLExportTest, all_quads)
 
 TEST_F (STLExportTest, non_uniform_scale)
 
 TEST_F (STLExportTest, cubes_positioned)
 
 TEST_F (stl_importer_test, all_quads)
 
 TEST_F (stl_importer_test, cubes_positioned)
 
 TEST_F (stl_importer_test, non_uniform_scale)
 

Variables

constexpr size_t BINARY_HEADER_SIZE = 80
 
constexpr size_t BINARY_STRIDE = sizeof(PackedTriangle)
 
constexpr bool save_failing_test_output = false
 

Detailed Description

ASCII STL spec:

solid name
  facet normal ni nj nk
    outer loop
      vertex v1x v1y v1z
      vertex v2x v2y v2z
      vertex v3x v3y v3z
    endloop
  endfacet
  ...
endsolid name

Function Documentation

◆ export_frame()

◆ exporter_main()

◆ importer_main() [1/2]

void blender::io::stl::importer_main ( const bContext * C,
const STLImportParams & import_params )

◆ importer_main() [2/2]

◆ parse_float3()

static void blender::io::stl::parse_float3 ( StringBuffer & buf,
float3 & out )
inlinestatic

Definition at line 107 of file stl_import_ascii_reader.cc.

References blender::io::stl::StringBuffer::parse_float().

Referenced by read_stl_ascii().

◆ read_stl_ascii()

◆ read_stl_binary()

◆ read_stl_file()

◆ read_temp_file_in_string()

static std::string blender::io::stl::read_temp_file_in_string ( const std::string & file_path)
static

◆ stl_import_report_error()

void blender::io::stl::stl_import_report_error ( FILE * file)

Definition at line 39 of file stl_import.cc.

Referenced by read_stl_binary(), and read_stl_file().

◆ TEST_F() [1/7]

blender::io::stl::TEST_F ( stl_importer_test ,
all_quads  )

Definition at line 110 of file stl_importer_tests.cc.

◆ TEST_F() [2/7]

blender::io::stl::TEST_F ( stl_importer_test ,
cubes_positioned  )

Definition at line 116 of file stl_importer_tests.cc.

◆ TEST_F() [3/7]

blender::io::stl::TEST_F ( stl_importer_test ,
non_uniform_scale  )

Definition at line 122 of file stl_importer_tests.cc.

◆ TEST_F() [4/7]

blender::io::stl::TEST_F ( STLExportTest ,
all_quads  )

Definition at line 116 of file stl_exporter_tests.cc.

References SEP_STR.

◆ TEST_F() [5/7]

blender::io::stl::TEST_F ( STLExportTest ,
all_tris  )

Definition at line 110 of file stl_exporter_tests.cc.

References SEP_STR.

◆ TEST_F() [6/7]

blender::io::stl::TEST_F ( STLExportTest ,
cubes_positioned  )

Definition at line 128 of file stl_exporter_tests.cc.

References SEP_STR.

◆ TEST_F() [7/7]

blender::io::stl::TEST_F ( STLExportTest ,
non_uniform_scale  )

Definition at line 122 of file stl_exporter_tests.cc.

References SEP_STR.

Variable Documentation

◆ BINARY_HEADER_SIZE

size_t blender::io::stl::BINARY_HEADER_SIZE = 80
inlineconstexpr

◆ BINARY_STRIDE

size_t blender::io::stl::BINARY_STRIDE = sizeof(PackedTriangle)
inlineconstexpr

Definition at line 22 of file stl_data.hh.

Referenced by read_stl_file().

◆ save_failing_test_output

bool blender::io::stl::save_failing_test_output = false
constexpr