Recent

Author Topic: CAD program written in Lazarus / FPC  (Read 188702 times)

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #120 on: June 15, 2014, 02:08:57 pm »
Blaazen
Thanks!

Can somebody give the result of the native WinXP?

airpas

  • Full Member
  • ***
  • Posts: 179
Re: CAD program written in Lazarus / FPC
« Reply #121 on: June 15, 2014, 02:42:08 pm »
winxp :
OpenGL driver info: Intel Intel Bear Lake B 1.4.0 - Build 7.14.10.4906
Draw 10000 random lines
Canvas: 37msec
GDIPlus: 5605msec
AGG: 2152msec
OpenGL: 0msec

win7 32bits :
OpenGL driver info: NVIDIA Corporation GeForce GT 610/PCIe/SSE2 4.4.0
Draw 10000 random lines
Canvas: 19msec
GDIPlus: 624msec
AGG: 884msec
OpenGL: 1msec


_Bernd

  • New Member
  • *
  • Posts: 21
Re: CAD program written in Lazarus / FPC
« Reply #122 on: June 15, 2014, 07:49:51 pm »
Lazarus 1.2.2, Ubuntu 10.04, 32-Bit running in a VM:

OpenGL driver info: Humper Chromium 2.1 Chromium 1.9
Draw 10000 random lines
Canvas: 56msec
GDIPlus not avialible
AGG: 1189msec
OpenGL: 7msec

Regards, Bernd.

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #123 on: June 20, 2014, 10:27:36 am »
Hi all!

Thank you for participating in the test. In conclusion, the test results on a single computer, but for different operating systems
kubuntu 14.04 x64, kde 4.13.1:
qt:
Code: [Select]
OpenGL driver info: NVIDIA Corporation GeForce GTX 460/PCIe/SSE2 2.1.2 NVIDIA 337.25
Draw 100000 random lines
Canvas: 149msec
GDIPlus not avialible
AGG: 7411msec
OpenGL: 1msec

gtk2:
Code: [Select]
OpenGL driver info: NVIDIA Corporation GeForce GTX 460/PCIe/SSE2 4.4.0 NVIDIA 337.25
Draw 100000 random lines
Canvas: 348msec
GDIPlus not avialible
AGG: 7201msec
OpenGL: 2msec

windows7 x64:
Code: [Select]
OpenGL driver info: NVIDIA Corporation GeForce GTX 460/PCI/SSE2 4.1.0
Draw 100000 random lines
Canvas: 135msec
GDIPlus: 5297msec
AGG: 7885msec
OpenGL: 6msec

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #124 on: June 27, 2014, 01:02:03 pm »
Hi all!
I started doing canvas drawer, but there were some problems with the rendering - I need to redraw the window when moving the mouse.
Around it looks:
Code: [Select]
...
var DrawInsidePaintMessage:boolean;
...
procedure WorkArea.Draw;
begin
 //here render drawing to canvas code;
end;
...
procedure WorkArea.MyOnPaint
begin
 self.Draw;
end;
...
procedure WorkArea.MyOnMouseMove
begin
 DoSomething;
 //Here i need to redraw WorkArea
 if DrawInsidePaintMessage=true
 then
    self.Invalidate
 else
    self.draw;
end;
...
If i set DrawInsidePaintMessage to true - all drawn, double buffering work, but painting is not on every move the mouse, only when the mouse stops
If i set DrawInsidePaintMessage to false - all drawn, double buffering not work, painting is on every move the mouse
In OpenGL I used DrawInsidePaintMessage:=false variant and organized my own double buffering

How to correctly organize drawing with mousemove? Or how to make cross-platform double buffering on canvas (Are there cross-platform variant CreateCompatibleDC, BitBlt, etc... with standart Lazarus canvas)?
« Last Edit: June 27, 2014, 01:10:13 pm by zamtmn »

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #125 on: July 02, 2014, 06:06:05 pm »
Hi all!
I'm surprised, GDI functions were cross-platform, thank Lazarus team. Since rev 940  GDI rendering start work.

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #126 on: July 21, 2014, 03:23:14 am »
Hi all!
Can somebody test http://sourceforge.net/projects/zcad/files/Windows%20x86/zcad_v0.9_svn948.7z/download for the presence flickering in the drawing area in WindowsXP with classic theme?
For the test before creating or loading drawing need to switch graphic backend to GDI (object inspector\render\render backend set to GDI)

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #127 on: August 17, 2014, 03:17:58 pm »
Hi all!
I'm updated a example of the use of the ZCAD engine http://svn.shamangrad.net/zcad/trunk/cad_source/simplecad/ It separate simplecad from "junk" zcad runtime files. Now it's just binary file and text file for color palette description (..\components\palette.rgb)

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #128 on: September 30, 2014, 05:40:25 pm »
Hi all!
New minor release http://sourceforge.net/projects/zcad/files/Windows%20x86/zcad_v0.9_svn995.7z/download . Fixed many bugs in the Object Inspector (also added new bugs >:D), improved appearance.

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #129 on: December 20, 2014, 12:22:25 am »
Hi all!
New minor release http://sourceforge.net/projects/zcad/files/Windows%20x86/zcad_v0.9_svn1141.7z/download
- Improved appearance of the object inspector, now it fits the theme (old appearance is can also be used and is available in options)
- Added GUI for text styles control

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #130 on: March 16, 2015, 06:50:56 pm »
Hi all!
New minor release 1259.
- Object inspector behavior improved, now you can edit geometry properties in multiple select of entities

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #131 on: May 07, 2015, 08:41:38 pm »
Hi all!
New milestone - rev1346.
Support luprec, auprec, lunits, aunits, unitmode dxf variables.
The ability to control the display of linear and angular dimension units. In addition to the decimal precision the following ways to display
For linear units:
 -Scientific
 -Decimal
 -Engineering
 -Architectural
 -Fractional
For angular units:
 -Decimal degrees
 -Degrees minutes seconds
 -Gradians
 -Radians
 -Surveyors units

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #132 on: May 28, 2015, 11:54:39 pm »
Hi all!
New minor release 1375.
- GDI render backend can now display text entities (SHX and TTF) in the drawing.
Now you can draw using GDI instead of OpenGL, but on large drawings, the display speed will be significantly less

trayres

  • Jr. Member
  • **
  • Posts: 92
Re: CAD program written in Lazarus / FPC
« Reply #133 on: July 14, 2015, 06:59:35 am »
Hi all!
I'm updated a example of the use of the ZCAD engine http://svn.shamangrad.net/zcad/trunk/cad_source/simplecad/ It separate simplecad from "junk" zcad runtime files. Now it's just binary file and text file for color palette description (..\components\palette.rgb)

I tried to compile SimpleCad, but got this error:
simplecad.lpr(10,60) Fatal: Cannot find unit UUnitManager used by simplecad of the Project Inspector.

[Edit] I downloaded from svn @ http://svn.shamangrad.net/zcad/trunk/ and found the missing file; it just isn't @ http://svn.shamangrad.net/zcad/trunk/cad_source/simplecad/

« Last Edit: July 14, 2015, 07:21:17 am by trayres »

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: CAD program written in Lazarus / FPC
« Reply #134 on: July 14, 2015, 07:19:45 am »
I update simplecad.lpi in trunk, now it work.
But last in last commits are a lot of ongoing changes, it will work, but with some problems. You will also need to comment this fragment in line 1575 generalwievarea.pas
Code: [Select]
f:=pdwg^.GetUnitsFormat;
  htext:=sysutils.Format('%s, %s, %s',[zeDimensionToString(param.md.mouse3dcoord.x,f),zeDimensionToString(param.md.mouse3dcoord.y,f),zeDimensionToString(param.md.mouse3dcoord.z,f)]);
  if param.polarlinetrace = 1 then
  begin
       htext2:=sysutils.Format('L=%s',[zeDimensionToString(param.ontrackarray.otrackarray[param.pointnum].tmouse,f)]);
       htext:=sysutils.Format('%s (%s)',[htext,htext2]);
       getviewcontrol.Hint:=htext2;
       Application.ActivateHint(getviewcontrol.ClientToScreen(Point(param.md.mouse.x,param.md.mouse.y)));
  end;

 

TinyPortal © 2005-2018