News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Movie of orthogonal views

Started by samdavo, August 08, 2014, 08:09:18 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

samdavo

I am thinking of a macro project that would be real handy, (in 3D) -  maybe something to do between coats of paint in yet another room of the house.

PS I should have titled this "movie of orthogonal views and isometric views - and any other ideas people can come up with".

That would be a movie that started with front view, (H=0, V=0), 
rotate the view up to plan view (rotation about X) in say 5 degree increments, (to H=0, V=90)
... to front view (again)
... around to side view (90 degrees to the right about Z) (H=90, V=0)
... pause (optional), then continue to back view (another 90 degrees)
... pause ("), then another 90
... pause ("), then another 90 = back to front view
... diagonally up to H=45, V=35 degrees (which is = isometric view)
... rotate around 360 degrees to the right, (maybe pausing at each 45 degrees diagonal isometric) (H=135, V=35); (H=225, V=35) ; (H=315, V=35);  ...
... and finish in "normal isometric" (H = 45, V=35). 
(with the option of continuous cycling of course)

Just making a wish-list aloud.

PS Whether it was 5 degree increments, or 15 degree etc would be a tradeoff between jerkiness , and making a movie of manageable size (hopefully emailable).  Maybe that increment could be one of the inputs? 

(PS Personally, I'd be happy with a jerky 15 degree increment movie provided there was say 1 second per 15 deg increment, hence the above movie would take 66  84 seconds if there were no pauses at orthogonal positions, or maybe 110 odd seconds if there was. - But still only a small file).

Of course there are other programs like Irfanview etc that would help put screensnaps together.

PS there are bound to be other ideas that could be added, eg doing a second circuit, after reducing the view distance so that you looked inside the object in those views. (2 cents)

samdavo

#1
I suppose it wouldn't take that long to take these screenshots manually using bdeck's vdd.d3m, but it would be nice to automate it (and hence use it more often).

Solidworks has a similar automatic program called "edrawings", which lets you send such a movie to clients ( 2 cents) - (make that $7000)

samdavo

#2
Quote from: samdavo on August 08, 2014, 08:09:18 PM
PS there are bound to be other ideas that could be added, eg doing a second circuit, after reducing the view distance so that you looked inside the object in those views. (2 cents)
I thought about adding a pause in an ideal macro that permitted you to "pushapart" the components, and repeat the exercise.

HOWEVER, if you are collecting the "photos" in a directory ( eg C:\stuff), and making a movie thereafter - which is easy, all as per prl's previous lessons, using
a) Irfanview, and
b) Screen2exe unfreez.exe
- then you could add the second (pushaparted) batch with the first, and make a movie including all of them. 

samdavo

#3
This has to be a good place to start :-  Namely prl's method of making movies (manually):- 
http://forum.designcad.com/index.php?topic=5475.msg37020#msg37020

'Program: gifmovie.d3m (a sample routine for making gif movies by taking lots of DesignCAD snapshots)
etc  -
PS  refer that post of prl's if you are interested, but the macro in the next post is the same /similar / in fact plagiarized.

samdavo

#4
ok, here's my first stab at this :-
Am I confident? no.  :)
PS You need to have a directory called C:\stuff to accept all the png's generated  ( 66 84 off I believe):-

'Program: multiviews.d3m (a sample routine for making gif movies by taking lots of DesignCAD snapshots orthogonal then isometric - at 15 degree increments )

'3/25/2014 - prl forum topic
'10/08/2014 - modified by samdavo to save multiple orthogonal and isometric views

'Reminder
'in the main body of the code, you decide what your object is going to do in terms of position, view angle, etc.
'once it is positioned where you want it, you have the SnapPic subroutine take a graphic snapshot.

'General: How I make animated Gifs
'         1.  Make sure your shade mode settings are the way you want them (Gourad, non-accelerated, etc.)
'         2.  Let this code make the *.png files
'         3.  Use InfraView portable to convert *.png files to *.gif files.  Put the gif files in their own directory.
'         4.  Use UnFREEz.exe 2.1 to compile the gifs into an animated gif.

xx = 0 'initial counter for naming the png file names sequentially

'First spin the camera from front to top view,
for j = 0 to 6
    sys(205)= 15*j  'rotation about Global X
    sys(206)= 0  'rotation about Global Y
    sys(207)= 0  'rotation about Global Z
    gosub SnapPic
Next j
sys(1)=0

'Next spin the camera back to front view,
for j = 0 to 6
    sys(205)= 90-15*j  'rotation about Global X
    sys(206)= 0 'rotation about Global Y
    sys(207)= 0 'rotation about Global Z
    gosub SnapPic
Next j
sys(1)=0

'Then bottom view,
for j = 0 to 6
    sys(205)= -15*j  'rotation about Global X
    sys(206)= 0  'rotation about Global Y
    sys(207)= 0  'rotation about Global Z
    gosub SnapPic
Next j
sys(1)=0

'Next spin the camera back to front view,
for j = 0 to 6
    sys(205)= -(90-15*j)  'rotation about Global X
    sys(206)= 0 'rotation about Global Y
    sys(207)= 0  'rotation about Global Z
    gosub SnapPic
Next j
sys(1)=0

'Next spin the camera to side view and thence continue around to front view
for j = 0 to 24
    sys(205)= 0  'rotation about Global X
    sys(206)= 15*j  'rotation about Global Y
    sys(207)= 0  'rotation about Global Z
    gosub SnapPic
Next j
sys(1)=0

'Next spin the camera to isometric position V=35 H=45
for j = 0 to 5
    sys(205)= 7*j  'rotation about Global X
    sys(206)= 9*j  'rotation about Global Y
    sys(207)= 0  'rotation about Global Z
    gosub SnapPic
Next j
sys(1)=0

'Next spin the camera a full circle around Y axis
for j = 0 to 24
    sys(205)= 35  'rotation about Global X
    sys(206)= 45+15*j  'rotation about Global Y
    sys(207)= 0  'rotation about Global Z
    gosub SnapPic
Next j
sys(1)=0
End

'subroutines follow

SnapPic:
    xx = xx + 1
    precision 0
    a$ = abs(xx)
   
    'put graphic file name in following format, 001 or 012 or 113
    if len(a$)=1 then a$="00"+a$
    if len(a$)=2 then a$="0"+a$
    pic$="c:\stuff\pic"+a$+".png" 'a directory of your choosing, mine goes to a virtual drive V
   
    >shadeview
    {
    <ShowLine 0
    }

    >SaveBmp
    {
    <ShowLine 0
    <Filename [pic$]
    }
Return

samdavo

#5
ok - I've managed to get a result.  Unfortunately, even with 15 degree increments I had a file more than 5MB, (edit some doubt about that file size) -  hence I have deleted some of those steps (and concentrated on the isometric views).   (Turns out there were 84 screenshots with that macro).

I'm wondering if the shadows and rendering are making the file larger than necessary (?) and to be honest, I wouldn't use those features for a work-related "e-drawing" / "multiple view".

Even this brief "movie" is 3.5MB, (!?) , make that 2.8MB when I redid it - the redone version replaces the original attachment - which is pretty disappointing. (edit) but not as bad as I originally thought - trouble is, I don't understand why the rendered-and-shadows file size dropped ?
cheers
sam

Actually, without shadows or render, I fitted about double the number of slides in that movie, for the same 3.5MB.  In fact I fitted all 84 slides that the macro generated.  I won't post it (the gif movie), as that might annoy some people.

(edit)
The movie attachment has been substituted - now linked to a dropbox:-

John R

re: ...this brief "movie" is 3.5MB...

Perhaps you should get a free YouTube account where you could post movies at the larger file sizes (larger everything actually), then post a link here. I've been doing that for a few years. Very helpful in Beta testing or testing in general. You can show people (developers) what works or doesn't work.
John R.

samdavo

#7
Thanks John, I'll try that as well.

In the meantime (since you asked about qs2 and qs3 on another thread),
I post a 2.8MB movie which uses a combination of "multiview" and "qs3" in a new macro multiview3.d3m :-

a) This movie (the result) is the same as the above one, but simplified because graphics accelerator is on when I started the macro, hence shadows are off and so are fancy renders,

b) because of that I fit in all 84 slides in a smaller movie  (I'm actually confused about what causes bigger files,- it seems to be inconsistent/spasmodic -  but we move on)

but more importantly,  on the "experimentation front" ( not sure how well you know me, but I seem to spend much of my time there :)  )
 
c) You will note (and you have to look carefully) that there are black lines on the facets of JUST the spherical shape, and the brown table underneath. i.e. not the grey pillow itself.   You might choose this option (in principle) because you don't want the confusion of all those (pillow) facets being highlighted. 

Before turning on the new macro "multiviews3.d3m" (attached), I have run qs3.d3m (also attached).   How do these macros vary from multiviews.d3m and qs2.d3m?

Well qs3 simply changes the selection colour to black and leaves it there (where qs2 immediately turned the temporary arrangements off).  I like qs3 because - generally - you can select and unselect various facets to highlight.  But back to this example ...

"Multiviews3.d3m" simply "selects all visible unlocked layers" before it takes each snapshot.

Cheers

PS (This is not necessarily a perfect example of hiding some facets and showing others, but the principles are what I am chasing here).

Please refer this dropbox :-

samdavo

#8
PS In case anyone is interested, here are some photos of a real life example of a similar spherical knuckle bearing (plus sliding movement capacity in X and Y, but locked in Z direction, i.e. into page (using DCAD convention) - free to rotate about all axes.  It's all about earthquakes. (3 or 4 cents)

i.e. Of the 6 degrees of freedom, each bearing only locks one.

prl

#9
Quote from: samdavo on August 10, 2014, 07:01:17 PM
i.e. Of the 6 degrees of freedom, each bearing only locks one.

So in your photo above

the spherical knuckle is the ball socket/joint with the sliding shaft, the cylinder shaft with the attachment bolting flange and also stop flange?   



A second question, how much movement is this roof-to-wall joint expecting? 

Edit: Another thought, how is that joint lubed?

samdavo

#10
Quote from: prl on August 11, 2014, 04:52:18 AM
1. the spherical knuckle is the ball socket/joint ... ?   
2. how much movement is this roof-to-wall joint expecting? 
3. how is that joint lubed?
prl
1. yep - and the "pillow" in this case was called a "yoke" - machined from 300mm steel plate :)
2. the rotation as required was about +/- 3 degrees (from memory), but it can take much more (as shown);  the movement capacities (with stop plates as you correctly point out) are 300mm up, down, left and right.
3. most structural bearings use PTFE sliding against polished stainless steel.  These rotating and sliding mechanisms are similar.  Sometimes it is lubricated with (clear) silicone grease - but these particular bearings were assumed, longterm, to be unlubricated.
cheers

PS The movements in some earthquake slide bearings are phenomenal! - like +/- 600mm in any horizontal direction (earth relative to building).  Sometimes those bearings are lubricated  - and sometimes not, - because they then act as hysteretic dampers to absorb the energy of the quake.  (2 cents) 

prl

Quote from: samdavo on August 11, 2014, 05:25:50 AM
most structural bearings use PTFE sliding against polished stainless steel.

Thanks Sam.  PTFE has been around a bit.  Never had a project that used it. Always curious about corrosive environments (proximity to sea) and total life cycle durability. As DuPont once said, it is slick.   Very slick.

samdavo

#12
Somewhere else you mentioned your earth gyrations were indeed changes to the view point and zoom (much like the examples here except I haven;t zoomed above).
Let's call that example above a "walk-around", or walkthrough in DCAD speak (or helicopter tour?).

In the end, I would like the option of combining a
walkthrough/around,
with zooming into details
and animation ( eg demonstrating the sliding and rotating mechanisms),
and finally pushapart (Dempsey's macro).

Maybe even add the assembly phase - eg reply $27 on the beer barrel thread of a few months back:-
http://forum.designcad.com/index.php?topic=5570.30

In summary, I know how to do this manually (with vdd.d3m), and all it takes is practice to be proficient - and still pretty time consuming.
Hence with a macro like this (expanded a bit maybe) you get a stack of Snappics (can't believe I didn't recognise that subroutine name before lol),  and you can use whichever of those you like in the final movie. 

You could even do a "helicopter tour" after each phase of a multiple-stage pushapart?  or during it ?  The sky's the limit !