#include "StdAfx.h" #include "AecUnknownWorldGeometry.h" #include #include "AecUnknownWorldDraw.h" ACRX_CONS_DEFINE_MEMBERS(AecUnknownWorldGeometry,AcGiWorldGeometry,AcDb::kDHL_CURRENT) AecUnknownWorldGeometry::AecUnknownWorldGeometry() { mpCustomWorldDraw = NULL; m_bToFindDrawingFrame = false; m_bToFindForESignTrue = false; } AecUnknownWorldGeometry::AecUnknownWorldGeometry(AecUnknownWorldDraw* pWorldDraw) { mpCustomWorldDraw = pWorldDraw; m_bToFindDrawingFrame = false; m_bToFindForESignTrue = false; } AecUnknownWorldGeometry::~AecUnknownWorldGeometry() { } void AecUnknownWorldGeometry::setToFindDrawingFrame() { m_bToFindDrawingFrame = true; } void AecUnknownWorldGeometry::setToFindForESignTrue() { m_bToFindForESignTrue = true; } void AecUnknownWorldGeometry::getModelToWorldTransform(AcGeMatrix3d &pMatrix) const { return; } void AecUnknownWorldGeometry::getWorldToModelTransform(AcGeMatrix3d &pMatrix) const { return; } #if (ARX>=18) AcGeMatrix3d AecUnknownWorldGeometry::pushPositionTransform (AcGiPositionTransformBehavior behavior, const AcGePoint3d& offset) { return AcGeMatrix3d::kIdentity; } AcGeMatrix3d AecUnknownWorldGeometry::pushPositionTransform (AcGiPositionTransformBehavior behavior, const AcGePoint2d& offset) { return AcGeMatrix3d::kIdentity; } AcGeMatrix3d AecUnknownWorldGeometry::pushScaleTransform (AcGiScaleTransformBehavior behavior, const AcGePoint3d& extents) { return AcGeMatrix3d::kIdentity; } AcGeMatrix3d AecUnknownWorldGeometry::pushScaleTransform (AcGiScaleTransformBehavior behavior, const AcGePoint2d& extents) { return AcGeMatrix3d::kIdentity; } AcGeMatrix3d AecUnknownWorldGeometry::pushOrientationTransform (AcGiOrientationTransformBehavior behavior) { return AcGeMatrix3d::kIdentity; } #endif void AecUnknownWorldGeometry::setExtents(AcGePoint3d *pNewExtents) const { } Adesk::Boolean AecUnknownWorldGeometry::circle(const AcGePoint3d& center, const double radius, const AcGeVector3d& normal ) const { acutPrintf(_T("\n circle")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::circle(const AcGePoint3d& pt1, const AcGePoint3d& pt2, const AcGePoint3d& pt3 ) const { acutPrintf(_T("\n circle")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::circularArc(const AcGePoint3d& center, const double radius, const AcGeVector3d& normal, const AcGeVector3d& startVector, const double sweepAngle, const AcGiArcType arcType ) const { acutPrintf(_T("\n circularArc")); double dSta = AcGeVector3d::kXAxis.angleTo(startVector); double dEnd = sweepAngle - dSta; AcDbArc* pArc = new AcDbArc(center,normal,radius,dSta,dEnd); mpCustomWorldDraw->m_prcDrawingFlowData->append(pArc); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::circularArc(const AcGePoint3d& start, const AcGePoint3d& point, const AcGePoint3d& end, const AcGiArcType arcType ) const { acutPrintf(_T("\n circularArc")); return Adesk::kTrue; } #if (ARX>=18) Adesk::Boolean AecUnknownWorldGeometry::polyline(const AcGiPolyline& polylineObj) const { acutPrintf(_T("\n polyline")); return true; } Adesk::Boolean AecUnknownWorldGeometry::polyPolyline( Adesk::UInt32 nbPolylines, const AcGiPolyline* pPolylines) const { acutPrintf(_T("\n polyPolyline")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::polyPolygon(const Adesk::UInt32 numPolygonIndices, const Adesk::UInt32* numPolygonPositions, const AcGePoint3d* polygonPositions, const Adesk::UInt32* numPolygonPoints, const AcGePoint3d* polygonPoints, const AcCmEntityColor* outlineColors, const AcGiLineType* outlineTypes, const AcCmEntityColor* fillColors, const AcCmTransparency* fillOpacities) const { acutPrintf(_T("\n polyPolygon")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::ellipticalArc(const AcGePoint3d& center, const AcGeVector3d& normal, double majorAxisLength, double minorAxisLength, double startDegreeInRads, double endDegreeInRads, double tiltDegreeInRads, AcGiArcType arcType) const { acutPrintf(_T("\n ellipticalArc")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::image( const AcGiImageBGRA32& imageSource, const AcGePoint3d& position, const AcGeVector3d& u, //orientation and magnitude of width const AcGeVector3d& v, //orientation and magnitude of height TransparencyMode transparencyMode ) const { return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::rowOfDots( int count, const AcGePoint3d& start, const AcGeVector3d& step ) const { return Adesk::kTrue; } #endif #ifdef _WIN64 Adesk::Boolean AecUnknownWorldGeometry::polyline(const Adesk::UInt32 nbPoints, const AcGePoint3d* pVertexList, const AcGeVector3d* pNormal, Adesk::LongPtr lBaseSubEntMarker) const { acutPrintf(_T("\n polyline")); AcGePlane plan; if (pNormal != NULL) plan.set(AcGePoint3d::kOrigin,*pNormal); else plan = AcGePlane::kXYPlane; AcDbPolyline* pPl = new AcDbPolyline; for (int i = 0;i < nbPoints;i++) { pPl->addVertexAt(i,pVertexList[i].convert2d(plan)); } mpCustomWorldDraw->m_prcDrawingFlowData->append(pPl); return Adesk::kTrue; } #else Adesk::Boolean AecUnknownWorldGeometry::polyline(const Adesk::UInt32 nbPoints, const AcGePoint3d* pVertexList, const AcGeVector3d* pNormal, Adesk::Int32 lBaseSubEntMarker) const { acutPrintf(_T("\n polyline")); AcGePlane plan; if (pNormal != NULL) plan.set(AcGePoint3d::kOrigin,*pNormal); else plan = AcGePlane::kXYPlane; AcDbPolyline* pPl = new AcDbPolyline; for (int i = 0;i < nbPoints;i++) { pPl->addVertexAt(i,pVertexList[i].convert2d(plan)); } mpCustomWorldDraw->m_prcDrawingFlowData->append(pPl); return Adesk::kTrue; } #endif Adesk::Boolean AecUnknownWorldGeometry::polygon( const Adesk::UInt32 nbPoints, const AcGePoint3d* pVertexList) const { acutPrintf(_T("\n polygon")); return Adesk::kTrue; } #if ARX>16 Adesk::Boolean AecUnknownWorldGeometry::mesh(const Adesk::UInt32 rows, const Adesk::UInt32 columns, const AcGePoint3d* pVertexList, const AcGiEdgeData* pEdgeData,//6 const AcGiFaceData* pFaceData,//8 const AcGiVertexData* pVertexData,//3 const bool bAutoGenerateNormals ) const { acutPrintf(_T("\n mesh")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::shell(const Adesk::UInt32 nbVertex, const AcGePoint3d* pVertexList, const Adesk::UInt32 faceListSize, const Adesk::Int32* pFaceList, const AcGiEdgeData* pEdgeData,//6-2 const AcGiFaceData* pFaceData ,//6-2 const AcGiVertexData* pVertexData,//3-1 const struct resbuf* pResBuf, const bool bAutoGenerateNormals ) const { acutPrintf(_T("\n shell")); return Adesk::kTrue; } #else Adesk::Boolean AecUnknownWorldGeometry::mesh(const Adesk::UInt32 rows, const Adesk::UInt32 columns, const AcGePoint3d* pVertexList, const AcGiEdgeData* pEdgeData,//6-2 const AcGiFaceData* pFaceData,//8-2 const AcGiVertexData* pVertexData //3-1 ) const { acutPrintf(_T("\n mesh")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::shell(const Adesk::UInt32 nbVertex, const AcGePoint3d* pVertexList, const Adesk::UInt32 faceListSize, const Adesk::Int32* pFaceList, const AcGiEdgeData* pEdgeData,//6-2 const AcGiFaceData* pFaceData ,//8-2 const AcGiVertexData* pVertexData,//3-1 const struct resbuf* pResBuf ) const { acutPrintf(_T("\n shell")); return Adesk::kTrue; } #endif Adesk::Boolean AecUnknownWorldGeometry::text(const AcGePoint3d& position, const AcGeVector3d& normal, const AcGeVector3d& direction, const double height, const double width, const double oblique, const TCHAR* pMsg ) const { acutPrintf(_T("\n text")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::text(const AcGePoint3d& position, const AcGeVector3d& normal, const AcGeVector3d& direction, const TCHAR* pMsg, const Adesk::Int32 length, const Adesk::Boolean raw, const AcGiTextStyle &pTextStyle ) const { acutPrintf(_T("\n text")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::xline(const AcGePoint3d& one_xline_point, const AcGePoint3d& a_different_xline_point ) const { acutPrintf(_T("\n xline")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::pline(const AcDbPolyline& lwBuf, Adesk::UInt32 fromIndex, Adesk::UInt32 numSegs ) const { acutPrintf(_T("\n pline")); return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::ray(const AcGePoint3d& rays_starting_point, const AcGePoint3d& a_different_ray_point ) const { return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::pushModelTransform(const AcGeVector3d & vNormal) { return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::pushModelTransform(const AcGeMatrix3d & xMat) { return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::popModelTransform() { return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::draw(AcGiDrawable* pDra) const { acutPrintf(_T("\n AecUnknownWorldGeometry::draw")); AcDbBlockTableRecord *pRec = AcDbBlockTableRecord::cast(pDra); if (pRec != NULL) { const TCHAR *pszName = NULL; pRec->getName(pszName); acutPrintf(_T("\n %s"), pszName); } return Adesk::kTrue; } Adesk::Boolean AecUnknownWorldGeometry::pushClipBoundary(AcGiClipBoundary * pBoundary) { return Adesk::kTrue; } void AecUnknownWorldGeometry::popClipBoundary() { return; }