/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #include "OdaCommon.h" //#include "../Source/database/DbSystemInternals.h" #include "DbEntity.h" #include "Db3dSolid.h" #include "OdDbAssoc3dSolidPersSubentIdPE.h" #include #include "DbAssocEdgePersSubentId.h" #include "ShHistory/DbAssocPersSubentManager.h" #include "DbImpCenterLineActionBody.h" #include "DbImpCenterMarkActionBody.h" #include "ShHistory/DbShHistory.h" #include "DbEvalGraph.h" #include "ShHistory/DbShPrimitive.h" #include "ShHistory/DbShCylinder.h" #include "ShHistory/DbShBox.h" ODRX_NO_CONS_DEFINE_MEMBERS_ALTNAME(OdDbAssoc3dSolidPersSubentIdPE, OdDbAssocAsmBasedPersSubentIdPE, L"AcDbAssoc3dSolidPersSubentIdPE"); //OdDbAssocPersSubentIdPtr OdDbAssoc3dSolidPersSubentIdPE::createNewPersSubent(OdDbEntity* pEntity, // const class OdDbCompoundObjectId& compId, // const OdDbSubentId& subentId) //{ // OdDbAssocEdgePersSubentIdPtr res; // if (!isTypeEqual(pEntity, OdDbPolyline::desc()) || !checkSubentId(pEntity, subentId, OdDb::kEdgeSubentType)) // res.attach((OdDbAssocEdgePersSubentId*)NULL); // else // { // OdDbPolylinePtr pPolyLine = OdDbPolyline::cast(pEntity); // int ptQty = pPolyLine->numVerts(); // int maxIdentifier = 0; // for (int i = 0; i < ptQty; i++) // { // if (pPolyLine->getVertexIdentifierAt(i) > maxIdentifier) // maxIdentifier = pPolyLine->getVertexIdentifierAt(i); // } // // int startVertexIdx = (int)subentId.index() - 1; // int endVertexIdx = startVertexIdx + 1; // if (endVertexIdx >= ptQty) // endVertexIdx = 0; // // if (pPolyLine->getVertexIdentifierAt(startVertexIdx) == 0) // { // pPolyLine->setVertexIdentifierAt(startVertexIdx, ++maxIdentifier); // } // // if (pPolyLine->getVertexIdentifierAt(endVertexIdx) == 0) // { // pPolyLine->setVertexIdentifierAt(endVertexIdx, ++maxIdentifier); // } // // res = OdDbAssocEdgePersSubentId::createObject(); // res->init(pPolyLine->getVertexIdentifierAt(startVertexIdx), pPolyLine->getVertexIdentifierAt(endVertexIdx)); // } // // return res; //}