Hello guys
I am a newbie.
I need to make an edge IEdge_Dg straight. I see there is a SetCurve method, so the main question I have is how do I construct a straight line, which is actually a ICurve_DG?
Anything else I need to know to modify the edge?
Thanks heaps
Joel
Straight line as ICurve_DG
-
- Posts: 4
- Joined: Thu Jun 18, 2020 3:51 am
Re: Straight line as ICurve_DG
Try this:
The line must contain vertices of the edge up to a tolerance. Normally you determine the vertex positions first and then define the line using line.Init1(pt0, pt1);
Code: Select all
IModel_DG iModel;
IObjectGenerator_DG gtr = iModel as IObjectGenerator_DG;
ILine_DG line = gtr.Create("Line_DG") as ILine_DG;
// Define the line like
LineDg lineDg = new LineDg(1, 0, 0, 0, 0, 1); //Position and direction. See C# examples for LineDg.
line.Init2(lineDg);
// Query the curve
ICurve_DG curv = line as ICurve_DG;