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 - "One Flew Over the Cuckoo' Nest"

Started by minstrel, December 29, 2012, 11:18:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Garry K

Here is the complete cabinet. Yes I see the more attachments - now I know it is a link.

My process is to build each cabinet layer by layer and then move and optionally mirror and or rotate the cabinet into position.
There is fair amount of negative Z values.

minstrel

#16
Quote from: Garry K on December 30, 2012, 05:04:58 PM
There is fair amount of negative Z values.

Tried the file...what is it?  Downloads with a .txt extension...is it a 'macro'?  Gave it a .dcd extension and the results did not resemble a cabinet :o ;tried it as a 'macro'... it failed.

Quote from: Dr PR on December 30, 2012, 03:58:41 PM
Another possibility is that pre-rotated blocks export with relative block coordinates different from the block definition.

Just a thought ... and a 'Question'. 

Is the 'Rotation' function and the 'Mirror' function in any way related?  I've a gut feeling they are.
If so, there has been recent issues regarding the 'mirror' function so perhaps this is a place to examine.

Minstrel

prl

#17
Minstrel,

Working with your shelving unit. Attached are two drawings with your shelving units in the same locations.   Test1 drawing is your shelving unit cut and pasted into the floor plan.  Version two is I started with the solids version and block defined with my understanding of where handles are being located.  In both drawings if you Point menu>"Show block/symbol" handles, you can see handles are in the same locations.

With no pre-rotation,

Exporting test drawing 1 works.
Exporting test drawing 2 doesn't.

Question: What, Why?

Can you reproduce your results on the floor plan with any assembly repeatedly?

Thanks.  (. . . only works if Nurse Ratched isn't looking . . . ;)).

Edit: On a separate item,  remember I mentioned cut/paste properly converted the cm units to ft.  This works, but using block insert once you pasted the new block(s) into your drawing doesn't.  Bug.


Edit:  Also as a request, how about we avoid nested blocks for the moment?  Until this handles situation is clearly understood and defined with a top-most level block holding solids, it doesn't make sense to wrap blocks with blocks.




prl

Quote from: minstrel on December 31, 2012, 03:02:20 AM
Tried the file...what is it?

Minstrel, the file is a data file. You need to run the Cabinets.d3m macro.  Edit the Cabinets.d3m macro so it can find the "Cabinets.txt" data file.

Overview of what I think Garry is doing. He is building these cabinets instantly via a C++ menu interface which probably has nice drop-down dialogs for all the different sizes etc.  Once he hits the "build" button, the C++  interface is generating the data file and then running the Cabinets.d3m macro.

I've done things like this too.  Using OLE for the GUI items and basiccad for the building of things.

prl

Quote from: Dr PR on December 30, 2012, 03:58:41 PM
Does Sketchup support negative coordinates

Thanks Phil.  SketchUP is like DesignCAD, anything can be anything (positive, negative, in any of the eight 3d quadrants.

SketchUP even has a neat feature of negative scaling.  If you select an item or component and say for the x scale you type in -1,  the assembly will mirror flip itself so everything with a positive x value now has the negative of that value.   Visually one can also do this by taking their x scaling grip and pulling backwards through the entity itself.

Garry K

Minstrel,

The txt file is a CSV that contains data.
The d3m file is the macro. The macro opens the txt file - place both in c:\src\jobs

Line 12 of the macro file:
Open "i", 2, "c:\src\jobs\Cabinets.txt"

The whole point is for Cabinet Maker to build a set of cabinets - any cabinet - call up DC and have DC draw the entire cabinet.

Instead of increasing the complexity of Cabinet Maker, I'm trying to get DC to do the work. Cabinet Maker first draws an entire cabinet in a certain spot and then move it into place. The mirror and rotation elements are used to properly place a cabinet into it's final place in 3D.

The drawing that I started with does not require mirror or rotate.

The fundamental requirement is to simplify the export from DC to SU. I can convert each and every solid to a block. There are certain logical groupings for the cabinet - so some nesting will be mandatory. For instance a top, bottom, left side and right side would become a cabinet case. Drawer parts become a drawer box. Drawer boxes and cases etc. become a complete cabinet. And there are many cabinets in a job.

The reason there are negative values in the drawing is because all cabinets start out using 0,0,0 as the bottom left hand corner at the wall. The cabinet parts are drawn up, right and towards us. This creates the negative values. I would think that the problem is with the dxf / dwg export routines - not with DC itself.




prl

Garry,

Do you have a special version of the Cabinets.d3m that makes the blocks?  That's the one I'd like to play with.

minstrel

Now, this all looks very interesting, Guy's and I can't wait to dig into it!

...but, 'New Years Eve' is upon me here in the Netherlands ... so we'll pick this up again next year!

"All the best to one and all for a blessed 2013!"

Minstrel

Garry K

Quote from: prl on December 31, 2012, 07:40:34 AM
Do you have a special version of the Cabinets.d3m that makes the blocks?  That's the one I'd like to play with.

PRL,

No I don't - at least not yet. I was hoping to find a simple and repeatable solution that I could automate. For the blocks I started with 1 simple medicine cabinet and then worked with design cad creating blocks and then export and SU import.

Once I get the blocks working (I still need some more fundamental understanding of blocks) then I will modify the DC macro.

BTW - I create the macro in Cabinet Maker using a code generator approach. Cabinet Maker creates a complete cutting list for the job and exports the list to Cut List Pro. Cut List is a panel optimizer program that places parts onto sheet stock to reduce waste to an absolute minimum.

The Cabinet Maker software now includes a 60 page pdf help file. I've been working on an installer so it will be available shortly as a beta. Here are some screen shots.






Garry K

I believe that this is more about dxf / dwg exports than about blocks. Never the less ...

1) I ran my macro in DC 22.1 3D - All 6 bathroom cabinets.
2) I defined blocks for each and every solid using a logical naming convention. 1-top, 1-bottom etc. for cabinet 1, 2-top, 2-bottom etc. for cabinet 2 and so on.
3) I choose all blocks on a given layer and combined them into a single block 1-top, 1-bottom, 1-left side, 1-right side -> and defined block 1-case
4) I did the same for all other layers.
5) Saved the drawing and exported as dwg
6) Then I imported it into free SU 7 - it was a mess as expected.
7) I then opened the drawing produced in version 22.1 in DC 16.3 3D.
8) I saved it and exported as dwg
9) Then I imported it into free SU 7 - and it was GOOD.

This isn't definitive - but - I would say that the dxf export in 22.1 is where the bug is.

prl

#25
Garry,

After your cabinets.d3m macro finished, I ran it through a solids to block routine I have. I purposely had every block set a handle location at the total assembly insertion point (0,0,0).  Then did a normal export to SU.  This worked also.  I've attached the SketchUP file.  It is in version 5 so everyone can load it (hopefully).

In your method using 16.3, where did you place the handles when defining the blocks?  There is clearly something different for exporting before DC 17.2 and after.

Garry K

They were random, I wanted to KISS.

1) I clicked on a solid, chose "block define", gave it a unique name and  left the choice as "Convert to Block"
2) I clicked on a second solid, pressed F3, gave it a unique name ...

Another observation was that trying to make a block across layers did not work.

prl

#27
Quote from: Garry K on December 31, 2012, 03:32:11 PM
Another observation was that trying to make a block across layers did not work.

I agree with KISS but making a block across layers should work.  I've done it.  Example:  Door is the block which sits on the door layer which holds wooden door members on frame layer and metal hardware (handles/knobs) on hardware1, hardware2, layers.   You can have several handles just by turning on/off various layers.

Lots of strange things going on here.  Hopefully we can get to the bottom of all this.  I really would like for this to work consistently and understandably.

MarkX

Quote from: Garry K on December 31, 2012, 01:46:31 PM
7) I then opened the drawing produced in version 22.1 in DC 16.3 3D.
8) I saved it and exported as dwg
9) Then I imported it into free SU 7 - and it was GOOD.
This isn't definitive - but - I would say that the dxf export in 22.1 is where the bug is.
DC has a lot of export settings. What settings were you using for exporting in 22.1 and in 16.3 ? It seems like that should be part of the conversation ... maybe. I noticed there was a difference which settings ended up OK in SU depending on original settings in the export dialog -- and my settings were different than those Minstrel suggested.

Good luck!
Mark

prl

Quote from: MarkX on December 31, 2012, 04:58:11 PM
DC has a lot of export settings.

Good point.  Here are the settings I normally use for 22.0/22.1 and 17.2.