Jump to content

Recommended Posts

Posted

Irm... This is the shape I want... Do not ask me how i got it... it is an approximation, pretty good one but still an approximation... Slice it by center of the radius where ever you want and the slice is RECTANGLE PARALLEL TO THE GROUND, and the thickness of the slice perpendicular to the upper green spline is always 1 (or close... it is approximation...)

Posted (edited)

Irm... This is the shape I want... Do not ask me how i got it... it is an approximation, pretty good one but still an approximation... Slice it vertically by center of the radius where ever you want and the slice is RECTANGLE PARALLEL TO THE GROUND, and THICKNESS OF THE SLICE PERPENDICULAR TO THE UPPER GREEN SPLINE IS ALWAYS 1 (or close... it is approximation...)
Drawing4.dwg

 

Drawing4.dwg

Edited by ibach
updated drawing...
Posted (edited)

Ok, finaly I think that I got the best out of CAD for drawing the ramp of the "same" thickness (perpendicular to the surface)...

I draw the upper surface first using Irms cookbook, both center spline for control and left and right spline, offset by 1...

Than I used THICKEN to add the thickness to the surface... The reason I offset the splines by 1 is that THICKNESS command will not produce lower surface bordering splines following the cylinder... Than I did interfere with the cylinder subtraction shape (see the dwg) to produce side surfaces corresponding to the cylinder.

Drawing6.dwg

The produced shape has the same thickens perpendicular to upper and lower surface (1), the upper side of slicing shape (slicing trough center of the cylinder perpendicular to the ground) are parallel to the ground, the lower are not, the resulting shape is trapezoid with parallel shorter sides...

 

I think it is as close as it gets... or?

 

Now, I am going to try to automate at least a bit of that for both,

 

SWEEPING square producing the same vertical slice at all sections trough the center of cylinder but not

the same thickness

 

and

the THICKEN method...

 

for those two results seem to be usable and pretty straightforward.

 

If someone has a better idea, now is the time.

 

 

Edited by ibach
Posted

@ibach  I'm glad that you have someting you like.  I've been working on a couple of LISP programs to enable the positioning of blocks along a spline.  The blocks are used to define the sections of a LOFT.  I had a coding question so I posted it on the AutoLISP forum.  Check it out at:

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/blocks-along-spline-how-do-you-use-already-selected-block/td-p/13091335

Pleas try these programs and let me know what you think.  There is a minor issue with the code as noted.

Once you have the blocks positioned and rotated as you like then explode them and use loft.  Note that you can manually tweak the rotation of blocks by using UCS OB (object) followed by using the 2d command rotate.  It will allow you to dynmaically see the rotation of the block (section).

 

Posted (edited)

;)

I'll be glad to! ... I just wish they stop cutting the electricity twice a day here...

Reading "The Z axis of the block ; is tangent to the spline." already put a smile on my face.

Edited by ibach
Posted

...3D shapes aside...

I would love to have a GUI to make the user input easier... DCL seems to have quite enough possibilities...

 

I got stacked calling an image to dcl... i found a lot of talk about sld files, but I'd like to simply load a bmp or jpg ...

Posted (edited)

If you just want a series of values to be entered one after each other you can use this, there is sample text in the top of the code. It returns the variable "ans" which is a list of all your values entered you can use (atof & (atoi for reals an integers. I use (nth x ans) for each required variable, starts at x=0.

Just save the code in a support path it is a library program and is demand loaded so no need to copy code into your code.

 

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Enter values " "Length " 5 4 "6" "Dia " 5 4 "1" "Offset " 5 4 "6" "Dia " 5 4 "3/4")))

 

.Multi GETVALS.lsp

Edited by BIGAL
Posted (edited)

Thanks, Bigal. Useful in every aspect.

I am still reconsidering my approach...

DCL is good but pretty complicated and I might find an elegant enough way to avoid it...

I am still far from writing the first line of my code.

 

Lee...

I am trying...hm....thumb.png.b8833ca1ac5f4374cbc96ea05893a95d.png

this is the moment it goes wrong...

hm.._d1.png.2625ff4a507762652de575c70edda9a2.png

even the selection preview looks fine...

hm.._d2.thumb.png.88756a941a139a15d9b002b880f76cb1.png

than, if i continue, this goes on. Notice the pattern.

On the other hand... if you move the view enough to the left all goes fine...

The behavior is obviously view angle related.

 

What exactly is the click select recording?

 

the commandline output is...

Command: TWIST
Select block:
Twist angle is: -32.8163_rotate3d
Current positive angle:  ANGDIR=counterclockwise  ANGBASE=0.00
Select objects: _non 1 found
Select objects:
Specify first point on axis or define axis by
[Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: 2 Specify first point on axis: _non Specify second point on axis: _non
Specify rotation angle or [Reference]: -32.81631684062074
Command:
Done!

 

(nentsel "\nSelect block:")

uses same apparatus as select does (or?!)... at one point to the right it skips, latter on skips 2...

select works fine all the way trough by the way...

 

I have no idea why that happens nor how to prevent it... I do have an idea on how to avoid it...

 

If the idea is to twist all the blocks by the same angle, you could select them programmatically rather than manually (don't ask me how, my knowledge here is extremely limited but we should be able to get the table of those blocks in creation order back from dwg and feed them, backwards for the cool effect, if it is what you want in the end ;).

 

I find this block "slices" pretty useful in all sort of things, they are quite manipulative latter on.

Like adding some dynamics to the block and manipulate it...

dyn.thumb.png.db29002611d3dc8d55f4a43df244a9c9.png

 

 

 

 

Edited by ibach
old age
Posted

@ibach  please post a copy of a file that contains the spline and the block that contains the section you want positioned along the spline.

 

My first impression is that there may be a discontinuity in the curvature of the spline.  It also looks like you are specifying way too many sections.  The loft command does not need a lot of sections to do a decent job.

Posted (edited)

I was solemnly testing the glitch with all those sections. It is a cool tool and i do like it, easy to use too.

It is obvious that a few well positioned blocks can do a wonder...

"discontinuity in the curvature of the spline" ... I used the same spline from the example you provided.

I still have no idea why on earth would selecting one block skip for the other or even two or three... I still haven't had enough free time, electricity and pace at the same moment to play with it...

...

excuse me for all the edits... I'm like that...

you just made me read

https://help.autodesk.com/view/ACDLT/2024/ENU/?guid=GUID-A7AC0917-66CE-4BAA-BBAF-D49F8ADB26B1

It is a bit confusing at first but fine.

I still can't imagine why, if the preview is ok, selection seems to be different... but...

It is not about the selection at all, it seems that the solution gets misapplied to the wrong block for some reason for the angle of the rotation is calculated well for the selected block, but gets applied to the wrong one latter on...

...still nothing...

 

Edited by ibach

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