Jump to content

Scale objects along 1 axis


Randolph

Recommended Posts

Don't be too pissed, cause it's "._fillet" anyway :P.

 

But to be honest, I'm really happy and wanted to thank you for all your help, Alan.

Link to comment
Share on other sites

  • Replies 34
  • Created
  • Last Reply

Top Posters In This Topic

  • Randolph

    18

  • alanjt

    13

  • ica_cici

    3

  • lpseifert

    1

Top Posters In This Topic

Posted Images

Don't be too pissed, cause it's "._fillet" anyway :P.

 

But to be honest, I'm really happy and wanted to thank you for all your help, Alan.

 

The order _. or ._ does not matter.

 

You are quite welcome :)

 

What are the bugs with XYZ? You never gave a response after I posted the link to the subroutine.

Link to comment
Share on other sites

Oh yes, i did give response, right after you posted your gif animation. Quote:

 

Hi Alan, thanks, but don't be too bored:

 

 
Befehl: xyzObjekte wählen: 1 gefundenObjekte wählen:Specify base point:Geometry factor to scale [X/Y/Z]: xError: no function definition: AT:INSERTBLOCK

 

Gefunden means found.

Link to comment
Share on other sites

Oh yes, i did give response, right after you posted your gif animation. Quote:

 

Hi Alan, thanks, but don't be too bored:

 

 
Befehl: xyzObjekte wählen: 1 gefundenObjekte wählen:Specify base point:Geometry factor to scale [X/Y/Z]: xError: no function definition: AT:INSERTBLOCK

Gefunden means found.

 

LoL

I responded to that like 8 hours ago.

 

POST.jpg

Link to comment
Share on other sites

Ah, ok, that was when I was in trouble at work.

 

So I copy&paste both your xyz.lisp and insertblock somewhere into my general acad.lisp?

 

Got to go to sleep now, it's past 23:00 round here an I got to get up tomorrow. Good night!

Link to comment
Share on other sites

Ah, ok, that was when I was in trouble at work.

 

So I copy&paste both your xyz.lisp and insertblock somewhere into my general acad.lisp?

 

Got to go to sleep now, it's past 23:00 round here an I got to get up tomorrow. Good night!

 

Just stick it in the same .lsp file as XYZ.

 

It's 5pm here. :)

Link to comment
Share on other sites

Hi Ica,

 

I tried it and it worked so far. The problem is - as far as I have seen, that I have to know the original and the new length. As in most cases I don't know either, I would have to measure. Now my original length is 213,17 cm (for example a wall which has been cut at an angle), and my new length should be 429,38 cm. Do I have to enter both values manually?

 

Yes, you do. Just input the reference and the new length, no need to find the scale factor. It will be more complicated to find the scale factor if it's not an integer and you'll get imprecision dimension (just like your values).:)

Link to comment
Share on other sites

"It's 5pm here." So you mean 17:00 ? :) Going to try your routine asap. And it's now half past three and seven minutes in the afternoon.

 

Concerning precision: If I have to measure and re-enter my values, I get the precision problem right there. Or how many decimals am I supposed to enter? And in your example - it doesn't seem to make much any differnece whether I enter "1" and "2" or "2" and "4". In short: it would be great if your routine would reference.

Link to comment
Share on other sites

"It's 5pm here." So you mean 17:00 ? :) Going to try your routine asap. And it's now half past three and seven minutes in the afternoon.

 

Concerning precision: If I have to measure and re-enter my values, I get the precision problem right there. Or how many decimals am I supposed to enter? And in your example - it doesn't seem to make much any differnece whether I enter "1" and "2" or "2" and "4". In short: it would be great if your routine would reference.

I put something together with what information I had. It scales the X,Y,Z values based on distance provided, you can pick a distance. As far as referencing, give it a shot.

Link to comment
Share on other sites

Sorry Alan, misunderstanding, the answer about precision went to ica-cici. His routine (fit.lsp) works quite well with staircases, where I know the old and the new length exactly. - I already saw that your xyz.lsp had a reference mode, but I still had no time adding the insertblock-function and trying. I also have the "strange" rotated text example ready, but always someone working on my internet computer at work (I prefer a standalone machine for my work for safety reasons).

Link to comment
Share on other sites

Hi Alan,

 

at last I had time to try your xyz.lsp together with the insertblock function. It works and makes me happy - thanxalot!

 

Concerning referencing, you said, I should "give it a shot". Sorry to say, my English isn't good enough to understand the meaning of that. It seems to mean, that xyz.lsp can't reference an old an a new length. This would be rather helpful, though.

 

I have here a little code which does this along all axis - quite simple. Could you please somehow insert this into your cool feature?

 

 
(DEFUN C:VB ()
(SETQ OBJEKTE (SSGET))
(SETQ MPUNKT (GETPOINT "\nBasispunkt :"))
(SETQ PUNKT1 (GETPOINT "\nBasis (ALT) :")) 
(SETQ PUNKT2 (GETPOINT "\nBasis (NEU) :"))
(COMMAND "_OSNAP" "")
(COMMAND "_SCALE" "_SI" OBJEKTE MPUNKT "_R" MPUNKT PUNKT1 PUNKT2)
(COMMAND "_OSNAP" "_END,_INT,_MID,_CEN,_INS,_PER")
(COMMAND "_REDRAW")
(SETQ OBJEKTE NIL)

)

 

PS: I also add the long promised "strange text" that won't be rotated by zerorotation.lsp.

zerorotation - strange text.dwg

Link to comment
Share on other sites

Hi Alan,

 

at last I had time to try your xyz.lsp together with the insertblock function. It works and makes me happy - thanxalot!

 

Concerning referencing, you said, I should "give it a shot". Sorry to say, my English isn't good enough to understand the meaning of that. It seems to mean, that xyz.lsp can't reference an old an a new length. This would be rather helpful, though.

 

I have here a little code which does this along all axis - quite simple. Could you please somehow insert this into your cool feature?

 

 
(DEFUN C:VB ()
(SETQ OBJEKTE (SSGET))
(SETQ MPUNKT (GETPOINT "\nBasispunkt :"))
(SETQ PUNKT1 (GETPOINT "\nBasis (ALT) :")) 
(SETQ PUNKT2 (GETPOINT "\nBasis (NEU) :"))
(COMMAND "_OSNAP" "")
(COMMAND "_SCALE" "_SI" OBJEKTE MPUNKT "_R" MPUNKT PUNKT1 PUNKT2)
(COMMAND "_OSNAP" "_END,_INT,_MID,_CEN,_INS,_PER")
(COMMAND "_REDRAW")
(SETQ OBJEKTE NIL)

)

 

PS: I also add the long promised "strange text" that won't be rotated by zerorotation.lsp.

 

What I meant was, I've spent quite a bit of time of this and you still want more. However, if I have time, I'll look at it. I'm pretty swamped this week.

 

Thanks for posting the object. It's not ZeroRotation, your block (not text) has the attributes rotated within the block definition. You would need to fix the block.

 

StrangeBlock.jpg

Link to comment
Share on other sites

"What I meant was, I've spent quite a bit of time of this and you still want more."

 

OK, I see that I am too greedy - I don't want to be an annoyance. I thought it was some kind of sport for you, shooting with creativity every time I came up with a problem. Please, if it is stress instead, just leave it. All these are "nice to haves", but nothing I'm depending on. Same goes for the other posts I submitted today. Thank you for all your help so far!

 

Concerning the block, I imported it from a drawing I got. I even think it originates from another application.

Link to comment
Share on other sites

"What I meant was, I've spent quite a bit of time of this and you still want more."

 

OK, I see that I am too greedy - I don't want to be an annoyance. I thought it was some kind of sport for you, shooting with creativity every time I came up with a problem. Please, if it is stress instead, just leave it. All these are "nice to haves", but nothing I'm depending on. Same goes for the other posts I submitted today. Thank you for all your help so far!

 

Concerning the block, I imported it from a drawing I got. I even think it originates from another application.

 

 

I'm not annoyed at all. :) I like working these out, it's a nice puzzle to ease my mind in the evenings (when I have time). More than anything, I want people to try it for themselves. I learned how to program so I wouldn't have to ask someone else. Believe me, I'll tell you if I'm annoyed. :)

Link to comment
Share on other sites

Yeah, I learned so many things, like geometry and statics and in earlier times also programming (but not lisp) ... at the time, I have 2 luxury houses to plan. But I always try to understand the lisp routines ... promise ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...