Draw circle in Intersection

Discussion in 'AutoCAD' started by antoniomiranda, Apr 28, 2004.

  1. Hello,

    I've one 3D file and i need to draw a circle in all intersection lines, if the difference of Z values (of each line) is greater than 0.20cm.

    Best regards,
    António Miranda.
     
    antoniomiranda, Apr 28, 2004
    #1
  2. antoniomiranda

    Perion Guest

    This is a great problem! If you can't get a good answer here try:
    http://www.vbdesign.net/

    Perion

    difference of Z values (of each line) is greater than 0.20cm.
     
    Perion, Apr 28, 2004
    #2
  3. antoniomiranda

    JLO Guest

    could you send me an example of yours entities??
    i will try to do it the application

    podrias mandarme un ejemplo del archivo DWG para ver las entidades y hacer
    la aplicacion y
    con un poco mas explicativo lo que deseas?

    si hablas espanol mejor!!
    saludos desde mexico

    the difference of Z values (of each line) is greater than 0.20cm.
     
    JLO, Apr 28, 2004
    #3
  4. antoniomiranda

    AKS Guest

    You could try the following brute force method (assuming the z tolerance is world z):

    -For each line compared to each other line - a pair

    -Calc xy slope for each line in pair
    -Throw out comparison if absolute value of slopes are equal (the lines are parallel)
    -Calc the xy intersection in the z plane. (ignore the z values)
    -Check if intersection lies on both lines (true if distance between line ends equals sum of distances from ends to point. Use a tolerance
    number.) Throw out if check fails.
    -Now line pair in question intersects. Now check z values on each line at the xy intersection point. Place circle at xyz for both points
    (one on each line) if out of tolerance. (That way you can easily check the results by viewing the file from front or side etc.)

    -Next

    One reason this method is brute force is because for N lines each same pair is compared N times. It might still work fast enough. If not you
    could make an array of the line entity numbers where one part of the array is an index from 1 to N. Maybe the selection set works this way.
    Then as you go down the list comparing the Ith index line to all the Ith+1 to N th lines only. I think this would eliminate the duplications.


    AKS
     
    AKS, May 4, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.