TsgDXFHatch & Delphi 5
Moderators: SDS, support, admin
TsgDXFHatch & Delphi 5
Hello !
My company has recently bought the last version of your software CADImportVCL for Delphi 5.
I would like to know if it is possible to reproduce a Hatch entity into a Delphi 5 Canvas, and of course how can we do it ?
Thanks for your reply !
Best regard,
Fabien.
My company has recently bought the last version of your software CADImportVCL for Delphi 5.
I would like to know if it is possible to reproduce a Hatch entity into a Delphi 5 Canvas, and of course how can we do it ?
Thanks for your reply !
Best regard,
Fabien.
Hello,
There are examples of drawing of entities in DXFImage.pas (http://www.cadsofttools.com/download/CADImportVCL.zip)
According to HATCH it is necessary to use DXFImage.DrawHatch (where Sender - is TsgDXFHatch)
But in this case entities are drawn in canvas Rect taking into account dimension of the whole drawing (similarly TGraphic).
Could you please explain in detail your needs for we could give you maximum of help.
Whether you need separate entity (TsgDXFHatch) to separate Canvas into the specified Rect?
Sergey.
please post questions to the forum or write to support@cadsofttools.com
There are examples of drawing of entities in DXFImage.pas (http://www.cadsofttools.com/download/CADImportVCL.zip)
According to HATCH it is necessary to use DXFImage.DrawHatch (where Sender - is TsgDXFHatch)
But in this case entities are drawn in canvas Rect taking into account dimension of the whole drawing (similarly TGraphic).
Could you please explain in detail your needs for we could give you maximum of help.
Whether you need separate entity (TsgDXFHatch) to separate Canvas into the specified Rect?
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Thanks for your support, sergey !
What I want to do is to identify the exact area where is aplied the hatch. This hatch would be then identify as a brush property of any shape i want to draw in a delphi canvas, like polylines, circles, etc.
Is it possible ?
Even if the hatch style is not the same as the DXF one, I want to draw something in the right area.
Thanks !
Fabien.
What I want to do is to identify the exact area where is aplied the hatch. This hatch would be then identify as a brush property of any shape i want to draw in a delphi canvas, like polylines, circles, etc.
Is it possible ?
Even if the hatch style is not the same as the DXF one, I want to draw something in the right area.
Thanks !
Fabien.
Dear Fabien,
Following code shows how to get access to HATCH's boundaries:
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Following code shows how to get access to HATCH's boundaries:
Code: Select all
<b>procedure</b> YourProc(AHatch: TsgDXFHatch);
<b>var</b>
vList: TList;
vFP: TFPoint;
I, J: Integer;
<b>begin</b>
////...
<b>for</b> I := 0 <b>to</b> AHatch.Polylines.Count - 1 <b>do
begin</b>
vList := AHatch.Polylines[I];// I - index of hatch boundary
<b>for</b> J := 0 <b>to</b> vList.Count - 1 <b>do
begin</b>
vFP.X := PsgHElem(vList[J]).X;// J index of PsgHElem in current I-boundary
vFP.Y := PsgHElem(vList[J]).Y;
// Adding to list of TPoint for draw to Canvas
////...
<b>end</b>;
<b>end</b>;
////...
<b>end</b>;
please post questions to the forum or write to support@cadsofttools.com
Hello !
The support gave me this code last year :
My question was :
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">What I want to do is to identify the exact area where is aplied the hatch. This hatch would be then identify as a brush property of any shape i want to draw in a delphi canvas, like polylines, circles, etc.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
My problem now, with the V. 5.2.5 that I downloaded previously, is :
<b>this code no longer works.</b>
Can someone from the support give me some help to update this code ?
Thanks for your help.
Best regards,
Fabien.
The support gave me this code last year :
Code: Select all
<b>procedure</b> YourProc(AHatch: TsgDXFHatch);
<b>var</b>
vList: TList;
vFP: TFPoint;
I, J: Integer;
<b>begin</b>
////...
<b>for</b> I := 0 <b>to</b> AHatch.Polylines.Count - 1 <b>do
begin</b>
vList := AHatch.Polylines[I];// I - index of hatch boundary
<b>for</b> J := 0 <b>to</b> vList.Count - 1 <b>do
begin</b>
vFP.X := PsgHElem(vList[J]).X;// J index of PsgHElem in current I-boundary
vFP.Y := PsgHElem(vList[J]).Y;
// Adding to list of TPoint for draw to Canvas
////...
<b>end</b>;
<b>end</b>;
////...
<b>end</b>;
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">What I want to do is to identify the exact area where is aplied the hatch. This hatch would be then identify as a brush property of any shape i want to draw in a delphi canvas, like polylines, circles, etc.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
My problem now, with the V. 5.2.5 that I downloaded previously, is :
<b>this code no longer works.</b>
Can someone from the support give me some help to update this code ?
Thanks for your help.
Best regards,
Fabien.
Hello Fabien!
We have made a lots of changes in CADImportVCL v.5.2.5 (available on: http://www.cadsofttools.com/download/cadimportvcl.zip). A lot of bugs have been fixed and a lots of improvements have been implemented. Some of these changes have been made in HATCH entity. TsgDXFHatch was replaced by TsgCADHatch etc.
Please try the following construction:
Sergey.
please post questions to the forum or write to support@cadsofttools.com
We have made a lots of changes in CADImportVCL v.5.2.5 (available on: http://www.cadsofttools.com/download/cadimportvcl.zip). A lot of bugs have been fixed and a lots of improvements have been implemented. Some of these changes have been made in HATCH entity. TsgDXFHatch was replaced by TsgCADHatch etc.
Please try the following construction:
Code: Select all
<b>for</b> I := 0 <b>to</b> I < TsgCADHatch.Boundaries.Count - 1 <b>do
begin</b>
vList := TsgCADHatch.Boundaries[I]
<b>for</b> J := 0 <b>to</b> J < vList.Count - 1 <b>do
begin</b>
TFPoint := PFPoint(vList[J])^;
<b>end</b>;
<b>end</b>;
please post questions to the forum or write to support@cadsofttools.com
Thanks Sergey, that works perfectly [;)]
Got another (last ?) question [:D]
Somewhere in my code, i have this property :
But, there is no TsgCADHatch(Entite).Pen.Width.
What is the actual property for the Pen Width of the hatch ?
Thanks for your help [^]
Fabien.
Got another (last ?) question [:D]
Somewhere in my code, i have this property :
Code: Select all
TsgDXFHatch(Entite).Pen.Width
What is the actual property for the Pen Width of the hatch ?
Thanks for your help [^]
Fabien.
Hello Fabien!
Thank you for your note! This is our defect. Currently there is no way to set the pen width for HATCH. We'll fix this bug and inform you.
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Thank you for your note! This is our defect. Currently there is no way to set the pen width for HATCH. We'll fix this bug and inform you.
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Hello, Fabien!
Property TsgCADHatch.LineWeight solves this problem. Is is available in CAD Import VCL since version 6.
Please contact to our executive manager Evgeny Chuzhakin for the question of getting updates. His e-mail is info@cadsofttools.com.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
Property TsgCADHatch.LineWeight solves this problem. Is is available in CAD Import VCL since version 6.
Please contact to our executive manager Evgeny Chuzhakin for the question of getting updates. His e-mail is info@cadsofttools.com.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com