Merge remote-tracking branch 'origin/master' into boundarylayer_fixes

This commit is contained in:
Matthias Hochsteger 2024-01-22 17:02:48 +01:00
commit 54b92f4bdd
2 changed files with 9 additions and 15 deletions

View File

@ -95,7 +95,7 @@ namespace ngcore
throw ngcore::Exception(__FILE__ ":" NETGEN_CORE_NGEXEPTION_STR(__LINE__) "\t: shape don't match"); }
#define NETGEN_CHECK_SAME(a,b) \
{ if(a != b) \
throw ngcore::Exception(__FILE__ ":" NETGEN_CORE_NGEXEPTION_STR(__LINE__) "\t: not the same, a="+ToString(a) + ", b="+ToString(b)); }
throw ngcore::Exception(__FILE__ ":" NETGEN_CORE_NGEXEPTION_STR(__LINE__) "\t: not the same, a="+ToString(a) + ", b="+ToString(b) + GetBackTrace()); }
#define NETGEN_NOEXCEPT
#else // defined(NETGEN_ENABLE_CHECK_RANGE) && !defined(__CUDA_ARCH__)
#define NETGEN_CHECK_RANGE(value, min, max)

View File

@ -1233,20 +1233,14 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
// Handle(TopoDS_Face) face = e.Current();
fmap.Add(face);
ExtractFaceData(face, index, p, n, box);
auto & props = OCCGeometry::GetProperties(face);
if(props.col)
{
auto & c = *props.col;
colors.append(py::make_tuple(c[0], c[1], c[2]));
}
else
colors.append(py::make_tuple(0.0, 1.0, 0.0));
if(props.name)
{
names.append(*props.name);
}
else
names.append("");
ShapeProperties props;
if(OCCGeometry::HaveProperties(face))
props = OCCGeometry::GetProperties(face);
auto c = props.GetColor();
colors.append(py::make_tuple(c[0], c[1], c[2], c[3]));
names.append(props.GetName());
index++;
}