MCPcopy Create free account
hub / github.com/ThatOpen/engine_web-ifc / makeSVGLines

Function makeSVGLines

src/cpp/test/io_helpers.cpp:128–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126 }
127
128 std::string makeSVGLines(SVGDrawing drawing)
129 {
130 glm::dvec2 size(2048, 2048);
131 glm::dvec2 offset(5, 5);
132
133 Bounds bounds = drawing.GetBounds(size, offset);
134
135 std::stringstream svg;
136
137 svg << "<svg width=\"" << size.x + offset.x * 2 << "\" height=\"" << size.y + offset.y * 2 << " \" xmlns=\"http://www.w3.org/2000/svg\">";
138
139 for (auto &set : drawing.sets)
140 {
141 SVGLinesToString(bounds, size, offset, set, svg);
142 }
143
144 svg << "</svg>";
145
146 return svg.str();
147 }
148
149 std::string ToObj(const webifc::geometry::IfcGeometry &geom, size_t &offset, glm::dmat4 transform, double inputScale)
150 {

Callers 2

DumpSVGCurveFunction · 0.70
DumpSVGLinesFunction · 0.70

Calls 6

sizeMethod · 0.80
SVGLinesToStringFunction · 0.70
rescaleFunction · 0.70
getBoundsFunction · 0.70
svgMakeLineFunction · 0.70
GetBoundsMethod · 0.45

Tested by

no test coverage detected