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.

3D Blocks - "Play it [again], Sam"

Started by minstrel, January 03, 2013, 07:52:04 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

minstrel

Next in the 'ScreenCast' series: tut_008 - "Play it [again], Sam"  http://www.crossresolution.nl/3Dspace/tut_008.php
Picking up where we left off in our discussion of 'blocks - nested blocks' in DesignCAD [see tut_007-"...Cuckoo Nest"] we now reveal our typical 'project approach' using DesignCAD as our initial construction tool, SketchUp as our modification/composition tool and finally Twilight Renderer for the final output.

The Project:

First, while in SketchUp, we added UV mapped 'keys' onto the keyboard then modified the geometry in the 'body' of the pianos.
Finally, changed and rendered the pianos in 'Kawasaki' black...they play rather nicely, don't you think?

Assignments: [for those who have a song in their heart]

1. Use the .dcd file I've provided as your base.

2. Dress up the showroom [ex. lamps, stools, etc.], dress up the pianos [keeping them all identical - remember we're working with the usefulness of blocks here]. In other words, if you add or modify anything, do it to the blocks and arrange multiple versions of it around the showroom.

Restrictions: No 'circular arrays'; place each 'nest' individually.  Add NO walls or backgrounds...just model within the original polygon area. All new geometry is to be created in DesignCAD; not SketchUp or other software!  Then, after it is exported [dwg], 'modifications' can be made at will in any another program.

3. Finally, render in whatever/however you desire.  Then post your rendered results for all to see! [along with the .dcd file, if you can].

Just compose some nice 'music' yourself...and the world will be a richer place for it!

Minstrel

*************UPDATE**************

Just added another attachment - Piano Gallery_version3
I'll update this gallery scene each time someone adds to the collection.

It's a catchy tune...so play along if you can!

Contributors thus far:  Minstrels - piano, potted plant | Marks - keyboard, metronome & bench [finally, something nice to sit on!]

***********************************

edit - link update

minstrel

Here's an example where a 'potted plant' was added to the scene. 

First the basic model was made in DesignCAD then arranged exported [dwg] as a 'nested' block. 

Once opened in SketchUp further modifications were made to our 'new addition to the Showroom, and quite,
easily I might add.  To be honest it took a matter of a minute or two.

HEADLINES - 'Blocks' and 'Nested Blocks' get the job done!

This should be good news for all DesignCAD users who work with multiple copies of the same geometry; even better news for those DesignCAD users who have also tapped into the 'juice' of SketchUp.

So, either way, I encourage you to try them out for yourself...and make some music!

Minstrel

MarkX

#2
Whenever I try to export/import this into SU, everything gets moved around. The new keyboard in particular wants to put itself on the back of the piano, which is awkward for the pianist. All the pianos are moved away from their original base. Once again, the all-up piano block was anchored to the same corner.

Mark

Edit: Doing much better thanks to PRL's Z positioning discovery. If you ask me, this little fact needs to be yelled from the mountain tops.

However, I had some nightmarish things happen along the way. In particular, either making the blocks, writing over the blocks, or exploding the blocks causes nested groups to mix their contents. In some cases solids were combined! Hopefully just a one-time anomaly, but was a pain to sort out. Once solids are mixed (added/subtracted without a add/subtract process) you almost have to start over.


prl

Quote from: MarkX on January 04, 2013, 05:15:14 PM
causes nested groups to mix their contents. In some cases solids were combined! Hopefully just a one-time anomaly, but was a pain to sort out. Once solids are mixed (added/subtracted without a add/subtract process) you almost have to start over.

Mark,  hadn't figured out the trigger.  You're saying groups.  I'll add this to my list of "cautions" when using blocks.   Another thing when unblocking is the "name" field for solids (or anything really) is cleared.

minstrel

#4
Very nice addition, Mark...
...and I forgive you. 

Yes, Minstrels next tutorial - tut_009 "Key's to the Kingdom" is under construction [Is it that Cuckoo Bird, again?].

***** edit: tut_009 became "tut_009 -Baby Steps"
View it here: http://youtu.be/Q--r7gg-NZM.

It paints a clear picture how easy it is to 'play' along and add something to the 'Piano Gallery' yourself.
*****

My approach, once again, will be different and fully use our 'nested blocks'... which will make modifications/adjustments
in SketchUp a breeze...see the first attachment to get a glimpse of what that means ... key of 'C', I believe.
This really shows off what can be done easily and quickly using the SketchUp path.

About your presentation... did you make the key's?  If so, estimate on construction time, please.

Had no issues exporting/importing into SketchUp at all.  Each component was properly aligned...clean up on faces [reversed] on the 'keys' were a 'pickle'!  You did not use a 'Rotation' macro prior to export, did you?  That will, indeed, screw things up. Then I replaced my original set of component 'keys' with your set and went to town!

Your DesignCAD version had a few suspicious things which may have cause some problelms...
yet each of us will have unique layer habits depending on their particular workflow/style.

Quote from: MarkX on January 04, 2013, 05:15:14 PM
Edit: Doing much better thanks to PRL's Z positioning discovery. If you ask me, this little fact needs to be yelled from the mountain tops.

I'm glad you've got a handle on prls's Z thing, 'cause I do not'  Could you please, 'Yell it again'
so us 'common' folk can understand it [and utilize it!].  And remember, I'm doing what I do without this understanding.

...hum.. like I say..the best indeed is yet to come!

Thanks for sharing,
Minstrel

ps - It's a 12min Twilight Renderer render #1, 4min #2.

edit - added #2 attachment and #3  -  Mark - check #3 to see why these appear.

Dean

Quote from: MarkX on January 04, 2013, 05:15:14 PM
Whenever I try to export/import this into SU, everything gets moved around. The new keyboard in particular wants to put itself on the back of the piano, which is awkward for the pianist. All the pianos are moved away from their original base. Once again, the all-up piano block was anchored to the same corner.

Mark

Edit: Doing much better thanks to PRL's Z positioning discovery. If you ask me, this little fact needs to be yelled from the mountain tops.

However, I had some nightmarish things happen along the way. In particular, either making the blocks, writing over the blocks, or exploding the blocks causes nested groups to mix their contents. In some cases solids were combined! Hopefully just a one-time anomaly, but was a pain to sort out. Once solids are mixed (added/subtracted without a add/subtract process) you almost have to start over.

Mark,
By default what is your working plane of 2d mode? Most likely Minstrel created the drawing while in "xy" working plane of 2d mode. I get similar results to yours if I switch to "xz" and export from 2d mode view. When I exported the dwg 2000 file from Dcad with "xy" set as WP of 2d mode while in 2d mode view it imports into sku with all the nested blocks in place. I always draw with "xz" WP of 2d mode. Aside from "y" being up everything else translates well with other cad programs.

Minstrel how did you create the file? Can you explain more in detail how all entities were created? Layer control, settings etc., etc... I think what you have now is more for general purposes for the general viewer and more of "what might be". For thoroughly testing and gaining more from using 3d blocks in Dcad, IMHO you need to more specific in how the drawing and each individual entity were created. Good job and thanks for sharing the tutorial.
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

MarkX

#6
Quote from: minstrel on January 05, 2013, 03:41:54 AM
Yes, Minstrels next tutorial - tut_009 "Key's to the Kingdom" is under construction [Is it that Cuckoo Bird, again?]. 
How was I to know? ;-)
Quote from: minstrel on January 05, 2013, 03:41:54 AM
About your presentation... did you make the key's?  If so, estimate on construction time, please.
I thought the keys would be the hard part. Unfortunately, due to the block-mixing the keys were probably the easiest or at least funnest part. Probably 60 to 90 minutes including research into keyboard layout.
Quote from: minstrel on January 05, 2013, 03:41:54 AM
Had no issues exporting/importing into SketchUp at all.  Each component was properly aligned...clean up on faces [reversed] on the 'keys' were a 'pickle'! 
The keys were one of the things ravaged by the block-mix problem. I just reversed them in SU, but didn't know if that was the whole problem.
Quote from: minstrel on January 05, 2013, 03:41:54 AM
You did not use a 'Rotation' macro prior to export, did you?  That will, indeed, screw things up. Then I replaced my original set of component 'keys' with your set and went to town!
No rotation macro prior to export.
Quote from: minstrel on January 05, 2013, 03:41:54 AM
Quote from: MarkX on January 04, 2013, 05:15:14 PM
Edit: Doing much better thanks to PRL's Z positioning discovery. If you ask me, this little fact needs to be yelled from the mountain tops.
I'm glad you've got a handle on prls's Z thing, 'cause I do not'  Could you please, 'Yell it again'
so us 'common' folk can understand it [and utilize it!].  And remember, I'm doing what I do without this understanding.
When you import, do you use the plugin or the Pro import feature?

It could be that you don't have the problem because you're using Pro, but PRL and I use the plugin. Unfortunately, nobody is going to fix the plugin. We're lucky its still available.

When you build a component, you anchor each sub-component to the same location. That location needs to be on Zero Z axis for me. Any other location and the pianos end up looking like they're part of a carousel ride.

When I edited my post, I deleted the first go. Maybe I'll add one back in so you can see the difference.

Have fun -- or else.
Mark

Edit: Note about the solid-add. The block processes added my piano leg to a piano key as a combined solid! Two separate objects in two separate blocks -- but added together! I used one solid subtract to make the inset on the piano, but outside of that no solid operations. I'm thinking that it might have happened when I replaced a block that was self-referencing, so I'm not willing to blame DC yet. But it was pretty painful.

P.S. Edit: IMHO This board should be set up to allow DWG files, since we're often talking about how things import/export.

MarkX

Quote from: Dean on January 05, 2013, 08:49:21 AM
Quote from: MarkX on January 04, 2013, 05:15:14 PM
Whenever I try to export/import this into SU, everything gets moved around. The new keyboard in particular wants to put itself on the back of the piano, which is awkward for the pianist. All the pianos are moved away from their original base. Once again, the all-up piano block was anchored to the same corner.
Mark,
By default what is your working plane of 2d mode? Most likely Minstrel created the drawing while in "xy" working plane of 2d mode. I get similar results to yours if I switch to "xz" and export from 2d mode view.
Will this make a difference since I exported a 3D drawing?

I happen to be using the XZ plane in 2D mode, but I didn't use the 2D mode while working and I was in 3D mode when exporting.

Thanks!
Mark

prl

Quote from: MarkX on January 05, 2013, 10:23:16 AM
It could be that you don't have the problem because you're using Pro, but PRL and I use the plugin. Unfortunately, nobody is going to fix the plugin. We're lucky its still available.

For what it is worth, I have SU Pro 8 and all the before flavors.  It isn't on the SketchUP side or the version 7 free import  plugin, nor do I believe it is the DesignCAD export routine.  From what I can tell, the defect is in the DesignCAD "block define" command.  I have studied two identical blocks, one defined with a primary handle at x,y (any values) and z=0 and the same thing with x,y(any values) and z<>0.  I can't tell them apart when I use and examine them in DesignCAD but somehow something extra is embedded in the block definition and this shows up in the export.

And to summarize Minstrel's success rate. He is "block defining" his assemblies at z=0.  Whether he understands that or not, that is what he is doing.  However, he has been changing his approach each time (the garryK cabinet versus the piano),  but z=0 is the consistent thing in both approaches.

DesignCAD does add additional problems it you pre-rotate your model in DesignCAD.  Don't do it.  Do a normal dwg export and import into SU.  Use the rot90x.rb ruby script for SU.  Put it in the plugins folder, and you'll have an extra command under >Edit (in SU).  Select your import, use the rot90x and your model in DesignCAD will be exactly located in 3d space in SU.  (Be sure to set your import units in SU and preserve the origin).

require 'sketchup.rb'
##
## Rotate selected component 90 degrees about x axis
##

# Add a menu item to launch our plugin.
UI.menu("Edit").add_item("Rotate 90 about x axis") { rotate90x }
# -----------------------------------------------------------------------------

def selected_comps_and_groups
   mm = Sketchup.active_model
   ss = mm.selection
   return nil if ss.empty?
   ss.each do |cc|
       return nil if not ((cc.instance_of? Sketchup::ComponentInstance) or (cc.instance_of? Sketchup::Group))
   end   
   ss
end

def rotate90x
   sel = selected_comps_and_groups
   
   rv = Geom::Vector3d.new(1,0,0)
   ra = 90.degrees

   sel.each do |ent|
      rp = Geom::Point3d.new(ent.transformation.origin)
      ent.transform!(Geom::Transformation.rotation(rp, rv, ra))
   end
end





Dr PR

I have been trying to follow this discussion, and other recent discussions about DesignCAD blocks and rendering in Sketchup, and it is about as clear as mud! I am sure each writer understands what it is he wants to say, but you aren't doing a very good job of explaining it to others who can't read your minds!

You are doing some things in DesignCAD and others in Sketchup, and you do not always say which program you are working in when something does/does not happen.

For example, Mark says that nested groups and blocks are getting scrambled and that things are being added to solids. But he doesn't say in which program! He just says "somewhere along the way."

I am interested in blocks in DesignCAD, but have absolutely no interest in anything that has been posted about Sketchup, other than what happens in Sketchup might relate in some way to a problem in DesignCAD. I suspect that is true for most DesignCAD users, and members of this Forum. So, please, say which program you are working in when you are describing what happened. And lets try to determine whether a problem is really a DesignCAD problem, or if it only relates to things you do in Sketchup.

This is a DesignCAD Forum. I started an earlier thread to discuss using blocks in DesignCAD and it quickly was flooded with totally irrelevant posts about working in Sketchup. I have no problems with the discussions about exporting DesignCAD drawings to Sketchup, but they should be restricted to threads specifically labeled as Sketchup related. So lets try to sort this out and post items related to working with blocks in DesignCAD in a DesignCAD thread, and things related to importing DesignCAD blocks into Sketchup in a separate Sketchup thread. That way people who log onto this DesignCAD forum to learn about using DesignCAD won't have to wade through endless posts about Sketchup!

Phil
DesignCAD user since 1987

minstrel

Quote from: MarkX on January 05, 2013, 10:23:16 AM
How was I to know? ;-)
Cuckoo Bird!

Your 'Key's came out nicely!  As I mention, in the next 'ScreenCast' I will indeed build 'Key's' but I will
go at using 'block nest's' as one 'octave' at a time with 'twists' along the way.  Thought about utilizing 'Sketchy Physics' ...just don't think everyone is quite ready for that yet!

Yea, so much geometry must be simplified.  This is an on-going learning process.  Fun thought, don't you agree.  Just think, you now know more about a piano keyboard than you did yesterday.

Quote from: prl on January 05, 2013, 10:55:03 AM
For what it is worth, I have SU Pro 8 and all the before flavors.  It isn't on the SketchUP side or the version

Great prl, I was just about to install v7free and test it myself.  Thanks for sparing me.

Quote from: prl on January 05, 2013, 10:55:03 AM
And to summarize Minstrel's success rate. He is "block defining" his assemblies at z=0.  Whether he understands that or not, that is what he is doing.

That's nasty!  ;D  I understand perfectly well what I'm doing and if it's exactly what you've been saying then I just don't understand how you are saying it!  I'll be like Dean...connect the dot's [in plain language], please.

But now you make me happy with this SketchUp 'rotational' ruby...I can only imagine what other 'goodies' you got in your bag of tricks

Quote from: Dean on January 05, 2013, 08:49:21 AM
Good job and thanks for sharing the tutorial.

Thanks Dean, and I know it's a challenge...just keep at it.  I've provided '3 ScreenCasts' and a multitude of
posts describing and demonstrating my approach...go back and review tut_007 - "over the Cuckoo's Nest"
If you can not duplicate all the steps I've shown, you indeed have trouble with "Play it [again], Sam.

Get as far as you can, upload what you got .dcd, and we will guide you home....

tip: Cuckoo Nest = Piano

Minstrel






prl

Quote from: minstrel on January 05, 2013, 11:28:25 AM
I understand perfectly well what I'm doing and if it's exactly what you've been saying then I just don't understand how you are saying it!  I'll be like Dean...connect the dot's [in plain language], please.

Make your piano and don't  use z=0 as the handles location.   So now you're going to say . . . hum why would I want to do that?  Kind of a loop here wouldn't you say . . . show me where I'm off but I don't want to look.

prl

Phil,  much has been learned about DesignCAD blocks in the last few weeks, warts and all.  Only reason is because of Minstrel's successful use of them in his Tree.   I consider it a great plus to DesignCAD and am grateful he posted what he did.  The exports are exposing the problems and with that maybe things will be fixed.

minstrel

Quote from: prl on January 05, 2013, 11:34:20 AM
So now you're going to say . . . hum

...no prl, you got to get 'simpler' than that!

Define 'Z=0' and how you are setting that and the picture just might come in focus...

All I do it 'snap' a handle where I choose....is that this 'Z=0'?
Or are you re-setting Z as 0 in the info box?

Minstrel

Dean

Quote from: MarkX on January 05, 2013, 10:25:56 AM
Quote from: Dean on January 05, 2013, 08:49:21 AM
Quote from: MarkX on January 04, 2013, 05:15:14 PM
Whenever I try to export/import this into SU, everything gets moved around. The new keyboard in particular wants to put itself on the back of the piano, which is awkward for the pianist. All the pianos are moved away from their original base. Once again, the all-up piano block was anchored to the same corner.
Mark,
By default what is your working plane of 2d mode? Most likely Minstrel created the drawing while in "xy" working plane of 2d mode. I get similar results to yours if I switch to "xz" and export from 2d mode view.
Will this make a difference since I exported a 3D drawing?

I happen to be using the XZ plane in 2D mode, but I didn't use the 2D mode while working and I was in 3D mode when exporting.

Thanks!
Mark

Mark,

Yea! It will make a difference. I always draw with "xz".and never change it in a drawing once it is set. When I opened Minstrel's drawing this setting changed to "xy".I have experienced un-predictable results and have "messed up" drawings when changing that and or exporting the 3d entity dwg from 3d mode view.
"I'll say it again  Dean"
Aside from "Y" being up, I haven't had any problems with native drawn Dcad 3d block coordinates >dwg 2000 exports from Dcad then importing  into Sku or Acad when I draw with "xz" set and export from 2d view. Of course these are my drawings. ;D

Minstrel,
What I'm talking about are all the finer details. Did you explain all of your current Dcad settings prior to creating the drawing.
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit