What does the overrideJoins parameter do in CurveElement.SetGeometryCurve?

What does the overrideJoins parameter do in CurveElement.SetGeometryCurve?

stefanome
Collaborator Collaborator
285 Views
0 Replies
Message 1 of 1

What does the overrideJoins parameter do in CurveElement.SetGeometryCurve?

stefanome
Collaborator
Collaborator

I figured it out, so I will post the question with the answer anyway, for anybody interested (and for me, the next time I need it, because sometimes I'm a little forgetful):

  • If set to true it will set the new geometry for the curve element
  • If set to false, after setting the geometry, it will try to satisfy any constraint associated with the element

The following code:

tx.Start("Test 1");

var
plane = Plane.CreateByNormalAndOrigin(XYZ.BasisZ, XYZ.Zero);
var sketchPlane = SketchPlane.Create(doc, plane);
var p1 = new XYZ(0, 0, 0);
var p2 = new XYZ(10, 5, 0);
var p3 = new XYZ(20, 0, 0);
var p2Higher = new XYZ(10, 10, 0);

var line1 = doc.Create.NewModelCurve(Line.CreateBound(p1, p2), sketchPlane);
var line2 = doc.Create.NewModelCurve(Line.CreateBound(p2, p3), sketchPlane);
var line3 = doc.Create.NewModelCurve(Line.CreateBound(p2Higher, p3), sketchPlane);

tx.Commit();

tx.Start("Test 2");

line1.SetGeometryCurve(Line.CreateBound(p1, p2Higher), <false | false>);

tx.Commit();

Will return the following result:

stefanomenci_0-1620419102451.png

 

0 Likes
286 Views
0 Replies
Replies (0)