MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / readShapeColors_

Method readShapeColors_

source/MRIOExtras/MRStep.cpp:408–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406private:
407#ifdef MRIOEXTRAS_OPENCASCADE_USE_XDE
408 std::pair<std::optional<Color>, std::optional<Color>> readShapeColors_( const TopoDS_Shape& shape ) const
409 {
410 std::optional<Color> faceColor, edgeColor;
411#if STEP_LOAD_COLORS
412 Quantity_ColorRGBA color;
413 if ( colorTool_->GetColor( shape, XCAFDoc_ColorGen, color ) )
414 faceColor = edgeColor = toColor( color );
415 if ( colorTool_->GetColor( shape, XCAFDoc_ColorSurf, color ) )
416 faceColor = toColor( color );
417 if ( colorTool_->GetColor( shape, XCAFDoc_ColorCurv, color ) )
418 edgeColor = toColor( color );
419#endif
420 return { faceColor, edgeColor };
421 }
422
423 std::string resolveSplitBodyName_( const TopoDS_Shape& bodyShape, const std::string& fallbackName ) const
424 {

Callers

nothing calls this directly

Calls 1

toColorFunction · 0.85

Tested by

no test coverage detected