Jump to content

Recommended Posts

Posted

Good Day

 

Looking for Assistance

 

UCS.jpg

 

With the image above

I would like the user to select the line to insert the selected section and extrude it according to the line

 

Have to orientate the UCS perpendicular to endpoint of line, Insert the Section, and then extrude it the same as the line length chosen.

 

Just need assistance in defining the UCS's to the line??

 

Any help most appreciated

 

Thanks in Advance

Posted

Not tested :

 
Public Shared Sub UcsByLine(ln As Line)
Dim pt1 As Point3d = ln.StartPoint 
Dim pt2 As Point3d = ln.EndPoint
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim zAxis As Vector3d = ed.CurrentUserCoordinateSystem.CoordinateSystem3d.Zaxis
Dim xAxis As Vector3d = pt1.GetVectorTo(pt2).GetNormal()
Dim yAxis As Vector3d = zAxis.CrossProduct(xAxis).GetNormal()
Dim mat As Matrix3d = Matrix3d.AlignCoordinateSystem(Point3d.Origin, Vector3d.XAxis, Vector3d.YAxis, Vector3d.ZAxis, pt1, xAxis, _
yAxis, zAxis)
ed.CurrentUserCoordinateSystem = mat
'ed.UpdateTiledViewportsFromDatabase();
End Sub

 

~'J'~

Posted

Thanking You Kindly

 

My (Our) application is coming quiet fine

Apprecite your input again

 

Enjoy the day

  • 3 weeks later...
Posted

Sorry for the late response

I've lost this thread

You're quite welcome

Happy coding :)

Regards,

 

Oleg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...