Mon, 05/16/2022 - 08:18
Forums:
I have read a step file,and then i wanted to display the dimension.
A error occured when i was constructing PrsDim_DiameterDimension
...
//Get the dimension from the dimension label.
//Handle(XCAFDoc_Dimension) Target
if(Target->GetObject()->GetPath().IsNull())
{
ConsoleLog("Is Null");
}
//Display the dimension
aViewer.Context()->Display(new PrsDim_DiameterDimension(Target->GetObject()->GetPath()),true);
The log such as:
Is Null
The include file XCAFDimTolObjects_DimensionObject
:
//! Access object to store dimension data
class XCAFDimTolObjects_DimensionObject : public Standard_Transient
{
public:
...
//! Returns a 'curve' along which the dimension is measured.
Standard_EXPORT TopoDS_Edge GetPath() const;
...
}