File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,11 +58,20 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve* inst) {
5858 if (crv->kind () == taxonomy::EDGE) {
5959 auto ecrv = taxonomy::cast<taxonomy::edge>(crv);
6060 loop->children .push_back (ecrv);
61- }
62- else if (crv->kind () == taxonomy::LOOP) {
61+ } else if (crv->kind () == taxonomy::LOOP) {
6362 for (auto & s : taxonomy::cast<taxonomy::loop>(crv)->children ) {
6463 loop->children .push_back (s);
6564 }
65+ } else if ((crv->kind () == taxonomy::CIRCLE || crv->kind () == taxonomy::ELLIPSE) && segments->size () == 1 ) {
66+ // A circle or ellipse segment is a full circle/ellipse, only possible when it is the only segment
67+ std::shared_ptr<taxonomy::edge> e = std::make_shared<taxonomy::edge>();
68+ e->basis = crv;
69+ e->start = 0.0 ;
70+ e->end = 2.0 * boost::math::constants::pi<double >();
71+ loop->children .push_back (e);
72+ } else {
73+ Logger::Warning (" Unexpected segment type" , segment);
74+ return nullptr ;
6675 }
6776 }
6877 }
You can’t perform that action at this time.
0 commit comments