Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB GDI GDI+ VB.NET AutoCAD
hi,for my project i need two SELECTABLE line at first & then the angel of them in vb.net
pleaseee help me
,can i import autocad or coreldraw toolbox controls to my project form?thats the famous angular dimension in them
Posted 30-Nov-11 0:51am
Comments
Member 8420085 at 30-Nov-11 6:36am
   
First thank alot,but how can i draw a line which i can select it later?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try the following link :
 
A Vector Type for C#
 
Or Check following Code :
VB.Net Code :
Public Shared Function ON_3dVectorAngle(ByVal v0 As On3dVector, ByVal v1 As On3dVector) _
  As Double
  ' Unitize the input vectors
  v0.Unitize()
  v1.Unitize()
  Dim dot As Double = OnUtil.ON_DotProduct(v0, v1)
 
  ' Force the dot product of the two input vectors to 
  ' fall within the domain for inverse cosine, which 
  ' is -1 <= x <= 1. This will prevent runtime 
  ' "domain error" math exceptions.
  If (dot < -1.0) Then dot = -1.0
  If (dot > 1.0) Then dot = 1.0
  Return System.Math.Acos(dot)
End Function
C# Code :
public static double ON_3dVectorAngle(On3dVector v0, On3dVector v1)
{
  // Unitize the input vectors
  v0.Unitize();
  v1.Unitize();
  double dot = OnUtil.ON_DotProduct(v0, v1);
 
  // Force the dot product of the two input vectors to 
  // fall within the domain for inverse cosine, which 
  // is -1 <= x <= 1. This will prevent runtime 
  // "domain error" math exceptions.
  dot = (dot < -1.0 ? -1.0 : (dot > 1.0 ? 1.0 : dot));
 
  return System.Math.Acos(dot);
}
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 240
1 Kamal Rocks 184
2 BillWoodruff 173
3 PIEBALDconsult 160
4 CPallini 155
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 30 Nov 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100