Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Compute points on a edge using A3DCrvEvaluate
https://docs.techsoft3d.com/exchange/latest/api/A3DSDKAdvancedTools_8h.html?highlight=a3dcrvevaluate#_CPPv414A3DCrvEvaluatePK10A3DCrvBase9A3DDouble8A3DUns32P15A3DVector3dData

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);
}
  • No labels