本文整理汇总了C++中ACRX_T函数的典型用法代码示例。如果您正苦于以下问题:C++ ACRX_T函数的具体用法?C++ ACRX_T怎么用?C++ ACRX_T使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ACRX_T函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getNativeCurve
// Utility function to extract a useful, bounded curve with native
// curve definition data, from the external (bounded) curve
AcBr::ErrorStatus
getNativeCurve(const AcBrEdge& edgeEntity,
AcGeCurve3d*& curveGeometry,
AcGeCurve3d*& nativeGeometry)
{
AcBr::ErrorStatus returnValue = edgeEntity.getCurve(curveGeometry);
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in AcBrEdge::getCurve:"));
errorReport(returnValue);
return returnValue;
}
if (curveGeometry == NULL) {
acutPrintf(ACRX_T("\n getNativeCurve: external 3d curve is undefined\n"));
returnValue = AcBr::eMissingGeometry;
return returnValue;
}
if (curveGeometry->type() != kExternalCurve3d) {
acutPrintf(ACRX_T("\n getNativeCurve: curve is not an external 3d curve\n"));
returnValue = AcBr::eMissingGeometry;
return returnValue;
}
if (!((AcGeExternalCurve3d*)curveGeometry)->isDefined()) {
acutPrintf(ACRX_T("\n getNativeCurve: external 3d curve is undefined\n"));
returnValue = AcBr::eMissingGeometry;
return returnValue;
}
if (!((AcGeExternalCurve3d*)curveGeometry)->isNativeCurve(nativeGeometry)
|| (nativeGeometry == NULL)) {
acutPrintf(ACRX_T("\n getNativeCurve: native 3d curve is undefined\n"));
returnValue = AcBr::eMissingGeometry;
return returnValue;
}
return returnValue;
}
示例2: getNativeParamCurve
// Utility function to extract a useful 2d nurb curve with native
// definition data, from the external paramcurve
AcBr::ErrorStatus
getNativeParamCurve(const AcBrLoopEdgeTraverser& loopEdge,
AcGeCurve2d*& pcurveGeometry,
AcGeNurbCurve2d& nurbGeometry)
{
AcBr::ErrorStatus returnValue = loopEdge.getParamCurve(pcurveGeometry);
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in AcBrLoopEdgeTraverser::getParamCurve:"));
errorReport(returnValue);
return returnValue;
}
if (pcurveGeometry == NULL) {
acutPrintf(ACRX_T("\n getNativeParamCurve: external param curve is undefined\n"));
returnValue = AcBr::eMissingGeometry;
return returnValue;
}
if (pcurveGeometry->type() != kExternalCurve2d) {
acutPrintf(ACRX_T("\n getNativeParamCurve: parameter curve is not an external 2d curve\n"));
returnValue = AcBr::eMissingGeometry;
return returnValue;
}
if (!((AcGeExternalCurve2d*)pcurveGeometry)->isDefined()) {
acutPrintf(ACRX_T("\n getNativeParamCurve: external param curve is undefined\n"));
returnValue = AcBr::eMissingGeometry;
return returnValue;
}
if (!((AcGeExternalCurve2d*)pcurveGeometry)->isNurbCurve(nurbGeometry)) {
acutPrintf(ACRX_T("\n getNativeParamCurve: native 2d nurb curve is undefined\n"));
returnValue = AcBr::eMissingGeometry;
return returnValue;
}
return returnValue;
}
示例3: countShells
static AcBr::ErrorStatus
countShells(const AcBrBrep& brepEntity)
{
AcBr::ErrorStatus returnValue = AcBr::eOk;
// make a global shell traverser
AcBrBrepShellTraverser brepShellTrav;
returnValue = brepShellTrav.setBrep(brepEntity);
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in AcBrBrepShellTraverser::setBrep:"));
errorReport(returnValue);
return returnValue;
}
// count the shells
int shellCount = 0;
while (!brepShellTrav.done() && (returnValue == AcBr::eOk)) {
shellCount++;
returnValue = brepShellTrav.next();
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in AcBrBrepShellTraverser::next:"));
errorReport(returnValue);
return returnValue;
}
}
acutPrintf(ACRX_T("\n ***Brep has %d shells\n"), shellCount);
return returnValue;
}
示例4: countComplexes
static AcBr::ErrorStatus
countComplexes(const AcBrBrep& brepEntity)
{
AcBr::ErrorStatus returnValue = AcBr::eOk;
// make a global complex traverser
AcBrBrepComplexTraverser brepComplexTrav;
returnValue = brepComplexTrav.setBrep(brepEntity);
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in AcBrBrepComplexTraverser::setBrep:"));
errorReport(returnValue);
return returnValue;
}
// count the faces
int complexCount = 0;
while (!brepComplexTrav.done() && (returnValue == AcBr::eOk)) {
complexCount++;
returnValue = brepComplexTrav.next();
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in AcBrBrepComplexTraverser::next:"));
errorReport(returnValue);
return returnValue;
}
}
acutPrintf(ACRX_T("\n ***Brep has %d complexes\n"), complexCount);
return returnValue;
}
示例5: asdktest3
void asdktest3 () {
//----- Create a line and a circle (memory only)
AcDbLine *pLine =new AcDbLine (AcGePoint3d (), AcGePoint3d (100, 100, -100)) ;
AcDbCircle *pCircle =new AcDbCircle (AcGePoint3d (50, 50, 0), AcGeVector3d (0, 0, 1) , 25.0) ;
//----- Create a region from the circle
AcDbVoidPtrArray arr1, arr2 ;
arr1.append (pCircle) ;
AcDbRegion::createFromCurves (arr1, arr2) ;
AcDbRegion *pRegion =(AcDbRegion *)arr2.at (0) ;
delete pCircle ;
//----- Add the line and the region objects to the collector
//----- NB: Remember those object are memory objects only
AsdkHlrCollector collector ;
collector.setDeleteState (true) ;
collector.addEntity (pLine) ;
collector.addEntity (pRegion) ;
//----- Process hidden line removal
AsdkHlrEngine hlr (AcGePoint3d (50, 50,0), AcGeVector3d (0, 0, 1), kEntity | kBlock | kShowAll | kProject | kHonorInternals) ;
hlr.run (collector) ;
//----- To easily see the result, we do append resulting entities to the current database
//----- and use the color convention used in command 'TEST1'
int n =collector.mOutputData.logicalLength () ;
for ( int i =0 ; i < n ; i++ ) {
AsdkHlrData *p =collector.mOutputData [i] ;
AcDbEntity *pEnt =p->getResultEntity () ;
AsdkHlrData::Visibility vis =p->getVisibility () ;
if ( vis == AsdkHlrData::kVisible )
pEnt->setColorIndex (1) ;
else
pEnt->setColorIndex (5) ;
AcDbObjectId id ;
if ( postToDatabase (NULL, pEnt, id) != Acad::eOk ) {
acutPrintf (_T("Failed to add entity to current space.\n")) ;
break ;
}
//----- Entity originator path
AcDbObjectIdArray ids =p->getObjectIds () ;
if ( ids.logicalLength () > 0 ) {
acutPrintf (ACRX_T("\n%ld, "), pEnt->objectId ().asOldId ()) ;
for ( int j =0 ; j < ids.logicalLength () ; j++ ) {
acutPrintf (ACRX_T("%ld, "), ids.at (j).asOldId ()) ;
}
}
pEnt->close () ;
}
}
示例6: dumpModel
void
dumpModel()
{
AcBr::ErrorStatus returnValue = AcBr::eOk;
// Select the entity by type
AcBrEntity* pEnt = NULL;
AcDb::SubentType subType = AcDb::kNullSubentType;
returnValue = selectEntityByType(pEnt, subType);
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in selectEntityByType:"));
errorReport(returnValue);
delete pEnt;
return;
}
switch (subType) {
case AcDb::kNullSubentType:
// brep
returnValue = brepDump((const AcBrBrep&)(*pEnt));
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in brepDump:"));
errorReport(returnValue);
return;
}
break;
case AcDb::kFaceSubentType:
// face
returnValue = faceDump((const AcBrFace&)(*pEnt));
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in faceDump:"));
errorReport(returnValue);
return;
}
break;
case AcDb::kEdgeSubentType:
// edge
returnValue = edgeDump((const AcBrEdge&)(*pEnt));
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in edgeDump:"));
errorReport(returnValue);
return;
}
break;
default:
acutPrintf(ACRX_T("\n dumpModel: unsupported subentity type: %d\n"), subType);
return;
}
delete pEnt;
return;
}
示例7: pickViewport
Adesk::Boolean pickViewport (AcDbViewport *&pVp) {
ads_point p1, p2 ;
if ( acedGetPoint (NULL, ACRX_T("\nPlease enter point 1: "), p1) != RTNORM )
return (Adesk::kFalse) ;
if ( acedGetPoint (p1, ACRX_T("\nPlease enter point 2: "), p2) != RTNORM )
return (Adesk::kFalse) ;
acdbUcs2Wcs (p1, p1, Adesk::kFalse ) ;
acdbUcs2Wcs (p2, p2, Adesk::kFalse ) ;
int frontClip =AfxMessageBox (ACRX_T("Would you like to clip at the front?"), MB_YESNO) ;
int backClip =AfxMessageBox (ACRX_T("Would you like to clip at the back?"), MB_YESNO) ;
pVp =new AcDbViewport ;
pVp->setViewTarget (asPnt3d (p2)) ;
pVp->setViewDirection (asPnt3d (p1) - asPnt3d (p2)) ;
pVp->setFrontClipDistance (asPnt3d (p1).distanceTo (asPnt3d (p2))) ;
pVp->setBackClipDistance (0) ;
acutPrintf (ACRX_T("\nFront Clipping is %d"), pVp->isFrontClipOn ()) ;
if ( frontClip == IDYES )
pVp->setFrontClipOn () ;
acutPrintf (ACRX_T("\nFront Clipping is %d"), pVp->isFrontClipOn ()) ;
acutPrintf (ACRX_T("\nBack Clipping is %d"), pVp->isBackClipOn ()) ;
if ( backClip == IDYES )
pVp->setBackClipOn () ;
acutPrintf(ACRX_T("\nBack Clipping is %d"), pVp->isBackClipOn ()) ;
return (Adesk::kTrue) ;
}
示例8: entityAssociatedReport
void
entityAssociatedReport(AcBrEntity* entityAssociated)
{
if (entityAssociated != NULL) {
if (entityAssociated->isKindOf(AcBrBrep::desc())) {
acutPrintf(ACRX_T("\n Mesh subobject is inside the brep\n"));
} else if (entityAssociated->isKindOf(AcBrFace::desc())) {
acutPrintf(ACRX_T("\n Mesh subobject is on a face\n"));
} else if (entityAssociated->isKindOf(AcBrEdge::desc())) {
acutPrintf(ACRX_T("\n Mesh subobject is on an edge\n"));
} else if (entityAssociated->isKindOf(AcBrVertex::desc())) {
acutPrintf(ACRX_T("\n Mesh subobject is on a vertex\n"));
} else acutPrintf(ACRX_T("\n Unsupported entity type encountered\n"));
}
}
示例9: bblockReport
void
bblockReport(AcGePoint3d& min, AcGePoint3d& max)
{
acutPrintf(ACRX_T("\n Bounding Block lower corner is ("));
acutPrintf (ACRX_T("%lf, "), min.x);
acutPrintf (ACRX_T("%lf, "), min.y);
acutPrintf (ACRX_T("%lf"), min.z);
acutPrintf(ACRX_T(")\n"));
acutPrintf(ACRX_T("\n Bounding Block upper corner is ("));
acutPrintf (ACRX_T("%lf, "), max.x);
acutPrintf (ACRX_T("%lf, "), max.y);
acutPrintf (ACRX_T("%lf"), max.z);
acutPrintf(ACRX_T(")\n"));
return;
}
示例10: listFiles
//------------
// Get project's files names by using mask option.
bool listFiles()
{
CLogger::Print(_T("*Call: listFiles()"));
// Check whether or not a DENKI project is opening?
if (!DenkiIsOpenProject()) {
CLogger::Print(_T("*Exit: listFiles() - Denki project is not being opened!"));
return false;
}
DenkiDwgProject* pProject = DenkiDwgProject::getCurrent();
// Create a DenkiGetProjectFileMask object (mask option).
DenkiGetProjectFileMask mask = (DenkiGetProjectFileMask)(MASK_DENKIZUMEN | MASK_SONOTAZUMEN);
int nCount = 0;
// Get project's files into an array.
const LPCTSTR* pAryDwg = DenkiGetProjectFiles(mask, &nCount);
if (!pAryDwg) {
CLogger::Print(_T("*Exit: listFiles() - Fail to get the project's files names!"));
return false;
}
// Steps through the array's items to print out its value.
for (int nIdx=0; nIdx<nCount; nIdx++) {
acutPrintf(ACRX_T("\n%02d:%s"), nIdx, pAryDwg[nIdx]);
CLogger::Print(_T("Inform: %02d : %s"), nIdx, pAryDwg[nIdx]);
}
DenkiFreeCharPtrArray(pAryDwg); // Remember to free returned memory after using DenkiGetProjectFiles function
CLogger::Print(_T("*Exit: listFiles()"));
return true;
}
示例11: subtype
static AcDb::SubentType
subtype()
{
// Query the subentity type
AcDb::SubentType subType = AcDb::kNullSubentType;
ACHAR opt[128];
while (Adesk::kTrue) {
acutPrintf(ACRX_T("\nEnter Subent Type: "));
acedInitGet(NULL, ACRX_T("Edge Face Brep"));
if (acedGetKword(ACRX_T("Edge/Face/<Brep>: "), opt) == RTCAN) {
subType = AcDb::kNullSubentType;
break;
}
// Map the user input to a valid subentity type
if ((_tcscmp(opt, ACRX_T("Brep")) == 0) || (_tcscmp(opt, ACRX_T("")) == 0)) {
subType = AcDb::kNullSubentType;
break;
} else if (_tcscmp(opt, ACRX_T("Face")) == 0) {
subType = AcDb::kFaceSubentType;
break;
} else if (_tcscmp(opt, ACRX_T("Edge")) == 0) {
subType = AcDb::kEdgeSubentType;
break;
}
}
return subType;
}
示例12: ptContainmentReport
void
ptContainmentReport(AcGe::PointContainment containment,
AcBrEntity* container)
{
switch (containment) {
case(AcGe::kOutside):
acutPrintf(ACRX_T("\n Point is outside entity boundary\n"));
break;
case(AcGe::kInside):
acutPrintf(ACRX_T("\n Point is inside entity boundary\n"));
break;
case(AcGe::kOnBoundary):
if (container != NULL) {
if (container->isKindOf(AcBrFace::desc())) {
acutPrintf(ACRX_T("\n Point is on a face boundary of entity\n"));
} else if (container->isKindOf(AcBrEdge::desc())) {
acutPrintf(ACRX_T("\n Point is on an edge boundary of entity\n"));
} else if (container->isKindOf(AcBrVertex::desc())) {
acutPrintf(ACRX_T("\n Point is on a vertex boundary of entity\n"));
} else acutPrintf(ACRX_T("\n Indeterminate point containment\n"));
}
break;
default:
acutPrintf(ACRX_T("\n Indeterminate point containment\n"));
break;
}
return;
}
示例13: nodeDump
AcBr::ErrorStatus
nodeDump(const AcBrNode& node)
{
AcBr::ErrorStatus returnValue = AcBr::eOk;
// Determine the entity which contains this node
AcBrEntity* entityAssociated = NULL;
returnValue = node.getEntityAssociated(entityAssociated);
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in AcBrNode::getEntityAssociated:"));
errorReport(returnValue);
delete entityAssociated;
return returnValue;
}
entityAssociatedReport(entityAssociated);
delete entityAssociated;
AcGePoint3d nodePoint;
returnValue = node.getPoint(nodePoint);
if (returnValue != AcBr::eOk) {
acutPrintf(ACRX_T("\n Error in AcBrNode::getPoint:"));
errorReport(returnValue);
return returnValue;
}
acutPrintf(ACRX_T("\n Node Point is ("));
acutPrintf (ACRX_T("%lf, "), nodePoint.x);
acutPrintf (ACRX_T("%lf, "), nodePoint.y);
acutPrintf (ACRX_T("%lf"), nodePoint.z);
acutPrintf(ACRX_T(")\n"));
return returnValue;
}
示例14: addToDatabase
// Add the given entity to the current Database
Acad::ErrorStatus
addToDatabase(AcDbEntity* pEnt, AcDbObjectId& objId)
{
Acad::ErrorStatus acadReturnValue = Acad::eOk;
AcDbBlockTable* pBlockTable;
AcDbBlockTableRecord* pSpaceRecord;
AcDbDatabase *pCurDwg = acdbHostApplicationServices()->workingDatabase();
if (pCurDwg==NULL)
return Acad::eNoDatabase;
if ((acadReturnValue = pCurDwg->getBlockTable(pBlockTable,
AcDb::kForRead)) != Acad::eOk) {
acutPrintf(ACRX_T("\n acdbCurDwg()->getBlockTable() failed"));
return acadReturnValue;
}
if ((acadReturnValue = pBlockTable->getAt(ACDB_MODEL_SPACE,
pSpaceRecord, AcDb::kForWrite)) != Acad::eOk) {
acutPrintf(ACRX_T("\n AcDbBlockTable::getAt() failed"));
return acadReturnValue;
}
// close the block table object
if ((acadReturnValue = pBlockTable->close()) != Acad::eOk) {
acutPrintf(ACRX_T("\n AcDbBlockTable::close() failed"));
return acadReturnValue;
}
// append the entity to the display list
if ((acadReturnValue = pSpaceRecord->appendAcDbEntity(objId, pEnt))
!= Acad::eOk) {
acutPrintf(ACRX_T("\n AcDbBlockTableRecord::appendAcDbEntity() failed"));
return acadReturnValue;
}
// close the block table record object
if ((acadReturnValue = pSpaceRecord->close()) != Acad::eOk) {
acutPrintf(ACRX_T("\n AcDbBlockTableRecord::close() failed"));
return acadReturnValue;
}
return acadReturnValue;
}
示例15: LSS10
void LSS10()
{
CLogger::Print(_T("-------------| START LOGGING LESSONS 10 |--------------"));
AcDbObjectId idCircle;
Acad::ErrorStatus es;
if (Acad::eOk != (es = createCircle(idCircle))) {
acutPrintf(ACRX_T("Fail to call createCircle() function - Error: %s")
, acadErrorStatusText(es));
}
}