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.

Help Wanted (To debug some export issues)

Started by prl, November 23, 2014, 01:58:38 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

prl

High guys,  this is in this section because I am looking for help.

Behind the curtain I am investigating the winding order of complex DesignCAD planes (things with holes in them) and also DesignCAD's exporting in dwg/dxf.

So far, I'm fighting changing winding order rules and I think flawed export code.

In the attached drawing, I have created a single complex DesignCAD plane. It is copied and positioned at different angles (orientations) in 3d space.  Then I exported the drawing.

1.  It appears DesignCAD can indeed generate solids/planes with internal openings in them with the correct winding order.

2. But the export routine corrupts the data output at certain primary orientations. Example, the first vertical plane is corrupted and it is 100% in the XY plane.  The second to the last plane in that long straight line of planes rotating upward from being flat (XZ plane) is OK and is tilted off the vertical XY plane by 1 degree.

I've used three other programs to determine if the exported dwg is flawed.  SketchUP, TurboCAD, and AutoCAD all show me the same skinned over corruptions. 

My request to you.  The Dc model is attached in the next post.

1.  Load the model, create a dwg/dxf export and try it in any other program that reads dwg/dxf.  Please let me know the results.

2.  After you load the model, take the plane and add orientation positions and tell me what you get upon exporting.

prl

The DC model file is attached to this topic.

prl

#2
I tracked down some more info on this quest.  In my exports above, I pre-rotate the model and then export.  That way they appear properly in the other applications that use the other coordinate system. When you do the tests, I'm assuming you aren't pre-rotating.  So following up on the "do not pre-rotate the model" when exporting, I've noticed a difference in the model data. 

So far, my conclusions.

1.  pre-rotating the model creates a tiny error in the model data

2.  AND, the export routine is absurdly precise when things aren't coplanar.  Nuts really. (That is how the world will end.  A dead battery and intolerance).

I exported two planes with holes.  Identical planes.  The second plane, I did fix the precision error at the 15th digit.  One plane skins over when exporting/importing.  The other is just fine.  The difference in data is below:

minstrel

Quests, winding order, pre-rotations...Admirable efforts once again, prl!

I get the same results here with SketchUp.  Seems more a 'Z-fighting' issue than 'winding order' but, as far as I know, they may just be one and the same :-\  .

Anyhow, could not resist [being the 'block-head' that I am], to redo your original drawing in 'Blocks'.  The drawing made the dwg export/transition flawlessly.  Granted, this may not assist you in your 'precision' quest but, it's probably the best approach, in SketchUp anyway.

prl

Minstrel, can you attached your DesignCAD blocked version?  Also remind me which version you are exporting with.

I'm tilting at about half-dozen windmills at the moment.  Another you just found.  Why does it work with blocks, and not straight export?


ps.  You know my goal(s).  G3s may be the future . . . but I may not live that long.

minstrel

#5
Quote from: prl on November 23, 2014, 07:59:51 AM
Minstrel, can you attached your DesignCAD blocked version?  Also remind me which version you are exporting with.

Here it is...and like I always say, "the best is yet to come!"

edit - tested with dwg exports from both DCAD v23 & v24...both same results.

Dean

Hi Prl, Do you have a name? :)
Not to throw ya a curve ball but I like using Magic's macro "Export obj" when I want the DC model in SU or Blender. It must be doing something right.
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

prl

Quote from: Dean on November 23, 2014, 08:29:48 AM
Hi Prl, Do you have a name? :)

Dean.  Looking for what people call me, besides a toolie trouble maker?  If I'm doing something right, call me Peter otherwise, polo ralph.

Don't worry about the curve ball, your insights always add to the discussion.  Behind the curtain I'm having one of my winter excursions.  A few years back, Minstrel and I discovered the "z" issue when defining blocks.  My latest quest is to figure out how screwed up or how close DesignCAD is to doing a proper dwg/dxf export for solids with holes.  I get the strong feeling, it is something small, just like the "z" issue was a simple offset error. DesignCAD has been frustratingly close to greatness for twenty years.

prl

Thanks Minstrel.  Remind me, when you do blocks to SU, you don't pre-rotate DC but you do the rotation in SU?  This is what we did two winters ago. Still the same?

By the way, you doing Christmas this year again (meaning on the forum)?  We have TurboSketch, Twilight, Blender, SketchUP, C4D, etc.   

Dean

Ok Peter,
This is my export dwg opened in SU, why is it different than yours?
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

prl

#10
Thanks Dean,  looks OK.  It is non-rotated which is what you should get if it is coming directly from DC (without prl tricks).  Only difference is the SketchUP model should be at the origin.  Maybe you moved the DesignCAD model.

Remember in SketchUP Red,Green, Blue axes come together at 0,0,0.  I'm doing a southeast view below.  You're doing a northeast. 




Dean

It appears to be that some lines during the DC export just don't get generated. It can easily be fixed in SU.
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

Dean

#12
I ran "New xyz" macro on the drawing then imported the xyz points as vectors then exported dwg then import dwg in sku. The lines were generated. is there any way to use the vectors as a cookie cutter? A macro?
Maybe it really has nothing to do with "planes"
Think about it, Is DC  removing and not replacing the lines during a subtraction?
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

prl

#13
Quote from: Dean on November 23, 2014, 09:51:09 AM
Maybe it really has nothing to do with "planes"

Since the dxf/dwg appears corrupted when pulled into several reliable programs, including AutoCAD, only conclusion I've come to is DesignCAD is making a bad dwg/dxf file.   

Now getting back to your post.  You did a lot of work pulling that into SketchUP.  My goal and so it should be is what you see in DesignCAD is what you get in SketchUp, AutoCAD, TurboCAD, etc.  any program that can pull in a correct dwg/dxf.

As easy as what I'm showing the IMSI coders.  The movie is recorded in real time.  I run DesignCAD and SU concurrently.  Geometry position in 3d space is matched between both programs. 
A movie - Testing the surface normal cleanup and cleanup coplanar edges code in SketchUP

Dean

#14
Since the xyz points contain the same coordinates, If You export the Dwg with the generated vectors from the"xyz" macro, then use "intersect faces with model" in SU, those stubborn faces become faces that can be deleted. Can you write a macro that does this is DC?
Would this "clean up" the DC 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