Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[CONNECT .NET] How do I use CurveVector.CloneWithFillets?

$
0
0

How does CurveVector.CloneWithFillets work?  Both the MicroStationAPI and DgnPlatformNet documentation are, as usual, enigmatic.  There is no example delivered with the SDK.

I wrote this test code.  It creates a pair of intersecting lines...

Crossed Lines

Then attempts to create a fillet between them....

DgnModel model = Session.Instance.GetActiveDgnModel();
double uors = model.GetModelInfo().UorPerMaster;
DSegment3d s1 = new DSegment3d(new DPoint3d(0.0 * uors, 0.0 * uors), new DPoint3d(10.0*uors, 10.0 * uors));
LineElement l1 = new LineElement(Session.Instance.GetActiveDgnModel(), null, s1);
l1.AddToModel();
DSegment3d s2 = new DSegment3d(new DPoint3d(10.0 * uors, 0.0 * uors), new DPoint3d(0.0 * uors, 10.0 * uors));
LineElement l2 = new LineElement(Session.Instance.GetActiveDgnModel(), null, s2);
l2.AddToModel();
// CurveVector from BentleyGeometryNET
CurveVector cv1 = l1.GetCurveVector();
CurveVector cv2 = l2.GetCurveVector();
CurvePrimitive cp1 = cv1.GetPrimitive(0);
CurveVector combined = new CurveVector(CurveVector.BoundaryType.Open);
combined.Add(cp1);
CurvePrimitive cp2 = cv2.GetPrimitive(0);
combined.Add(cp2);
double radius = 2.0 * uors;
CurveVector fillet = combined.CloneWithFillets(radius);
// Convert CurveVector to Element
ComplexStringElement filletElement = new ComplexStringElement(model, null);
filletElement.SetCurveVector(fillet);
filletElement.AddToModel();

The result is not a fillet, but the two crossed lines and a zinger connecting their end points...

ZingerZinger

Can anyone suggest a better (correct) way to use CloneWithFillets?


Viewing all articles
Browse latest Browse all 7260

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>