CAD Forum ► EN ► AutoCAD ► How to Draw Wave-Alike Object?
Display full version of the post: How to Draw Wave-Alike Object?
Do anyone know how to draw wave-alike object like attached pic in AutoCAD 2014?Thank you
Kent Cooper
11.04.2024, 22:22
That was done with this Shape definition for the 180-degree arcs that make the S-curve:*146,7,ARC1802,018,1,10,1,044,0[the 146 can be any number unique to the file, within limits] and this linetype definition:*S-WAVEA,.0001,-1,[ARC180,YourFileName.shx],-2,[ARC180,YourFileName.shx,R=180],-1If you need to, study Help about using COMPILE on the .SHP file that has the Shape definition in it.At an effective linetype scale of 1, the radius of the arc parts is 1 drawing unit, so the overall S-wave width is 2 units. When used in a Leader as in the image, you can monkey with the linetype scale in relation to the DIMSCALE setting to adjust the relationship between arrow size and S-wave width.It looks like your arc parts are actually a little less than 180 degrees, and that could be done, but it's more complicated than a clean 180.
Kent Cooper2024-04-11 22:26:48
I can do this wave-alike object construction using arc command.But, I think it's not arcs.As you can see on the below pic (the one that I draw by red line), this curve has slanted tangent and it looks like a continuous curve such as spline or something like that.So, how do you draw exactly similar like the pic?
Kent Cooper
12.04.2024, 15:22
It could be closer by using a "fractional arc" in the Shape definition instead of the "octant arc" that I used for my previous reply. See the 00B or 11 code entry >here<. That could define an arc of a little less than 180 degrees [upper part of image below]. But that would still be an arc of constant radius, not spline-like. To get more "refined" about it, as a Shape for a linetype definition, would probably require an approximation using line segments [as many as you feel makes it curvy-enough-looking at the size you would use it]. Or maybe an arc for much of it, with short line ends [lower part of the image].A non-linetype approach could build the whole thing as a Spline, as I've seen some routines do for batt insulation repetitive S-curves, but that would take a lot more memory, and would not adjust itself automatically if you needed to change the length, etc.
I can't open the link you posted.Can you tell me please step-by-step of how to draw the "fractional arc" in AutoCAD 2014?
Kent Cooper
12.04.2024, 21:48
Let's try it this way:AutoCAD 2025 Help | Special Codes Reference | AutodeskThat gets to it, for me. Go to 00B. Maybe the 00C approach will be as good, possibly easier to understand.It's from Help for 2025, but in this case it won't be any different for 2014.
Kent Cooper2024-04-12 22:39:43
Kent Cooper
12.04.2024, 22:37
I do think the OOC / 12 special code is easier. This shape definition makes an arc of [about] 150 degrees sweep:*146,8,ARC1502,018,1,12,2,0,90,0It should work to just change the ARC180's to ARC150's in my earlier linetype definition [I haven't yet tested it].
Kent Cooper2024-04-12 22:40:13
I still don't understand.It's different from the AutoCAD I know.I know AutoCAD on classic command only.Can you tell me please step-by-step on constructing fractional and octant arc using technical drawing way?
Kent Cooper
13.04.2024, 14:41
If you're talking about constructing the thing out of pieces, draw an Arc however you prefer it, and some Copy and/or Rotate and/or Mirror and/or Array commands will make the configuration. Add some Lines and an arrowhead at the ends. Surely you can figure that out. You could join all the parts [except perhaps the arrowhead, depending on what kind of object that is] into a Polyline if you want it as one object.What I'm talking about is a custom linetype, with an embedded Shape, with which the entire arrowhead and straight-line ends and S-waving part can be one Leader object. But unlike the join-into-a-Polyline version, it will adjust its number of waves if you change the length, and the wavy part will remain straight from end to end and aligned with the straight end extensions no matter what. And you can change the size of the waves with the linetype scale, with the same overall length and the same arrowhead size [unlike the Polyline version in which Scaling to change the size of the waves will also change the length and the arrowhead], with the number of waves adjusted automatically for the different size of them. Etc., etc.There is one potential drawback to the linetype approach. It can do its embedded parts only in full cycles of the linetype definition. That means it can do the arcs that make up the wave only in pairs -- one up bulge and one down bulge must occur together, that is, only in whole S's. So it would not be able to duplicate your image exactly, where one of them has an even number of bulges [it can do that, as in my first image] but the other has an odd number [some full S's and one half-S -- not possible with the linetype].But here's the result of that 150-degree-arc Shape definition used in the original Linetype definition [with the adjusted Shape name], used in a Leader:
Kent Cooper2024-04-13 18:53:05
How to do it step-by-step please?
I can do draw the arc, draw the arrowhead, and join the line thing. The one that I can't do is drawing the slanted tangent.dery2024-04-13 18:02:39
Kent Cooper
13.04.2024, 18:51
Draw two Circles. Position them as appropriate. Draw a Line using TANgent Object Snap for both ends. Mirror the Line across each Circle's CENter point. Trim out the unneeded parts of the Circles.Or, draw a regular zig-zag of Lines. Draw Circles with the TTR [Tangent-Tangent-Radius] option into the corners [experiment with the needed radius]. Trim out the unneeded parts of the Circles and the Lines.Or, with some care about positional Snap, you could just draw the whole thing as a Polyline directly, alternating between Line and Arc modes -- starting an arc segment off the end of a line segment defaults to tangent continuation from the line.
Kent Cooper2024-04-13 19:20:03
Kent Cooper
13.04.2024, 19:14
[QUOTE=dery]How to do it step-by-step please?[/QUOTE]
For the linetype-based approach:Copy and Paste the ARC150 Shape definition from my 4th post into a plain-text editor such as Notepad, and Save it to a file with a .SHP filetype ending [call it whatever you want]. I think you need to make sure the file does not end at the end of the code content, but on an empty line below that [Enter to get that if needed -- depends on how you Copied the definition from here]. In AutoCAD, use the COMPILE command on it, to make a file with the same name but a .SHX filetype ending.Copy and Paste the Linetype definition (in my 1st post) into a plain-text editor and Save it to a file with a .LIN filetype ending. Change the red part to the name of your compiled Shape file. I think likewise the file needs to end with an empty line. In AutoCAD, use the LINETYPE command's Load option, and the File button to get to your file, to load the linetype. Apply it to things just as you would AutoCAD's standard linetypes.Note that at an effective linetype scale of 1, each bulge of the S-waving is 2 drawing units wide [the height is a little less than the 1 unit in the ARC180 definition]. You will need to apply a linetype scale to get them the size you want. In use as a Leader, the Dimension Style and Dimension Scale determine the size of the arrowhead, but the S-wave size is independent of the arrowhead size -- you can control them separately.It's easier if you put both files into some location where AutoCAD knows to look [see the Support File Search Path list in the Files tab in the OPTIONS dialog box].[If you really need tangent line bits between the ends of the arcs, that can be done with a slightly longer Shape definition.]
Kent Cooper2024-04-13 19:17:42
How do you draw the slanted line that tangent to the two circles like this?dery2024-04-13 20:02:54
Kent Cooper
16.04.2024, 19:17
As I described before, simply draw a Line using TANgent Object Snap for both ends. You can pick anywhere on the Circles that's reasonably close to where the real tangent points will be, and AutoCAD will work it out.Kent Cooper2024-04-16 19:25:08
Does what I'm doing is same as the one on the pic or there is something else that more similar and accurate with the one on the pic?dery2024-04-17 05:19:45
Kent Cooper
17.04.2024, 18:33
There is no more accurate way to do it than the Line using TANgent Osnap for both ends.
So do you mean that what I'm doing is the same as the one on the pic?
Kent Cooper
19.04.2024, 14:54
[You have not yet actually said "what [you're] doing," nor to which "pic" you are referring.]
Kent Cooper2024-04-19 15:12:21
What I mean with "what I'm doing" is on the 4th post on this page (page 2).And what I meant with the "pic" is on the 1st post on page 1.So? What is your answer regarding my question on post #8 and page 2?
Kent Cooper
23.04.2024, 15:29
Only you can say whether putting two Circles of 10-unit diameter 11 units apart, and drawing the tangent Line between them, gives you a shape that is close enough for you to matching the waviness in your original image. As you mentioned, maybe a Spline could make a more precise match. But seriously -- how precisely does it need to match? I assume the squiggly-wavy pointer is just a graphic convention for some relationship [sub-atomic particle movement or something?], not representative of an actual physical object, so what does it matter whether the precise shape of the waviness matches exactly? And frankly, to me it looks like the end-most bulges in the original image are slightly smaller than the intermediate ones, which if true, you could construct if you really need that difference, but would not be possible with a shape-embedded linetype, which would need all bulges to be exactly the same. So what does it represent, and how much does the exactness of the wavy shape really matter?
I need to draw as similar as possible like the original pic. How do I draw it using spline please?Can you show me please the step-by-step animation like post #5 on page 2?
dery2024-04-24 08:57:49
Kent Cooper
25.04.2024, 19:58
Well, this may not be any more precise about matching the wave shape, and seems like a lot of work compared to other approaches, and hugely more difficult if you need to adjust it. But I would do it with Snap turned on and a series of regularly-spaced positions. Here, Snap and Grid are both set to 1 drawing unit -- note how the cursor pops to only grid positions. I pre-positioned Points [green] just to illustrate what I was up to, but they are not needed. You will want to experiment with the arrangement for "close enough" precision. This is in a SPLINE command.
Kent Cooper2024-04-25 20:02:41
How do you positioned the green points location like that?dery2024-04-26 10:17:53
philippe JOSEPH
26.04.2024, 11:19
The "good" thing to do when drawing a spline is adding start and end tangents.In the old AutoCAD version you could do this after but now I haven't find the way to "catch" those tangents so I add multiple in line points and then trim the spline were it normaly begins and ends.Any informations about start and end tangents ?I had previously posted a discussion about that with an AutoCAD file but got no answers.
philippe JOSEPH2024-04-26 13:16:53
Hi Mr. Joseph. I don't know what "tangent of spline" is.Can you explain and show me please example by pic or animation?Thank you.
philippe JOSEPH
26.04.2024, 16:17
About tangent of spline, see eventually : TEST SPLINE 01 Aa.dwgin the CAD / BIM Blocks library and / or test the command SPLINE on your computer.
philippe JOSEPH2024-04-26 16:18:12
Kent Cooper
29.04.2024, 13:56
[QUOTE=dery]How do you positioned the green points location like that?[/QUOTE]
With the POINT command, with Snap turned on so they are all at grid locations. They are there in the image only to illustrate -- it is not necessary to have them there if you can visually pop to positions in that kind of regular relationship. In the case of the relationship in my image, the relative position of each location is like a Knight's move in chess, but you'll need to experiment to decide whether that makes a shape enough like what you want.
Kent Cooper2024-04-29 14:09:05
Kent Cooper
29.04.2024, 14:04
[QUOTE=philippe JOSEPH]... Any informations about start and end tangents ?I had previously posted a discussion about that with an AutoCAD file but got no answers.
[/QUOTE]
They're in the DXF code 12 and 13 entries in entity data -- see >this<. -- or the StartTangent and EndTangent VLA properties, or in the (getpropertyvalue)/(setpropertyvalue) world, the StartFitTangent and EndFitTangent properties. You can play with them in the Properties palette, too.
Hi Mr. Cooper, may I know what software you're using to capture the sreenshot animation like your post (3rd post of page 3)?
Kent Cooper
30.04.2024, 14:41
I use a little freeware program called LICECAP. A Search will give you several places you can download it from, such as Cockos Incorporated | LICEcap.Kent Cooper2024-04-30 14:42:08
Mr. Kent Cooper, many thanks for your help.