Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations > Open Source Projects
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Open Source Projects The place to discuss Basic4ppc open source applications.

CAD Program (Autocad Lite)

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 06-29-2009, 10:34 AM
ceaser's Avatar
Basic4ppc Veteran
 
Join Date: May 2008
Location: Paarl, South Africa
Posts: 306
Default

Hi Klaus

Ok, I fixed the 3 Point Arc Function and also made the Table where the layers are displayed smaller.

Regarding the zoom functions, I would like to zoom directly on the form.

Regards
Michael
Attached Files
File Type: zip Cad.zip (241.6 KB, 41 views)
Reply With Quote
  #12 (permalink)  
Old 06-29-2009, 07:32 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,827
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi Michael,

For the zoom function you will need:
- to check the min max coordinates of the points in world coordinates
- a drawing surface on the screen in pixels with width and height in variables
- a scale factor variable 1 pixel = x meters
- 2 scroll bars to scroll the drawing on the screen
- 2 variables for the upper left corner coordinates in world coordinates of the screen drawing surface.
- 2 coordinate conversion routines to convert world coordinates into screen coordinates, the zoom factor can directly be included.

In the drawing routine you must check what is visible and only draw these elements.

Best regards.
__________________
Klaus
Switzerland
Reply With Quote
  #13 (permalink)  
Old 06-29-2009, 08:28 PM
ceaser's Avatar
Basic4ppc Veteran
 
Join Date: May 2008
Location: Paarl, South Africa
Posts: 306
Default

Hi Klaus

Dass ist mein problem. How do I show scrollbars on the main form???

Grusse
Michael
Reply With Quote
  #14 (permalink)  
Old 06-29-2009, 08:55 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,827
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi Michael,

You can add ScrollBars with the ControlEx library on any form.

You find an example in the ScaledMap program.

Best regards.
__________________
Klaus
Switzerland
Reply With Quote
  #15 (permalink)  
Old 07-04-2009, 09:54 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Nice work ceaser! i hope you complite this program)and adapt it for PC. i many work with autocad and i very want alternativ program
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #16 (permalink)  
Old 07-05-2009, 08:04 AM
ceaser's Avatar
Basic4ppc Veteran
 
Join Date: May 2008
Location: Paarl, South Africa
Posts: 306
Default

Hi Byak

Thanks for that!

I have finished the following:

1. Move marked entities
2. Copy marked entities
3. Scale marked entities
4. Rotate marked entities
5. Trim and extend lines.

I am busy with importing and exporting DXF format files and also with all the "Zoom" functions.

As soon as I have completed this (later this week) I will post an update of the program.

Thanks
Michael
Reply With Quote
  #17 (permalink)  
Old 07-05-2009, 11:07 AM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

thanks for answer)
importing and exporting DXF format files is general function!Good luck
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #18 (permalink)  
Old 07-09-2009, 08:37 PM
ceaser's Avatar
Basic4ppc Veteran
 
Join Date: May 2008
Location: Paarl, South Africa
Posts: 306
Default

Hi

I am posting a new version of my CAD program, but I need some help

Once you have drawn a couple of entities on the screen, click on the red cross at the bottom of the screen (this will cancel any drawing commands). Next you mark some entities on the screen. This you can do as if you where drawing a box. The program will then re-color all the drawing entities black (I am working on the routine to redraw the marked entities with dashed lines). Then you select the "Rotate" function to rotate the marked entities.

This all works fine, but when you release the stylus from the screen, the drawing is not right. There is something wrong with the formula that I am using!

Can anybody help please?

Thanks
Michael
Attached Files
File Type: zip Cad.zip (264.7 KB, 34 views)
Reply With Quote
  #19 (permalink)  
Old 07-09-2009, 09:51 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,827
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi Michael,

You should replace your code:
Code:
<font size="2"><font face="Courier New"><font size="2"><font face="Courier New">Drawing(i).X = RotX(Drawing(i).X - C, Drawing(i).Y - D, Angle) + C </font></font>
<font size=
"2"><font face="Courier New">Drawing(i).Y = RotY(Drawing(i).X - C, Drawing(i).Y - D, Angle) + D</font></font></font></font>
by this one:
Code:
<font face="Courier New"><font size="2"><font face="Courier New"><font size="2">xx = RotX(Drawing(i).X - C, Drawing(i).Y - D, Angle) + C </font></font>
<font size=
"2"><font face="Courier New">Drawing(i).Y = RotY(Drawing(i).X - C, Drawing(i).Y - D, Angle) + D</font></font>
<font size=
"2"><font face="Courier New">Drawing(i).X = xx</font></font></font></font>
You must introduce an intermediate variable, because in the 2nd equation you need the original value of Drawing(i).X and not the already modifyed one.

Best regards.
__________________
Klaus
Switzerland
Reply With Quote
  #20 (permalink)  
Old 07-09-2009, 10:06 PM
ceaser's Avatar
Basic4ppc Veteran
 
Join Date: May 2008
Location: Paarl, South Africa
Posts: 306
Default

Thanks Klaus

How about having different line types as a library?

My next post will have the option of opening and saving drawings in a DXF format.

Any idea where I can look to open and save drawings in a AutoCad format(dwg)?

Thanks
Michael
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Program not run under CF3.5 ? Paulsche Questions (Windows Mobile) 7 10-15-2008 04:23 PM
SQL Lite Lock 2220 Questions (Windows Mobile) 4 09-03-2008 10:09 AM
SQL-lite select using AND operator mozaharul Questions (Windows Mobile) 5 06-04-2008 08:27 AM
sql lite jchal Questions (Windows Mobile) 1 11-16-2007 12:41 PM
Basic4ppc Lite ? Erel Chit Chat 14 10-18-2007 09:58 PM


All times are GMT. The time now is 03:13 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0