mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Remember your own conventions: lines run along positive Z
This commit is contained in:
@@ -83,7 +83,7 @@ namespace {
|
|||||||
|
|
||||||
curve_creation_visitor_result_type operator()(const taxonomy::line::ptr& l) {
|
curve_creation_visitor_result_type operator()(const taxonomy::line::ptr& l) {
|
||||||
const auto& m = l->matrix->ccomponents();
|
const auto& m = l->matrix->ccomponents();
|
||||||
return result = Handle(Geom_Curve)(new Geom_Line(OpenCascadeKernel::convert_xyz2<gp_Pnt>(m.col(3)), OpenCascadeKernel::convert_xyz2<gp_Dir>(m.col(0))));
|
return result = Handle(Geom_Curve)(new Geom_Line(OpenCascadeKernel::convert_xyz2<gp_Pnt>(m.col(3)), OpenCascadeKernel::convert_xyz2<gp_Dir>(m.col(2))));
|
||||||
}
|
}
|
||||||
|
|
||||||
curve_creation_visitor_result_type operator()(const taxonomy::circle::ptr& c) {
|
curve_creation_visitor_result_type operator()(const taxonomy::circle::ptr& c) {
|
||||||
@@ -198,7 +198,15 @@ bool OpenCascadeKernel::convert(const taxonomy::loop::ptr loop, TopoDS_Wire& wir
|
|||||||
TopTools_ListOfShape converted_segments;
|
TopTools_ListOfShape converted_segments;
|
||||||
|
|
||||||
for (auto& segment : loop->children) {
|
for (auto& segment : loop->children) {
|
||||||
auto segment_wire = boost::get<TopoDS_Wire>(convert_curve(this, segment));
|
TopoDS_Wire segment_wire;
|
||||||
|
try {
|
||||||
|
segment_wire = boost::get<TopoDS_Wire>(convert_curve(this, segment));
|
||||||
|
} catch (...) {
|
||||||
|
// @todo we should do some better logging here and catch specific exceptions
|
||||||
|
// but most notably we just want to continue processing when there are
|
||||||
|
// duplicate vertices in our loop (or remove them earlier in the mapping?).
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef IFOPSH_DEBUG
|
#ifdef IFOPSH_DEBUG
|
||||||
std::ostringstream o;
|
std::ostringstream o;
|
||||||
|
|||||||
Reference in New Issue
Block a user