Jump to content

Search the Community

Showing results for tags 'perpendicular distance'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 2 results

  1. Hello! Quick FYI: (1) I am a brand new forum member, but I have looked up CAD issues on CADTutor various times! (2) I believe myself to be an intermediate level skilled CAD user Goal: I am trying to create a dynamic block of plywood that can be rotated, lengthened, and thickened. The block would contain two parallel lines and a hatch between them. I think I can achieve the lengthening with linear stretch and the thickening I can probably figure out, but I do need help with the rotation! Please see image for desired result: I have tried chained rotation actions, but the lines do not remain the same distance apart. Also, when all objects are rotated about the origin, the top line extrudes horizontally past the bottom (origin) which I do not want. I am not sure how wordy to be with my explanation, so I will leave it at this for now. Let me know if I need to provide anything else!
  2. Hello All I'm trying to write a vba routine which allows me to get the starting width and length of a polyline shape by specifying three points. The polyline will usually be made up of orthographic straight lines (but not always) Points 1 and 2 are the start and end points of the first side, from which I get the starting width and angle of the first side. Point 3 is a point anywhere on the opposite side. The length of the bay is the perpendicular distance between Point 3 and the first side (a line joining Points 1 & 2). I have written a (crude) LISP routine using vlax-curve-getClosestPointTo, but I now would like to write a vba routine to achieve the same thing. The purpose of the routine is to assist in the production of pre-cast floor layout drawings. The polyline shape would be a bay in a building drawing; the width would provide the pre-cast beam length; the length would provide the length of flooring to fill. Can anybody please help or point me in the right direction? Many thanks ;; dtr - degrees to radians ;; rtd - radians to degrees (defun dtr (a) (* pi (/ a 180.0)) ) (defun rtd (a) (/ (* a 180.0 pi)) ) (defun C:bay (/ pt1 pt2 pt3 pt4) (setq OrigCmdEcho (getvar "CMDECHO")); gets CMDECHO value (setvar "CMDECHO" 0); sets to 0 - wont echo on command line (vl-load-com) (setq pt1 (getpoint "\Enter Point 1 : ")) (setq pt2 (getpoint pt1 "\nEnter point 2 : ")) (setq myline (command "_line" pt1 pt2 ""));draws 1st line (setq mylinename (entlast));obtain entity name of myline (setq pt3 (getpoint pt2 "\nEnter Point 3 : ")); get point on opposite side of rectangle (setq Span (distance pt1 pt2)); sets Span = length of myline (setq ang1 (angle pt1 pt2)); sets ang1 equal to line angle (setq mylinenamevla (vlax-ename->vla-object mylinename)); converts to vla object (setq pt4 (vlax-curve-getClosestPointTo mylinenamevla pt3 T)); gets perpendicular point (setq perpline (command "_line" pt3 pt4 "")); draws perpendicular line (setq perplinename (entlast));obtain entity name of perpline (setq bayl (distance pt3 pt4)); sets bay length to length of perpline (princ "\nSpan is : ")(princ Span) (princ "\nBay length is : ")(princ bayl) (command "_erase" mylinename "") (command "_erase" perplinename "") (setvar "CMDECHO" OrigCmdEcho); puts back to original value (princ) )
×
×
  • Create New...