This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IC > IConstructCircularArc Interface > IConstructCircularArc.QueryFilletRadiusRange Method (ArcObjects .NET 10.4 SDK) |
Returns minimum and maximum radius for fillet to touch both input segments. hintPoint can be nil or can be a location near the desired fillet.
[Visual Basic .NET] Public Sub QueryFilletRadiusRange ( _ ByVal s1 As ISegment, _ ByVal s2 As ISegment, _ ByVal hintPoint As IPoint, _ ByRef minRadius As Double, _ ByRef maxRadius As Double _ )
[C#] public void QueryFilletRadiusRange ( ISegment s1, ISegment s2, IPoint hintPoint, ref double minRadius, ref double maxRadius );
[C++]
HRESULT QueryFilletRadiusRange(
ISegment* s1,
ISegment* s2,
IPoint* hintPoint,
double* minRadius,
double* maxRadius
);
[C++]
Parameters s1
s1 is a parameter of type ISegment s2
s2 is a parameter of type ISegment hintPoint
hintPoint is a parameter of type IPoint minRadius [out] minRadius is a parameter of type double maxRadius [out] maxRadius is a parameter of type double
A Fillet Arc is a CircularArc constructed between two input segments such that the CircularArc is tangential to both embedded segments at the Fillet Arc endpoints. QueryFilletRadiusRange determines the Maximum and Minimum Fillet Arc Radii in the region of the given Hint Point that can be used in ConstructFilletRadius such that the endpoints of the Fillet Arc lie on both input curves without extension. If no such Radii exist for the given Hint Point, an error is returned.
private void QueryFilletRadiusRange()
{
IConstructCircularArc constructCircularArc=new CircularArcClass();
ICircularArc circularArc=constructCircularArc as ICircularArc;
IPoint fromPoint1=new PointClass();
fromPoint1.PutCoords(100, 100);
IPoint toPoint1=new PointClass();
toPoint1.PutCoords(50, 50);
ILine line1=new LineClass();
line1.PutCoords(fromPoint1, toPoint1);
IPoint fromPoint2=new PointClass();
fromPoint2.PutCoords(100, 100);
IPoint toPoint2=new PointClass();
toPoint2.PutCoords(150, 50);
ILine line2=new LineClass();
line2.PutCoords(fromPoint2, toPoint2);
IPoint hintPoint=new PointClass();
hintPoint.PutCoords(100, 75);
//Discover min and max fillet radius
double minRadius;
double maxRadius;
constructCircularArc.QueryFilletRadiusRange(line1 as ISegment, line2 as ISegment, hintPoint, out minRadius, out maxRadius);
//Create a circular arc with the maxRadius
constructCircularArc.ConstructFilletRadius(line1 as ISegment, line2 as ISegment, maxRadius, hintPoint);
String report="Length : " + circularArc.Length + "\n" +
"Radius : " + circularArc.Radius + "\n" +
"Chord Height : " + circularArc.ChordHeight + "\n" +
"Central Angle (Rad) : " + circularArc.CentralAngle + "\n" +
"From Angle (Rad) : " + circularArc.FromAngle + "\n" +
"To Angle (Rad) : " + circularArc.ToAngle + "\n" +
"Center Point : " + circularArc.CenterPoint.X + " , " + circularArc.CenterPoint.Y + "\n" +
"From Point : " + circularArc.FromPoint.X + " , " + circularArc.FromPoint.Y + "\n" +
"To Point : " + circularArc.ToPoint.X + " , " + circularArc.ToPoint.Y;
System.Windows.Forms.MessageBox.Show(report);
}
IConstructCircularArc Interface | IConstructCircularArc.QueryFilletRadiusRange Method | IConstructCircularArc.ConstructFilletPoint Method | IConstructCircularArc.ConstructFilletRadius Method