Nevron .NET Vision Documentation
End Points Section

The end-points section defines the start and end points of a 1D shape. It is an optional section and is represented by an instance of the NEndPointsSection class. This section is created and accessed by the EndPointsSection property:

C#
Copy Code
// create the end points section and modify the start and end points
sheet.EndPointsSection = new NEndPointsSection();
sheet.EndPointsSection.StartX.Value = 130;
sheet.EndPointsSection.StartY.Value = 210;
sheet.EndPointsSection.EndX.Value = 170;
sheet.EndPointsSection.EndY.Value = 160;
Visual Basic
Copy Code
' create the end points section and modify the start and end points
sheet.EndPointsSection = New NEndPointsSection()
sheet.EndPointsSection.StartX.Value = 130
sheet.EndPointsSection.StartY.Value = 210
sheet.EndPointsSection.EndX.Value = 170
sheet.EndPointsSection.EndY.Value = 160

The end-points section contains the following set of named cells:

Cell Name Cell Type Description Notes
StartX Single Controls the X coordinate of the shape start point. Accessible from the StartX property. Usually a constant
StartY Single Controls the Y coordinate of the shape start point. Accessible from the StartY property. Usually a constant
EndX Single Controls the X coordinate of the shape end point. Accessible from the EndX property. Usually a constant
EndY Single Controls the Y coordinate of the shape end point. Accessible from the EndY property.  Usually a constant

Usually when you create a 1D shape the transform section of the sheet is also modified to represent the following: 
1. The Width is the distance between the start and end points

2. The Angle is the angle between the (start point, end point) vector and the X axis.

3. The Local Pin is the middle of the local coordinate system

4. The Pin is the middle of the (start point, end point) line segment.

5. The Height is a user defined constant

The following code example illustrates a typical transform section for a 1D shape:

C#
Copy Code
sheet.TransformSection.Width.Formula = "SQRT((EndX-StartX)^2+(EndY-StartY)^2)";
sheet.TransformSection.Height.Value = 193;
sheet.TransformSection.Angle.Formula = "ATAN2(EndY-StartY,EndX-StartX)";
sheet.TransformSection.PinX.Formula = "(StartX+EndX)/2";
sheet.TransformSection.PinY.Formula = "(StartY+EndY)/2";
sheet.TransformSection.LocPinX.Formula = "Width*0.5";
sheet.TransformSection.LocPinY.Formula = "Height*0.5";
Visual Basic
Copy Code
sheet.TransformSection.Width.Formula = "SQRT((EndX-StartX)^2+(EndY-StartY)^2)"
sheet.TransformSection.Height.Value = 193
sheet.TransformSection.Angle.Formula = "ATAN2(EndY-StartY,EndX-StartX)"
sheet.TransformSection.PinX.Formula = "(StartX+EndX)/2"
sheet.TransformSection.PinY.Formula = "(StartY+EndY)/2"
sheet.TransformSection.LocPinX.Formula = "Width*0.5"
sheet.TransformSection.LocPinY.Formula = "Height*0.5"
See Also

 

 


©2017. Nevron Software LLC.

Send Feedback