To create single SketchPoint at coincident point

To create single SketchPoint at coincident point

Anonymous
Not applicable
495 Views
1 Reply
Message 1 of 2

To create single SketchPoint at coincident point

Anonymous
Not applicable

Hi,

 

Suppose I have created two lines as follows:

 

CComPtr<Point2d> point1, point2, point3;
TransientGeometry::CreatePoint2d(1, 1, &point1);
TransientGeometry::CreatePoint2d(10,10, &point2);

 

CComPtr<SketchLine> sketchLine1, sketchLine2;

SketchLines::AddByTwoPoints(point1, point2, &sketchLine1);

 

TransientGeometry::CreatePoint2d(10,20, &point3);

SketchLines::AddByTwoPoints(point2, point3, &sketchLine2);

 

The above code creates two sketch lines(sketchLine1 and sketchLine2) which are coincident at point2.

 

Now, if I get the points "sketchLine1->GetEndSketchPoint()" and "sketchLine2->GetStartSketchPoint()", gives the different SketchPoint pointers. That means Inventor creates two SketchPoint for the same geometry at point2.

 

My question:

Is there any facility to avoid creating SketchPoint at the coincident points with same geometry? OR Can we merge SketchPoint pointers to single pointer having the geomtry within tolerance?

 

Please reply soon. Thanks in advance!!!

0 Likes
Accepted solutions (1)
496 Views
1 Reply
Reply (1)
Message 2 of 2

Vladimir.Ananyev
Alumni
Alumni
Accepted solution

1) You may first create three SketchPoint objects and then both SketchLines.

2) You may call SketchPoint.Merge method to merge overlapping ends of these lines.

3) You may create the second SketchLine using start or end SketchPoint of the alredy existed SketchLine.

cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes