For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

sample (u,v) points form IGES file

davood ansari's picture

I am very new to OCC and also very much lost.
What I need is to be able to access individual surfaces in an IGES file
and to be able to sample point on their surface.

I used some of the codes on the forum to cook the following chunk of code:

IGESControl_Reader::IGESControl_Reader aReader;
IFSelect_ReturnStatus stat=aReader.ReadFile("intake.iges");
Handle(TColStd_HSequenceOfTransient) aListInit=aReader.GiveList("iges-faces");

std::cout Length() ;

// transfert all the iges entity
TopTools_SequenceOfShape listOfShapes;
for (int j=1; jLength(); j++)
Handle(IGESData_IGESEntity) igesEntity=Handle(IGESData_IGESEntity)::DownCast(aListInit->Value(j));
std::cout >>>>>>>>>>>>>>. "

Handle(TCollection_HAsciiString) aLabel;
if (igesEntity->HasShortLabel())
std::cout ShortLabel() ;

if (!igesEntity.IsNull())
aReader.ClearShapes () ;
bool isTransfered=aReader.TransferEntity(igesEntity);
TopoDS_Shape aShape=aReader.OneShape();

can somebody tell me how to complete the code ?
Kindly advise

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.