Class SvgSerializer

Inheritance Relationships

Base Type

Class Documentation

class SvgSerializer : public GeometrySerializer

Public Types

typedef std::pair<std::string, std::vector<util::string_buffer>> path_object
typedef std::vector<boost::shared_ptr<util::string_buffer::float_item>> float_item_list

Public Functions

SvgSerializer(const std::string &out_filename, const SerializerSettings &settings)
void addXCoordinate(const boost::shared_ptr<util::string_buffer::float_item> &fi)
void addYCoordinate(const boost::shared_ptr<util::string_buffer::float_item> &fi)
void addSizeComponent(const boost::shared_ptr<util::string_buffer::float_item> &fi)
void growBoundingBox(double x, double y)
void writeHeader()
bool ready()
void write(const IfcGeom::TriangulationElement<real_t>*)
void write(const IfcGeom::BRepElement<real_t> *o)
void write(path_object &p, const TopoDS_Wire &wire)
void write(const geometry_data &data)
path_object &start_path(const gp_Pln &p, IfcUtil::IfcBaseEntity *storey, const std::string &id)
path_object &start_path(const gp_Pln &p, const std::string &drawing_name, const std::string &id)
bool isTesselated() const
void finalize()
void setUnitNameAndMagnitude(const std::string&, float)
void setFile(IfcParse::IfcFile *f)
void setBoundingRectangle(double width, double height)
void setSectionHeight(double h, IfcUtil::IfcBaseEntity *storey = 0)
void setSectionHeightsFromStoreys(double offset = 1.)
void setPrintSpaceNames(bool b)
void setPrintSpaceAreas(bool b)
void setDrawDoorArcs(bool b)
std::array<std::array<double, 3>, 3> resize()
void resetScale()
void setSectionRef(const boost::optional<std::string> &s)
void setElevationRef(const boost::optional<std::string> &s)
void setAutoSection(bool b)
void setAutoElevation(bool b)
void setUseNamespace(bool b)
void setUseHlrPoly(bool b)
void setAlwaysProject(bool b)
void setScale(double s)
void setDrawingCenter(double x, double y)
std::string nameElement(const IfcUtil::IfcBaseEntity *storey, const IfcGeom::Element<real_t> *elem)
std::string nameElement(const IfcUtil::IfcBaseEntity *elem)
std::string idElement(const IfcUtil::IfcBaseEntity *elem)
std::string object_id(const IfcUtil::IfcBaseEntity *storey, const IfcGeom::Element<real_t> *o)

Protected Functions

void draw_hlr(const gp_Pln &pln, const drawing_key &drawing_name)
std::string writeMetadata(const drawing_meta &m)

Protected Attributes

std::ofstream svg_file
double xmin
double ymin
double xmax
double ymax
double width
double height
boost::optional<std::vector<section_data>> section_data_
boost::optional<std::vector<section_data>> deferred_section_data_
boost::optional<double> scale_
boost::optional<double> calculated_scale_
boost::optional<double> center_x_
boost::optional<double> center_y_
bool with_section_heights_from_storey_
bool rescale
bool print_space_names_
bool print_space_areas_
bool draw_door_arcs_
bool is_floor_plan_
bool auto_section_
bool auto_elevation_
bool use_namespace_
bool use_hlr_poly_
bool always_project_
IfcParse::IfcFile *file
IfcUtil::IfcBaseEntity *storey_
std::multimap<drawing_key, path_object, storey_sorter> paths
std::map<drawing_key, drawing_meta> drawing_metadata
std::map<IfcUtil::IfcBaseEntity*, hlr_t> storey_hlr
float_item_list xcoords
float_item_list ycoords
float_item_list radii
size_t xcoords_begin
size_t ycoords_begin
size_t radii_begin
boost::optional<std::string> section_ref_
boost::optional<std::string> elevation_ref_
std::list<geometry_data> element_buffer_
hlr_t hlr
std::string namespace_prefix_