Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9009083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:06:06+00:00 2026-06-16T02:06:06+00:00

I am programming a little program for interpreting and drawing G-Code (used for CNC

  • 0

I am programming a little program for interpreting and drawing G-Code (used for CNC – machines)

For linking two lines with a radius i wrote a little program and have to use the function Vector.Add.

No code, had probelems with formatting :)
p1,p2,p3 are the three points 
p1->p2 = vector ab 
p2->p3 = vector bc 
eab = Unit vector ab 
ebc = Unit vector bc 
eres = resulting vector 

My problem is: For the operation Vector.Add() I need a Vector and a Point(PointF is not allowed) but I have to use PointF due to the accuracy.
What shall I do?

eab = ab / ab.Length;
ebc = bc / bc.Length;
eres = Vector.Add(eab, ebc);
PointF test= new PointF();
test= Vector.Add(5 * eres, test ); 

I use System.Windows.Drawing for drawing and System.Windows.Base for the vectors.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:06:08+00:00Added an answer on June 16, 2026 at 2:06 am

    In the System.Drawing.dll, namespace System.Drawing, there are:

    public struct Point { ... }
    public struct PointF { ... }
    

    whose coordinates are int (System.Int32) and float (System.Single), respectively.

    In the WindowsBase.dll, namespace System.Windows, there is another:

    public struct Point { ... }
    

    whose coordinates are double (System.Double).

    If you need both, you can

    • Have both the directives using System.Drawing; and using System.Windows; at the same level in your file, and then inside the code give the full name (like e.g. System.Winodws.Point instead of just Point) whenever there’s disambiguity (that is whenever the compiler requires that). Or:
    • Have only one of the using directives (the one you use the most), and then give the full name in cases where you use types (like structs) from the other namespace. Or:
    • Create one or more using alias directives (see link).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am beginnner to programming. I wrote this little program to reverse a string.
I am new to programming, I have made a little program just to learn
I have very little programming knowledge; only a fair bit in Visual Basic. How
I have very little experience working with sockets and multithreaded programming so to learn
Warning: I have very little JavsScript experience. In my past programming experience, I usually
My 15 year old little brother is starting out programming, and he wrote a
I have been programming for a little while now, and I have a question
I have a program (process) which needs to listen on 3 ports... Two are
I am a little new to C programming. I was writing a C program
I have a little bit of C programming experience from school, but it was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.