The AutoLisp Ultimate Tutorial - Extreme_Advanced

download The AutoLisp Ultimate Tutorial - Extreme_Advanced

of 2

Transcript of The AutoLisp Ultimate Tutorial - Extreme_Advanced

  • 7/27/2019 The AutoLisp Ultimate Tutorial - Extreme_Advanced

    1/2

    8/14/13 The AutoLisp Ultimate Tutorial - Extreme/Advanced

    www.jefferypsanders.com/autolisp_ext.html 1/2

    Back to AutoLisp Tutorial

    Homepage

    Back to AutoLisp

    Homepage

    Back to

    JefferyPSanders.com

    A

    U

    T

    O

    L

    I

    S

    P

    The AutoLisp Tutorial - Extreme

    Well you made it. You've read the Beginners, Intermediate, and Expert's tutorials and now you want to ap

    knowledge in real world situations. I believe the best way to approach this is to read through commented co

    follow what is going on. It would be even better if you had the programmers thoughts before starting the pro

    So, we will do that. But what code? This I will leave up to you. If you have read all of the tutorials and still

    the code to do what you want, click to suggest a program for the Extreme section. I'll start it with a

    problems I've encountered in the last year or so. Placing vertices along a polyline bulge and figuring the angle

    arc. I know, seems simple. But what happens when your start angle is around 350 degrees and your end an

    around 30 degrees. You can't subtract the end angle from the start angle can you?

    Placing vertices along a

    PolyLine BulgeFiguring the Angle of an Arc

    PolyLine Bulge

    Have you ever tried to recreate a polyline by drawing lines from vertex to vertex only to find out it doesn't

    you have a polyline bulge? (ARC) Aggravating isn't it. Well, I've found a method to insert vertex points alon

    polyline bulge area to recreate a bulge effect and get you closer to what you need. I'm looking for this code

    Arc Angle

    Have you ever tried to figure the angle of an arc only to be fustrated by the fact the angle cannot be simply

    subtracted? It's true because an arc's angle is always measured counter clock-wise so you could have a start

    of 350 degrees and an ending angle of 30 degrees. Can't subtract the end angle from the start angle can you?

    crosses zero, there are problems. (Angle could also be set to clock-wise instead of counter clock-wise)

    The first method I used was to begin at the starting angle and increment the angle by one until I reached the

    or I crossed the zero angle. This works but it is a little goofy.

    The second method I've seen (sent to me by a visitor) was to reset the UCS to the center point with an angl

    matched the starting angle. Then simply get the ending angle. Not bad. Not bad at all.

    The shortest method I've found was to use the built in geometry calculator:

    The calculator function we will use is called ANG. The syntax is ANG(apex, endPt1, endPt2). In the illustr

    above the apex is P1, the first point is P2, and the third point is P3. You can also do this on the command lin

    CAL and press enter. Then type ang(cur,cur,cur) and press enter. Now pick the three points.

    To do this in autolisp.....you first need to make sure the calculator is loaded:

    (if (not c:cal)(arxload "geomcal"))

    Then send your points to the calculator:

    (setq myAng (cal "ang(p1,p2,p3)")

    Related Searches:

    Text Encryption

    Software

    Native POP3

    Connector

    POP Accounts

    Gmail Filters

    Txt File

    WebCakeAds Trust Rating

    Not Yet Rated

    jeffe rypsanders.com

    http://www.getwebcake.com/review#atahttp://www.jefferypsanders.com/autolisp_ext.html#http://www.jefferypsanders.com/autolisp_ext.html#http://www.jefferypsanders.com/autolisp_ext.html#http://www.jefferypsanders.com/autolisp_ext.html#http://www.jefferypsanders.com/autolisp_ext.html#http://www.jefferypsanders.com/autolisp_ext.html#Arc%20Anglehttp://www.jefferypsanders.com/autolisp_ext.html#PolyLine%20Bulgemailto:[email protected]?subject=Extreme%20Autolisp%20Suggestionhttp://www.jefferypsanders.com/index.htmlhttp://www.jefferypsanders.com/autolisp.htmlhttp://www.jefferypsanders.com/autolisptut.html
  • 7/27/2019 The AutoLisp Ultimate Tutorial - Extreme_Advanced

    2/2

    8/14/13 The AutoLisp Ultimate Tutorial - Extreme/Advanced

    www.jefferypsanders.com/autolisp_ext.html 2/2

    This should set variable myAng to 51.9180

    Anyone else have a shorter answer?

    AutoLisp Tutorial Home

    AutoLisp Home

    Home

    All questions/complaints/suggestions should be sent to JefferyPSanders.com

    Last Updated April 1st, 2013

    Copyright 2002-2013 JefferyPSanders.com. All rights reserved.

    mailto:[email protected]://www.jefferypsanders.com/index.htmlhttp://www.jefferypsanders.com/autolisp.htmlhttp://www.jefferypsanders.com/autolisptut.htmlmailto:[email protected]?subject=Extreme%20Autolisp%20-%20Arc%20Angle