Please advise me that getting any "Tins" from "Face" or "Surface" ?

Please advise me that getting any "Tins" from "Face" or "Surface" ?

Anonymous
Not applicable
758 Views
3 Replies
Message 1 of 4

Please advise me that getting any "Tins" from "Face" or "Surface" ?

Anonymous
Not applicable

Since, I  can get any sample points by using "getSamplePoints(..)" method when working on "AcGeCurve3d".

I'd like to know how I can get any "Tins" from "Face" or "Surface", while I'm working on  "AcBrFace" or "AcGeSurface".

Please advise me.

Yours sincerely.

0 Likes
759 Views
3 Replies
Replies (3)
Message 2 of 4

Balaji_Ram
Alumni
Alumni

Hi Vianova,

 

Can you clarify what you mean by getting "Tins" ? You may attach some screenshot if that can help.

Even if I cant, it will help other experts viewing your question to answer it.

 

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 4

Anonymous
Not applicable

Hi,

 

Let me try to ask again here.

 

From AcGeCurve3d, I could get representative string line (without curve) within accuracy I give to function getSamplePoints().

 

With the same idea but for AcGeSurface or AcBrFace (or any curve surface).. can I get representative Triangle faces (without curve) within accuracy from any func or method ?
Please advise me.

Yours sincerely.

0 Likes
Message 4 of 4

Balaji_Ram
Alumni
Alumni

Hi Vianova,

 

Here is a sample code snippet that might help. The "evalPoint" method of the AcGeSurface might be the one you are looking for.

 

		AcDbSurface *pSurface = NULL;
		Acad::ErrorStatus es = acdbOpenAcDbEntity((AcDbEntity *&)pSurface, surfaceOid, AcDb::kForRead);
		if(es == Acad::eOk)
		{
			AcBr::ErrorStatus es;
			AcDbBody body;
			body.setBody(pSurface->body ());

			AcBrBrep brep;
			if((es = brep.set(body)) != AcBr::eOk)
				return;

			AcBrBrepFaceTraverser faceTrav;

			if((es = faceTrav.setBrep(brep)) != AcBr::eOk)
				return;

			for(faceTrav.restart();!faceTrav.done();faceTrav.next())
			{
				AcBrFace face;
				if(faceTrav.getFace(face) != AcBr::eOk)
					continue;

				AcGeSurface* pSurfaceGeometry = NULL;
				if((es = face.getSurface(pSurfaceGeometry)) != AcBr::eOk)
				{
					return;
				}

				AcGePoint2d param(pSurfaceGeometry->paramOf(AcGePoint3d(2.5, 2.5, 0.0)));
				AcGePoint3d pt(pSurfaceGeometry->evalPoint(param)); 
				acutPrintf(ACRX_T("(%lf, %lf, %lf)"), pt.x, pt.y, pt.z);

				delete pSurfaceGeometry;
			}
		}
		pSurface->close();

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes