Compute points on a edge using A3DCrvEvaluate
A3DSDKAdvancedTools.h — HOOPS Exchange 2023 documentation
A3DTopoEdgeData sData;
A3D_INITIALIZE_DATA(A3DTopoEdgeData, sData);
A3DTopoEdgeGet(pEdge, &sData);
const A3DCrvBase* p3DCurve = sData.m_p3dCurve;
double start = 0.0;
double end = 0.0;
if (sData.m_bHasTrimDomain)
{
start = sData.m_sInterval.m_dMin;
end = sData.m_sInterval.m_dMax;
}
else {
A3DIntervalData sInterval;
A3D_INITIALIZE_DATA(A3DIntervalData, sInterval);
A3DCrvGetInterval(p3DCurve, &sInterval);
start = sInterval.m_dMin;
end = sInterval.m_dMax;
}
// Compute 11 points on the edge
for (int i = 0; i < 11; ++i)
{
double param = start + i * 0.1 * (end - start);
A3DVector3dData vec;
A3D_INITIALIZE_DATA(A3DVector3dData, vec);
A3DCrvEvaluate(p3DCurve, param, 0, &vec);
}