• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

use of the command "trim"

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,

I wrote this code:
Code:
 (seq distance (/ (distance point1 point2) 2))

(command "_line" point1 point2")
(setq line1 "_last")
(command "_line" point1 point3")
(setq line2 "_last")
(command "_circle" point1 distance")
(setq circle "_last")

(command "_trim" circle "" line1 line2 "")
the result consists of 2 lines springing from point1 to point2 and point3 and a circle with origin in point1 and radius = distance.
I would like to delete the part of the circle placed outside of line1 - line2 leaving the inner one.
Alternatively, perhaps better, you could trace an arc between the average line1 with radius = distance up to line2.
the last line of code not by mistake but it does not work well.
Thank you.
 
Hello everyone,
I answer myself having found the solution to my question.
the problem consists of cutting the circle for the portion between two lines springing from a common summit.
In practice I want to display the arc that represents the width of the angle between two lines.
Here's the code I wrote:
Code:
 (setq dist1 (/distance point1 point2) 2)
(setq dist2 (/distance point3 point2) 2)
(setq angle1 (angle point2 point1))
(setq angle2 (angle point2 point3))

(if)
(setq minor dist1)
(Sect minor dist2)
);

(setq ptx1 (polar point2 angle1 minor))
(setq ptx2 (polar point2 angle2 minor)

(command "_line" point1 point2")
(command "_change" "_last" "_p" "_c" "_red"")
(setq line1 "_last")
(command "_line" point2 point3")
(command "_change" "_last" "_p" "_c" "_red"")
(setq line2 "_last")
(command "_circle" point2 minor")
(command "_change" "_last" "_p" "_c" "_red"")
(setq circle "_last")
(command "_break" circle ptx1 ptx2 ")
where point2 is the common summit, point1 and point3 the direction and end of the vectors.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top