Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
A3DTopoEdgeData sData;
A3D_INITIALIZE_DATA(A3DTopoEdgeData, sData);
A3DTopoEdgeGet(pEdge, &sData);
const A3DCrvBase* p3DCurve = nullptr;
if (sData.m_p3dCurve != nullptr)
		p3DCurve = sData.m_p3dCurve;
else
{  
	const A3DEntity* pBrep; // A3DRiBrepModel
	A3DRiBrepModelData sRiBrepData;
	A3D_INITIALIZE_DATA(A3DRiBrepModelData, sRiBrepData);
	A3DRiBrepModelGet(pBrep, &sRiBrepData);
	A3DTopoEdgeGetOrCompute3DCurve(sRiBrepData.m_pBrepData, pEdge, &p3DCurve);
}
if (p3DCurve)
{
	double curveLength = 0.0;
	A3DCurveLength(p3DCurve, sData.m_bHasTrimDomain ? &sData.m_sInterval : NULL, &curveLength);
    // Apply A3DTopoBodyDataA3DTopoContextData::m_dScale, scale of representation item and product occurence
    doubel edgelength = curveLength * scale;
}					

...