#1153 --svg-without-storeys and correct positioning and scale based on annotation block

This commit is contained in:
Thomas Krijnen
2021-04-18 15:03:28 +02:00
parent 776c68e2b0
commit bb6312e174
3 changed files with 53 additions and 6 deletions
+9 -2
View File
@@ -136,9 +136,9 @@ protected:
double xmin, ymin, xmax, ymax;
boost::optional<std::vector<section_data>> section_data_;
boost::optional<std::vector<section_data>> deferred_section_data_;
boost::optional<double> scale_, calculated_scale_, center_x_, center_y_, scale_backup_;
boost::optional<double> scale_, calculated_scale_, center_x_, center_y_;
boost::optional<double> storey_height_line_length_;
boost::optional<std::pair<double, double>> size_, size_backup_;
boost::optional<std::pair<double, double>> size_, offset_2d_;
boost::optional<std::string> space_name_transform_;
bool with_section_heights_from_storey_, print_space_names_, print_space_areas_;
@@ -146,6 +146,7 @@ protected:
bool draw_door_arcs_, is_floor_plan_;
bool auto_section_, auto_elevation_;
bool use_namespace_, use_hlr_poly_, always_project_, polygonal_;
bool emit_building_storeys_;
IfcParse::IfcFile* file;
IfcUtil::IfcBaseEntity* storey_;
@@ -189,6 +190,7 @@ public:
, use_hlr_poly_(false)
, always_project_(false)
, polygonal_(false)
, emit_building_storeys_(true)
, file(0)
, storey_(0)
, xcoords_begin(0)
@@ -201,6 +203,7 @@ public:
void addSizeComponent(const boost::shared_ptr<util::string_buffer::float_item>& fi) { radii.push_back(fi); }
void growBoundingBox(double x, double y) { if (x < xmin) xmin = x; if (x > xmax) xmax = x; if (y < ymin) ymin = y; if (y > ymax) ymax = y; }
void writeHeader();
void doWriteHeader();
bool ready();
void write(const IfcGeom::TriangulationElement<real_t>* /*o*/) {}
void write(const IfcGeom::BRepElement<real_t>* o);
@@ -258,6 +261,10 @@ public:
always_project_ = b;
}
void setWithoutStoreys(bool b) {
emit_building_storeys_ = !b;
}
void setScale(double s) { scale_ = s; }
void setDrawingCenter(double x, double y) {
center_x_ = x; center_y_ = y;