How to do a plane with 3 points?


Hi, I'm trying to draw a plane how contains 3 points that i want, i using vb6, i create 3 points but when i using the command

objRefPanes.AddBy3Points(NumEdges-->I don´t know really what i have to put here, KeyPointTypeConstants-->I don´t know really what i have to put here, Local--> Here i put a 0)

The problem is that this method  does not draw the plane, and I think the problem is in the parameters that i step to the method, since everything is OK until that point.

Somebody can help me?

Thank you for all.


Posted by: miguel kñajksf
Post date: 8/3/2008 11:50:31 PM


RE: How to do a plane with 3 points?

AddBy3Points is a bit misleading. The input is an array of dispatch pointers to edges that already exists in the document.


If you have three points then create the x, y and z axis that you want and add a coordinate system using AddByMatrix.


Then call GetAxis( SolidEdgePart::seCoordSysZAxis ) on the coordinate system.


Finally call AddNormalToCurve. Something like this:


AddNormalToCurve( pZaxis, SolidEdgePart::igCurveStart, (LPDISPATCH)pZaxis, SolidEdgePart::igCurveStart, VARIANT_TRUE )


If you don't want the coord system to display but it does, the CS has a Visible property.


I have not used the AddBy3Points but I assume that one can call GetAxis two more times to get the x and y axis and then make the call to AddBy3Points. I have not tried that but I think there is no reason it should not work.


For an assembly after creating the CS and getting the z-axis I have done this:


IDispatchPtr pPlane = pCoordinateSystem->GetPlane( seCoordSysZXPlane );


if( NULL != pPlane )


AsmRefPlanesPtr pAsmRefPlanes = pAssemblyDoc->AsmRefPlanes;


if( NULL != pAsmRefPlanes )


pAsmRefPlane = pAsmRefPlanes->AddNormalToCurveAtDistanceAlongCurve( pZaxis, pPlane, 0.0, PI, igReverseNormalSide, igCurveStart );






Posted by: R.D. Holland
Post date: 9/3/2008 6:38:24 AM