Hi there
Can anyone help me figure out how to do a dynamic copy chain line or multiple pattern line with definable spacing and solid line at each end.
This dynamic component can draw various styles of dashed line. It starts and ends on a line (half a dash). The dash length can be adjusted as a percentage of the period. The pattern length sets the approximate size of the pattern, but it will be scaled slightly to suit the total line length.
On 3D Warehouse: Dashed Line
Donât download directly into your model. Save it to disk, then bring it in from the component browser or it wonât work.
Some examples:
Using this instead of a native line style would be quite awkward. Youâd have to do a lot of rotating, scaling, etc.
Hi
when I download this file or any of the variants it is exploded and not a dynamic component ??
Download the file, save it somewhere on your computer, maybe in an empty folder so you can find it easier in the next step.
Now in Sketchup:
Open the Components window from the Window menu. Click the icon shown below and choose âOpen a local collectionâŚâ and choose the folder you just saved the component in (not the file, the folder).
You should now see the component:
Click it, then place in your model. Change view to Top, parallel projection as it will be drawn on the floor in the xy plane (red/green).
If not already open, open dynamic components toolbar:
View Menu â Tool Palettes â Dynamic Components
Then click on the icons on this toolbar to open Component Options and Component Attributes.
thanks
works great.
Do you know if its possible to nest formulas such that a combination of lengths can be accommodated⌠think chain lines.
Is there documentation on this other than the fence example on the SU site?
once again thanks for the info and example
If you mean like centre lines with a short dash, then long dash repeating or other patterns, then yes you can do that with a dynamic component. The component I put up already has different components for the ends and the normal dashes. By the way, the hidden line in the y-axis was to enable the scaling drag handles. Without them, SketchUp doesnât let you scale it as itâs a one dimensional component.
I really think this would be better as a Ruby plugin tool which worked like the native pencil line drawing tool.
Thereâs some documentation and example components here:
Iâve updated the Dashed Line component to make it work better at shorter line lengths. It now must be at least two periods long. If you set it such that this wonât be possible, it scales the period down so that youâll get 2 like this:
half dash, gap, whole dash, gap, half dash
Dashed Line
Hereâs another dynamic component that draws a centre line with a short dash and long dash
Centre Line
Examples of lines produced by CentreLine.skp:
Now if only the Carpathia had understood the dots and dashesâŚ
McGordon you are a star.
still want to know how it all works mind you.
someone posted a ruby script that allows you to right click on a line and turn it into a dotted oneâŚmaybe this is how yours should workâŚ
But the dynamic object works fine for me for making setout lines and centre lines mostly with the occasional drain line or boundary. I want to keep as much as possible in the SketchUp modelâŚ
Guessing the dynamic object method would work for SU free users very wellâŚI assume you can use these.
How does it work?
Thereâs probably lots of ways of doing it and this is just the way I did it this time. Iâm not sure I can explain it without making it look more complicated that it is. DCâs arenât like source code that you can comment easily. Some parts are messy because SketchUp didnât handle the units the way I expected so some variables are in inches. This would probably be simpler if the whole component used inches.
Using these settings as an example:
It starts with the total line length:
DashedLine!LenX = 36cm (The length you scaled the line to)
Preferred pattern length:
Pattern_Length = 3.937007874015748 (10cm)
Calculate number of copies of pattern:
Dash_Copies = Largest(Floor(LenX/(Pattern_Length*2.54)),2) = 3
LenX/(Pattern_Length*2.54) = 360cm/10cm = 3.6
Floor(3.6) = 3
Largest(3,2) = 3
The âFloorâ function rounds down the number of spaces. The âLargestâ function sets a minimum of two spaces. This gives the minimum pattern of half-dash,gap,full-dash,gap,half-dash.
Period =LenX/DashCopies = 36cm / 3 = 12cm
We now have the real pattern length of 12cm from the preferred length of 10cm.
Now in the Dash component:
Dash!Copies = LARGEST(0,DashedLine!DashCopies-2) = 1
The âLargestâ function sets the minimum copies to 0 and stops it going negative. For 0 copies there is still one instance of the Dash component. This happens at the minimum pattern length as above. There is one dash and no copies of it.
Half Ends Dashed!LenX = =Dash!LenX/2
Just sets the half-dash to be half the length of the full dash.
Thereâs always 1 copy of the half-end. The original near the origin and the copy at the end furthest from the origin.
The dashes are positioned with the X coordinates using the copies variable and a multiplier to distribute them along the line.
You could think of it like a section of fence with the end posts 4.5m apart. Your preferred spacing is 1m. Divide 4.5/1 = 4.5 and round down to 4. So you need 4 spaces (3 posts + end posts). This tells us how many copies of the dash to make. Divide 4.5 by 4 to get the real spacing 4.5/4 = 1.125m. In the DashedLine.skp, this 1.125 is just multiplied by the percentage dash length, say 50% to get 1.125 x 50% = 0.5625m.
In Sketchup Free, you can use Dynamic Components, but you canât edit the Component Attributes and unless Iâm missing something, I canât even see how to change the Component Options. Sketchup Make lets you use them but not edit the attributes or create new dynamic components. I donât have Make installed here, but I think you have access to the Component Options.
To edit the Attributes and create new Dynamic Components, you need the Pro version.
Carpathia ?
Wikipedia: RMS Carpathia - Titanic disaster
On the night of 14 April, [1912] Carpathiaâs wireless operator, Harold Cottam, had missed previous messages from the Titanic, as he was on the bridge at the time. After his shift ended at midnight, he continued listening to the transmitter before bed, and received messages from Cape Race, Newfoundland, stating they had private traffic for Titanic. He thought he would be helpful and at 12:11 a.m. on 15 April sent a message to Titanic stating that Cape Race had traffic for them. In reply he received Titanicâs distress signal, stating that they had struck ice and were in need of immediate assistance.
Cottam took the message and coordinates to the bridge, where the officers on watch were sceptical about the seriousness of the distress call. Agitated, Cottam rushed down the ladder to the captainâs cabin and awakened Captain Arthur Henry Rostron, who immediately sprang into action and âgave the order to turn the ship aroundâ, and then âasked the operator if he was absolutely sure it was a distress signal from the Titanicâ. The operator said that he had âreceived a distress signal from the Titanic, requiring immediate assistanceâ, gave Titanicâs position, and said that âhe was absolutely certain of the messageâ.
(The account continues describing how Carpathia immediately changed course and made best possible speed; ⌠navigating the icefield in darkness at great risk to themselves, to reach Titanicâs last position in just under 4 hours. Whilst, nearby, the bridge officers on the idle SS Californian just watched the Carpathia speed by on itâs rescue mission.)
Californian ?
Wikipedia: SS Californian - Sinking of Titanic
On Sunday April 14, [1912] at 18:30 shipâs time, Californianâs only wireless operator, Cyril Evans, signalled to the Antillian that three large icebergs were five miles to the south. Titanicâs wireless operator Harold Bride also received the warning and delivered it to the shipâs bridge a few minutes later.
Californian encountered a large ice field at 22:20 shipâs time, and Captain Lord decided to stop the ship and wait until morning before proceeding further. ⌠Lord asked Evans if he knew of any ships in the area, and Evans responded: âonly the Titanic.â Lord asked Evans to inform her that Californian was stopped and surrounded by ice.
Titanicâs on-duty wireless operator, Jack Phillips, was busy clearing a backlog of passengersâ messages with the wireless station at Cape Race, Newfoundland, 800 miles (1,300 km) away, at the time. Evansâ message that SS Californian was stopped and surrounded by ice, due to the relative proximity of the two ships, drowned out a separate message Phillips had been in the process of receiving from Cape Race, and he rebuked Evans: âShut up, shut up! I am busy; I am working Cape Race!â Evans listened for a little while longer, and at 23:35 he turned off the wireless and went to bed. Ten minutes later, Titanic hit an iceberg. Twenty-five minutes after that, she transmitted her first distress call.
(The account continues explaining how the Californianâs on-duty officers did nothing but watch for the next 5 hours as many distress rockets were fired by the Titanic, never occurring to them that they were distress signals, until they learned in the morning that Titanic had sunk.)
Titanic.
According to Wikipedia, it did.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.