stl_read.c File Reference
#include "common.h"
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "bnetwork.h"
#include "bio.h"
#include "bu/cv.h"
#include "bu/getopt.h"
#include "bu/units.h"
#include "vmath.h"
#include "nmg.h"
#include "rtgeom.h"
#include "raytrace.h"
#include "wdb.h"
#include "../../plugin.h"
Include dependency graph for stl_read.c:

Go to the source code of this file.


#define BOT_FBLOCK   128
#define MAX_LINE_SIZE   512


void Add_face (int face[3])
void mk_unique_brlcad_name (struct bu_vls *name)
void lswap (unsigned int *v)
HIDDEN int gcv_stl_read (const char *path, struct rt_wdb *wdbp, const struct gcv_opts *options)


const struct gcv_plugin_info gcv_plugin_conv_stl_read = {converters}

Detailed Description

Convert Stereolithography format files to BRL-CAD .g binary format

Note that binary STL format use a little-endian byte ordering where bytes at lower addresses have lower significance.

Definition in file stl_read.c.

Macro Definition Documentation

#define BOT_FBLOCK   128

Definition at line 73 of file stl_read.c.

Referenced by Add_face().

#define MAX_LINE_SIZE   512

Definition at line 75 of file stl_read.c.

Function Documentation

void Add_face ( int  face[3])

Definition at line 79 of file stl_read.c.

References BOT_FBLOCK, bu_malloc(), and bu_realloc().

Here is the call graph for this function:

void mk_unique_brlcad_name ( struct bu_vls name)

Definition at line 96 of file stl_read.c.

References bu_vls_addr(), bu_vls_strcat(), bu_vls_strlen(), bu_vls_trunc(), db_lookup(), rt_wdb::dbip, LOOKUP_QUIET, and RT_DIR_NULL.

Here is the call graph for this function:

void lswap ( unsigned int *  v)

Definition at line 402 of file stl_read.c.

References OSL::Strings::v.

Referenced by _ged_bot_dump(), ged_bot_dump(), and ged_dbot_dump().

HIDDEN int gcv_stl_read ( const char *  path,
struct rt_wdb wdbp,
const struct gcv_opts options 

Definition at line 602 of file stl_read.c.

References BN_TOL_MAGIC, bu_exit(), BU_LIST_INIT, bu_log(), create_vert_tree(), bn_tol::dist, bn_tol::dist_sq, wmember::l, bn_tol::magic, mk_lcomb, bn_tol::para, and bn_tol::perp.

Here is the call graph for this function:

Variable Documentation

const struct gcv_plugin_info gcv_plugin_conv_stl_read = {converters}

Definition at line 656 of file stl_read.c.