原創(chuàng)|行業(yè)資訊|編輯:黃竹雯|2019-05-06 10:18:20.000|閱讀 792 次
概述:CADSoftTools公司旨在幫助客戶更方便有效地處理設(shè)計(jì)與項(xiàng)目文檔。旗下多款CAD控件和軟件也是受到廣泛關(guān)注,如CAD .NET、CAD VCL、ABViewer等等。小編特意為大家整理了近期CAD技術(shù)者的技術(shù)問答,免去了你四處搜索的繁瑣過程。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
CAD是在工業(yè)與建筑領(lǐng)域運(yùn)用非常廣泛的繪圖軟件,CADSoftTools公司旨在幫助客戶更方便有效地處理設(shè)計(jì)與項(xiàng)目文檔。旗下多款CAD控件和軟件也是受到廣泛關(guān)注,如CAD .NET、CAD VCL、ABViewer等等。
在實(shí)際的操作中,我們或多或少的都會遇到各種“疑難雜癥”。別慌!小編特意為大家整理了近期CAD技術(shù)者的技術(shù)問答,免去了你四處搜索的繁瑣過程。在慧都,也許就有你想要的所有答案!
問:需要確定的是:是否沒有方法來裁剪或使用SaveAsDXF在選定區(qū)域的DXF中獲得完整詳細(xì)的導(dǎo)出?
答:當(dāng)涉及到DXF導(dǎo)出時(shí),您不能保存選定的區(qū)域,您可以保存某些CAD實(shí)體(例如CADImage.SelectedEntities):
CADImage cadImage = new CADImage(); cadImage.InitialNewImage();
更多CAD.NET精彩問答盡在 >>【FAQ】CAD .NET熱門技術(shù)問答精選合集
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熱門技術(shù)問答精選合集
問:當(dāng)將圖紙導(dǎo)出到DXF時(shí),無論我指定哪個(gè)版本,都無法在我使用的任何軟件中讀取它(PADS,Altium,Pulsonix,LibreCAD,...)。當(dāng)查看文件時(shí),第一個(gè)line是“999”,刪除該行沒有用。想問有什么是錯了嗎?
答:ABViewer創(chuàng)建了兼容AutoCAD的DXF文件。嘗試使用AutoCAD或DWG TrueView打開輸出DXF圖形。
更多ABViewer精彩問答盡在 >>【FAQ】ABViewer熱門技術(shù)問答精選合集
想要高質(zhì)量、高效率、低成本完成專業(yè)的CAD編輯與預(yù)覽嗎?慧都良心推薦:ABViewer【點(diǎn)擊了解更多功能介紹】——一款簡單實(shí)用的CAD文檔管理工具。
現(xiàn)在訂購,專享5月特惠!最低僅售131元(稅前)起! >>立即搶購
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@ke049m.cn