原創|行業資訊|編輯:黃竹雯|2019-05-06 10:18:20.000|閱讀 770 次
概述:CADSoftTools公司旨在幫助客戶更方便有效地處理設計與項目文檔。旗下多款CAD控件和軟件也是受到廣泛關注,如CAD .NET、CAD VCL、ABViewer等等。小編特意為大家整理了近期CAD技術者的技術問答,免去了你四處搜索的繁瑣過程。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
CAD是在工業與建筑領域運用非常廣泛的繪圖軟件,CADSoftTools公司旨在幫助客戶更方便有效地處理設計與項目文檔。旗下多款CAD控件和軟件也是受到廣泛關注,如CAD .NET、CAD VCL、ABViewer等等。
在實際的操作中,我們或多或少的都會遇到各種“疑難雜癥”。別慌!小編特意為大家整理了近期CAD技術者的技術問答,免去了你四處搜索的繁瑣過程。在慧都,也許就有你想要的所有答案!
問:需要確定的是:是否沒有方法來裁剪或使用SaveAsDXF在選定區域的DXF中獲得完整詳細的導出?
答:當涉及到DXF導出時,您不能保存選定的區域,您可以保存某些CAD實體(例如CADImage.SelectedEntities):
CADImage cadImage = new CADImage(); cadImage.InitialNewImage();
更多CAD.NET精彩問答盡在 >>【FAQ】CAD .NET熱門技術問答精選合集
A:您將在下面找到所需的示例代碼:
interface uses ..., CADImage, DXFConv, sgFunction, sgConsts; ... implementation {$R *.dfm} procedure ExplodeInsert(ACADImage: TsgCADImage; AInsert: TsgDXFInsert); var I, J: Integer; vBlockEnt: TsgDXFEntity; vDXFInsert: TsgDXFInsert; vDXFLine: TsgDXFLine; vDXFLWPolyline: TsgDXFPolyline; vDXFCircle: TsgDXFCircle; vMatrix: TFMatrix; vPoint, vScale, vExtrusion: TFPoint; vAngle: Double; begin vMatrix := AInsert.GetMatrix; // Iterate through entities in the block for I := 0 to AInsert.Block.Count - 1 do begin vBlockEnt := AInsert.Block.Entities[I]; case vBlockEnt.EntType of ceLine: // LINE entity begin // Create a copy of the entity which is inside the block vDXFLine := TsgDXFLine.Create; vDXFLine.AssignEntity(vBlockEnt); // Multiply coordinates of the created entity by the transformation matrix vDXFLine.Point := FPointXMat(vDXFLine.Point, vMatrix); vDXFLine.Point1 := FPointXMat(vDXFLine.Point1, vMatrix); ACADImage.Converter.Loads(vDXFLine); ACADImage.CurrentLayout.AddEntity(vDXFLine); end; ceLWPolyline: // LWPOLYLINE entity begin vDXFLWPolyline := TsgDXFLWPolyline.Create; vDXFLWPolyline.AssignEntity(vBlockEnt); for J := 0 to vDXFLWPolyline.Count - 1 do vDXFLWPolyline.Vertexes[J].Point := FPointXMat(vDXFLWPolyline.Vertexes[J].Point, vMatrix); ACADImage.Converter.Loads(vDXFLWPolyline); ACADImage.CurrentLayout.AddEntity(vDXFLWPolyline); end; ceCircle: // CIRCLE entity begin vDXFCircle := TsgDXFCircle.Create; vDXFCircle.AssignEntity(vBlockEnt); vDXFCircle.Point := FPointXMat(vDXFCircle.Point, vMatrix); vDXFCircle.Radius := DistanceFVector(AffineTransformPoint(MakeFPoint(0, vDXFCircle.Radius, 0), vMatrix)); ACADImage.Converter.Loads(vDXFCircle); ACADImage.CurrentLayout.AddEntity(vDXFCircle); end; ceInsert: // nested INSERT entity begin //ExplodeInsert(ACADImage, vSrcEnt as TsgDXFInsert); vDXFInsert := TsgDXFInsert.Create; vDXFInsert.AssignEntity(vBlockEnt); ExtractMatrixParams(FMatXMat(TsgDXFInsert(vBlockEnt).GetMatrix, vMatrix), vPoint, vScale, vExtrusion, vAngle); vDXFInsert.Point := vPoint; vDXFInsert.Scale := vScale; vDXFInsert.Extrusion := vExtrusion; vDXFInsert.Angle := vAngle; ACADImage.Converter.Loads(vDXFInsert); ACADImage.CurrentLayout.AddEntity(vDXFInsert); end; end; end; // Delete the INSERT after exploding ACADImage.Converter.RemoveEntity(AInsert, True); // Recalculate the CAD image extents ACADImage.GetExtents(); end;
更多CAD.VCL精彩問答盡在 >>【FAQ】CAD.VCL熱門技術問答精選合集
問:當將圖紙導出到DXF時,無論我指定哪個版本,都無法在我使用的任何軟件中讀取它(PADS,Altium,Pulsonix,LibreCAD,...)。當查看文件時,第一個line是“999”,刪除該行沒有用。想問有什么是錯了嗎?
答:ABViewer創建了兼容AutoCAD的DXF文件。嘗試使用AutoCAD或DWG TrueView打開輸出DXF圖形。
更多ABViewer精彩問答盡在 >>【FAQ】ABViewer熱門技術問答精選合集
想要高質量、高效率、低成本完成專業的CAD編輯與預覽嗎?慧都良心推薦:ABViewer【點擊了解更多功能介紹】——一款簡單實用的CAD文檔管理工具。
現在訂購,專享5月特惠!最低僅售131元(稅前)起! >>立即搶購
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn