View Full Version : extrim in vb
2004-09-19, 11:32 AM
wanna create command in vba just like 'extrim' but with modifications, so i take a look at the lsp
but i really dont know lisp, so dont know what it does
i would like to know the procedure of this lsp just to start the same in vba
anyone can help?¿
2004-10-02, 04:38 AM
Well, since no one else helped you, I might as well. To cut to the chase, forget this and move on because there is nothing in here that can really help you. This lisp uses the TRIM command to do the trimming and plays around with moving objects around incase the object has a linetype that includes "spaces" that would not be caught using TRIM [that won't happen using vb/a].
In vb/a, there is no trim command so you need to make your own. Yes, you could 'cop' out and usee the sendcommand but I wouldn't recommend it because you'll face the same hurdles as the lisp approach plus more. What you need to do is define your trim boundary object[s] and check for intersections using IntersectsWith. For anything that does intersect, grab the intersection point and revise the entity's start/end point to be the intersection point. A lot more difficult than it sounds but it can be done.
2004-10-04, 03:34 PM
What you need to do is define your trim boundary object[s] and check for intersections using IntersectsWith. For anything that does intersect, grab the intersection point and revise the entity's start/end point to be the intersection point. A lot more difficult than it sounds but it can be done.
this part is not difficult, but once you have the intersection points and break a line in two parts you must decide wich part is inside and wich outside, thats the problem
i saw a post in other forum about this, making a ray from a point (the vertex of every part of the line in this case) you know if is inside a boundary cos the ray have a pair number of intersects (impair if is outside)
but looking the lisp (dont know lisp but can catch some process) it seems to use other method, so i wanted to know what kind of process it uses, an general idea to start my vba routine
2004-10-04, 09:32 PM
Ok, first off you're not going to break anything in vba - you're going to change points. Use the thread you mentioned and try approaching it that way. When I said the lisp routine was using the TRIM command, I meant it. It is drawing a fence, based on user input and trimming with it. The user is selecting inside the boundary for the program. I saw nothing for figuring out inside vs outside. You could also try posting in the AutoLISP ng and you might get a better answer because my lisp is rusty.
2004-10-05, 12:18 AM
ok, ill try in lisp forum
thanks for you reply
2004-10-06, 03:43 AM
... because my lisp is rusty.
:veryevil: Shouldn't that be: "my lipth ith ruthty?"
2004-10-06, 04:17 AM
Nice! Should've seen that one coming! =)
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.