Jump to content

Routine for Decomposition of Vectors


lizp

Recommended Posts

The dotted line looks nice but I think that the dots in the linetype I had in mind were not as rare as here. I reloaded it again and what I thought I was loading was a denser dotted line but when it's plotted it's different -- rarer. And yet it says ACAD_ISO07W100 (the one that looks good) has been loaded. Don't know what to make of it.

 

I'm assuming by "rarer" you mean the density of the dots in the linetype? - this can easily be modifed by the linetype-scale I am using. It looks pretty good on my tests but if you want it more/less dense, this can be arranged.

Link to comment
Share on other sites

  • Replies 231
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    107

  • lizp

    99

  • SEANT

    24

  • The Buzzard

    2

Top Posters In This Topic

Posted Images

Does the file write correctly for you now?

 

see the attached version for controlling the density of the linetype:

 

At the top of the LISP, underneath the filepath specification, you will see

 

(setq dfac 200)

 

You can change this number to change the density of the dots in the lines - Higher = More Dense.

 

But I am still not sure about this...

 

I can scale them down - would you like them to be scaled as a factor of the vector length? Or would you rather keep them all the same size and just get rid of ones that are too small to fit?

Vector Analysis.lsp

Link to comment
Share on other sites

You will need to finish the filename with \\ as shown in my earlier post.

 

C:\\Folder\\SecondFolder\\

 

With this correction, works fine now.

Link to comment
Share on other sites

Now's the time to look at the changed curve (see attached). I extended slightly the original curve to the right (which unfortunately extended it also to the left which I didn't want) you drew and now strange things started to happen. While the Green components still seem to be fine all the Cyan components are reversed.

W30_changed_curve.dxf

Link to comment
Share on other sites

Now's the time to look at the changed curve (see attached). I extended slightly the original curve to the right (which unfortunately extended it also to the left which I didn't want) you drew and now strange things started to happen. While the Green components still seem to be fine all the Cyan components are reversed.

 

I need a different filetype ('04).

 

Also, what on those leads... :P

Link to comment
Share on other sites

I extended slightly the original curve to the right (which unfortunately extended it also to the left which I didn't want)

 

This will happen with an ellipse, as it is symmetrical about its center point.

 

 

With all due respect, may I ask how much experience you have with AutoCAD?

Link to comment
Share on other sites

Sorry about that (see attached).

 

Also, leave the leads as they are. They look so good overall that probably we can put up with that little mess at the bottom.

 

I'm not sure what you did to the ellipse to make it perform like that, but I cannot replicate it - except on that same object.

 

I have redrawn an ellipse over that one, and all seems fine - so it can't be anything to do with the size, shape or position of the ellipse. - Hence I am stumped as to what else it could be...

Link to comment
Share on other sites

This will happen with an ellipse, as it is symmetrical about its center point.

 

 

With all due respect, may I ask how much experience you have with AutoCAD?

Not much experience at all. I specifically liked it for this particular project and, indeed, with you help, it turned out great.

 

As for the ellipse, I just highlighted it, clicked on the blue mark which appeared on the right-hand side and dragged it sideways. That's all I did. As I said, I tried to change its shape a little bit.

Link to comment
Share on other sites

The interesting thing is also that your last code somehow fixed my AutoCAD and it's not giving me any more the error messages regarding the customization I was trying to get rid of in all kinds of ways.

Link to comment
Share on other sites

The interesting thing is also that your last code somehow fixed my AutoCAD and it's not giving me any more the error messages regarding the customization I was trying to get rid of in all kinds of ways.

 

Thats always helpful :D

Link to comment
Share on other sites

Not much experience at all. I specifically liked it for this particular project and, indeed, with you help, it turned out great.

 

I thought so -

 

No offense intended, but I could tell from some of your earlier posts that the you were new to the AutoCAD side of things. :)

Link to comment
Share on other sites

I thought so -

 

No offense intended, but I could tell from some of your earlier posts that the you were new to the AutoCAD side of things. :)

 

However, maybe now when the actual trajectory (the curved Blue line) is to be optimized my weakness on the AutoCAD side of things will kick in more. Recall how the initial curved line was made up of tiny segments so that it can be leisurely adjusted to any whimsical form one needs to test. Now, somehow the contiguous curve you draw with a polyline is restricting that to a certain extent. Wonder if instead of polyline the curved line is drawn with using spline curve. Would the extremums of that spline curve be found the same way as they are on your polyline for any number of nodes of a spline curve of the same shape? What I mean is, if I'm explaining it correctly -- you can draw practically one and the same closed spline curve by clicking many times or by clicking fewer times. Will the Min and Max values of these two ways of generating it be the same, if they can be determined at all?

Link to comment
Share on other sites

Works really well with an ellipse (see attached). Unfortunately it's too symmetric and the net torque isn't that great. Recall with the earlier curve (asymmetric) it was somewhere around -900 units while with the ellipse I'm getting around -600 units. Doesn't allow you to touch it, though. Try to change it and you'll be sorry -- the Cyan vectors all go the other way. Can't imagine why that happens. So, probably, if one decides to work with ellipses one has to stay with the one drawn and if a change is needed one has to create a completely new drawing and not try to improve on that. Would like to have the curve (Blue) egg-shaped or pear-shaped but it won't happen with one ellipse. Maybe more than one, superimposed, might do the trick but haven't tried it yet.

 

I tried it also with Splines but it's not as smooth and the right-hand side gives me those weird Cyan vectors of the reverse sense. Same with Polyline, even worse. Most likely it's me because of my lack of experience with AutoCAD.

W30_ellipse_2004.dxf

Link to comment
Share on other sites

Works really well with an ellipse (see attached). Unfortunately it's too symmetric and the net torque isn't that great. Recall with the earlier curve (asymmetric) it was somewhere around -900 units while with the ellipse I'm getting around -600 units. Doesn't allow you to touch it, though. Try to change it and you'll be sorry -- the Cyan vectors all go the other way. Can't imagine why that happens. So, probably, if one decides to work with ellipses one has to stay with the one drawn and if a change is needed one has to create a completely new drawing and not try to improve on that. Would like to have the curve (Blue) egg-shaped or pear-shaped but it won't happen with one ellipse. Maybe more than one, superimposed, might do the trick but haven't tried it yet.

 

I tried it also with Splines but it's not as smooth and the right-hand side gives me those weird Cyan vectors of the reverse sense. Same with Polyline, even worse. Most likely it's me because of my lack of experience with AutoCAD.

 

With the drawing that you posted above, I am finding that the vectors are correct, even after modifying the ellipse, by using the blue grips on each axis.

 

I have no clue what is causing the vectors to reverse their signs :unsure:

 

Perhaps Sean can shed some light? o:)

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...