Add vertical relationship between between line midpoint and origin of the refplane

Valued Contributor
Valued Contributor

 

Dear Jason, how to add vertical relationship between between line midpoint and origin of the refplane in C++? Just like the picture.

 

Posted by: assassin 007
Post date: 9/18/2009 9:24:45 PM

3 REPLIES

RE: Add vertical relationship between between line midpoint and origin of the refplane

Valued Contributor
Valued Contributor

Jason, thanks!

 

Posted by: assassin 007
Post date: 9/18/2009 9:25:51 PM

Re: RE: Add vertical relationship between between line midpoint and origin of the refplane

Creator
Creator

So how do you do this?

Re: RE: Add vertical relationship between between line midpoint and origin of the refplane

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

You do that by projecting the refplanes onto your profile and then adding a vertical/horizontal align relations, like shown in the following code excerpt (most of the code can be found in another post):

' Make the rectangle symmetric to the origin
Dim LX As SolidEdgeFrameworkSupport.Line2d = objProf.ProjectRefPlane(objDoc.RefPlanes.Item(3))
Dim LY As SolidEdgeFrameworkSupport.Line2d = objProf.ProjectRefPlane(objDoc.RefPlanes.Item(2))
objRels.AddVerticalAlign(L1, SolidEdgeConstants.KeypointIndexConstants.igLineMiddle, LX, SolidEdgeConstants.KeypointIndexConstants.igLineMiddle)
objRels.AddHorizontalAlign(L2, SolidEdgeConstants.KeypointIndexConstants.igLineMiddle, LY, SolidEdgeConstants.KeypointIndexConstants.igLineMiddle)