Delphi コンポーネント


Ver1.0
2006/08/23UP

対応データ形式
DXF(R12?)
DG4(鍋CADデータ)
NTS(鍋CADシンボル)

対応コンパイラ

Delphi6用CADPanelD6.lzh


Delphi7用
CADPanelD7.lzh


BCB6用
CADPanelC6.lzh


TCADPanel (CADデータ表示コンポーネント)
※拡張ファイルオープンダイアログ付属

フォームにポトリと落とすだけでCADデータの表示が可能となります。
今後は順を追って対応データ形式を増やすつもりです。
ソース未公開ですが、現段階ではフリーソフトです。
また将来的にはデータ読み出し関数も提供する予定なので、
コンバーターとしての可能性も秘めています。



質問は落書き帳にて受け付けております。
※メールでのご質問はご遠慮下さい。

メソッド TPanelから派生しているので、当然TPanelの物は全て使えます。
追加された物は以下のメソッド群です。
public
//TPanelからのオーバーライドメソッド
Constructor Create( aOwner : Tcomponent ); override;
Destructor Destroy; override;
procedure Paint; override;

//初期化関連メソッド
Procedure Clear;
procedure AutoScale;
procedure AutoScaleToPaint(Sender: TObject);

//要素追加メソッド
Procedure AddPoint(x, y:double; Lc:TColor);
Procedure AddLine(x1, y1, x2, y2:double; Lt:TPenStyle; Lc:TColor);
Procedure AddCircle(x, y, r:double; Lt:TPenStyle; Lc:TColor);
Procedure AddArc(x, y, r, sa, ea:double; Lt:TPenStyle; Lc:TColor);
Procedure AddElps(x, y, a, r1, r2, sa, ea:double; Lt:TPenStyle; Lc:TColor);
Procedure AddSolid(x1, y1, x2, y2, x3, y3, x4, y4:double; Lt:TPenStyle; Lc:TColor);
Procedure AddHatch(pa : array of TDPoint; Lc:TColor);
Procedure AddSpline(pa : array of TDPoint; closed:boolean; Lt:TPenStyle; Lc:TColor);
Procedure AddDim(tx, ty, x1, y1, x2, y2, an:double; ar1, ar2:byte; Lc:TColor; text:String);
Procedure AddDimPie(tx, ty, cx, cy, r:double; ar1, ar2:byte; Lc:TColor; text:String);
Procedure AddDimR(tx, ty, cx, cy, r, r1:double; ar:byte; Lc:TColor; text:String);
Procedure AddDimRin(tx, ty, cx, cy, r, r1:double; ar:byte; Lc:TColor; text:String);
Procedure AddDimA(tx, ty, cx, cy, sa, ea, l1, l2:double; ar1, ar2:byte; Lc:TColor; text:String);
Procedure AddDimCf(tx, ty, x1, y1, x2, y2:double; ar:byte; Lc:TColor; text:String);
Procedure AddText(x, y, angl, size:double; Lc:TColor; text:String);
Procedure AddTxArrow(tx, ty, ax, ay:double; ar:byte; Lc:TColor; text:String);
Procedure AddSecAr1(tx, ty, ax1, ay1:double; ar:byte; Lc:TColor);
Procedure AddSecAr2(tx, ty, ax1, ay1, ax2, ay2:double; ar:byte; Lc:TColor);
Procedure AddSecAr3(tx, ty, ax1, ay1, ax2, ay2, ax3, ay3:double; ar:byte; Lc:TColor);
Procedure AddBaln(x, y, ax, ay, r:double; ar:byte; Lc:TColor; text:String);

//データ読み込みメソッド
function ReadDXF(FileName:AnsiString):string;
function ReadDG4(FileName:AnsiString):string;
function ReadNTS(FileName:AnsiString):string;
Procedure SaveToBmp(FileName:AnsiString);

published
//動作制御用プロパティ
Property MouseAction : boolean read fMouseAction write fMouseAction;
Property ShowGrid : boolean read fShowGrid write fShowGrid;
Property GridColor : TColor read fGridColor write fGridColor;
Property Scale : double read fScale write fScale;
Property DimScale : double read fDimScale write SetDimScale;
PanelTest.lzh
上記のサンプルプロジェクトです。

質問 or 感想 等ありましたら、落書き帳に書き込んで下さい。