Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I am creating a cad application to create pettern draft. But this thing(draw) is new to me so i dont kown how can i achive this.

I want to create a vertical hexagonal grid and map each hex with index. Then i draw a straight line from top to bottom then user can edit that line by draging points on the line. Much like wilcom es designer. But i need a simple line which either can streach right and left. Like zigzag pettern. Any ideas how can i do that?

What I have tried:

I have searched lot of forum but didnt came to any solution. I tried some tricks and able to draw line in zigzag pettern but now i dont know how to do i make it like user can edit that line.
Posted
Comments
BillWoodruff 7-Aug-16 15:36pm    
The type of application you want to create requires creating persistent, editable, graphic object. This is very complex and I suggest you don't try this in Windows Forms. Think about either WPF or straight C++ combined with a grapics utility library.

Unless you are a very advanced programmer and expert with the language and OS you are going to do this in, you should realize this project may take you years.
ANKIT KHOKHAR 8-Aug-16 12:33pm    
Thank you sir. Actually i dont know wpf much and prefer windows form instead. I saw same application that i am trying to make on windows form. So i am recreating it.
Ronnie Kong 22-Sep-16 15:41pm    
Bill is right on each point.

AutoCAD uses a database to store the graphic entities - I have personally worked with the database directly to sort and amend the graphic entities on naval vessel architectural tapes (.dwg) and (.dxf); and find that it works well.

The next big concern would be the graphics code you would need to write, maintain, and iterate through to handle your camera/view-ports - That's where I'm going to save myself the headache and use something already set up for graphics; like Bill said... I have made CAM software as a method of interfacing with cnc code for industrial plasma cutters using WPF and I would recommend doing the same.

It's certainly possible to do it with a form, and with that in mind - I know I'm not answering your question, but I've already been down this road and I just want to gently prod you towards what I've found to be an easier way.

Keep in mind even after you can store and draw entities you still need to be able to manipulate them... You'll need to be able to grab a circle by the center point, a line by the mid point, shorten and arc, join collinear segments, etc... all of that user interaction will require additional resources in the form of writing, maintaining, and iterating through code.

- Keep it short and simple.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900