discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

projection() w/ meshmixer

D
digital
Tue, Jan 20, 2015 3:14 AM

i used simplify 3d to repair my stl and then meshmixer to slice an stl into
2 mm slices. I then exported one slice into openscad.

F6 works fine but projection() has been problematic. If I use cut=true then
I get a no top level geometry error. If I use cut=false it just takes about
an hourto process.

Attached are a couple stl file examples layer1.stl
http://forum.openscad.org/file/n11117/layer1.stl  layer2.stl
http://forum.openscad.org/file/n11117/layer2.stl  layer4.stl
http://forum.openscad.org/file/n11117/layer4.stl

--
View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

i used simplify 3d to repair my stl and then meshmixer to slice an stl into 2 mm slices. I then exported one slice into openscad. F6 works fine but projection() has been problematic. If I use cut=true then I get a no top level geometry error. If I use cut=false it just takes about an hourto process. Attached are a couple stl file examples layer1.stl <http://forum.openscad.org/file/n11117/layer1.stl> layer2.stl <http://forum.openscad.org/file/n11117/layer2.stl> layer4.stl <http://forum.openscad.org/file/n11117/layer4.stl> -- View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Tue, Jan 20, 2015 3:29 AM

On Jan 19, 2015, at 22:14 PM, digital aklee42@neo.tamu.edu wrote:

i used simplify 3d to repair my stl and then meshmixer to slice an stl into
2 mm slices. I then exported one slice into openscad.

F6 works fine but projection() has been problematic. If I use cut=true then
I get a no top level geometry error. If I use cut=false it just takes about
an hourto process.

You should not use cut=false as that projects all geometry into the XY plane. cut=true creates a cross section.
However, since your geometry lives in positive Z, you’ll have to move it down a bit, either in meshmixer or in OpenSCAD, e.g.:
projection() translate([0,0,-1]) import("layer1.stl”);

-Marius

On Jan 19, 2015, at 22:14 PM, digital <aklee42@neo.tamu.edu> wrote: > > i used simplify 3d to repair my stl and then meshmixer to slice an stl into > 2 mm slices. I then exported one slice into openscad. > > F6 works fine but projection() has been problematic. If I use cut=true then > I get a no top level geometry error. If I use cut=false it just takes about > an hourto process. You should not use cut=false as that projects all geometry into the XY plane. cut=true creates a cross section. However, since your geometry lives in positive Z, you’ll have to move it down a bit, either in meshmixer or in OpenSCAD, e.g.: projection() translate([0,0,-1]) import("layer1.stl”); -Marius
D
digital
Tue, Jan 20, 2015 3:43 AM

thank you! that did the trick, translate([0,0,-2]) did the trick.

--
View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117p11120.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

thank you! that did the trick, translate([0,0,-2]) did the trick. -- View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117p11120.html Sent from the OpenSCAD mailing list archive at Nabble.com.
D
digital
Tue, Jan 20, 2015 2:43 PM

so strangely enough, i tried the same stl file without repairing it with
simplify3D and the same code to run the projection() script and now it
doesn't work.

when I used simplify3D to repair, the projection(), translate() script
works. I think the issue is with the stl file.

Just something to ponder on.

--
View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117p11133.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

so strangely enough, i tried the same stl file without repairing it with simplify3D and the same code to run the projection() script and now it doesn't work. when I used simplify3D to repair, the projection(), translate() script works. I think the issue is with the stl file. Just something to ponder on. -- View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117p11133.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Tue, Jan 20, 2015 3:42 PM

On Jan 20, 2015, at 09:43 AM, digital aklee42@neo.tamu.edu wrote:

so strangely enough, i tried the same stl file without repairing it with
simplify3D and the same code to run the projection() script and now it
doesn't work.

Could you share that STL?

-Marius

On Jan 20, 2015, at 09:43 AM, digital <aklee42@neo.tamu.edu> wrote: > so strangely enough, i tried the same stl file without repairing it with > simplify3D and the same code to run the projection() script and now it > doesn't work. > Could you share that STL? -Marius
D
digital
Tue, Jan 20, 2015 7:17 PM

Hi Marius,

Thank you again for providing support on this community. Attached is the stl
file.  simplify_repaired_model.stl
http://forum.openscad.org/file/n11142/simplify_repaired_model.stl

I'll start from the beginning

  1. Import an STL file in simplify 3d, repair it, and then export it as an
    stl
  2. Import into Autodesk Meshmixer
  3. Edit-> make slices --> Method:stacked 3d, direction : Y, thickness:2mm,
  4. Export each sliced layer as an stl.
  5. Import each sliced layer as an stl into openscad.
  6. Run the projection(cut=true) translate([0,0, -z]) import("yourstl")
  7. export to dxf

A new problem is that the sliced layers are filled where there should be an
empty space. ie. a hole becomes filled.

And sometimes I get the no top level geometry error which I was able to
resolve with translate([0,0,-z])

I did try using Autodesk123D make. It can export to dxf but in some layers
it will cut the stl into separate parts and it will not allow me to control
the slice layer thickness.

Next, I may try to use Blender to export to dxf. I'm not too familiar with
blender so that's a challenge for another day.

I'll keep digging at this problem. Hopefully, this will benefit others.

--
View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117p11142.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Hi Marius, Thank you again for providing support on this community. Attached is the stl file. simplify_repaired_model.stl <http://forum.openscad.org/file/n11142/simplify_repaired_model.stl> I'll start from the beginning 1. Import an STL file in simplify 3d, repair it, and then export it as an stl 2. Import into Autodesk Meshmixer 3. Edit-> make slices --> Method:stacked 3d, direction : Y, thickness:2mm, 4. Export each sliced layer as an stl. 5. Import each sliced layer as an stl into openscad. 6. Run the projection(cut=true) translate([0,0, -z]) import("yourstl") 7. export to dxf A new problem is that the sliced layers are filled where there should be an empty space. ie. a hole becomes filled. And sometimes I get the no top level geometry error which I was able to resolve with translate([0,0,-z]) I did try using Autodesk123D make. It can export to dxf but in some layers it will cut the stl into separate parts and it will not allow me to control the slice layer thickness. Next, I may try to use Blender to export to dxf. I'm not too familiar with blender so that's a challenge for another day. I'll keep digging at this problem. Hopefully, this will benefit others. -- View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117p11142.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Tue, Jan 20, 2015 10:13 PM

Hi,

Thanks for the STL file. I think you’re hitting the same projection bug as this: https://github.com/openscad/openscad/issues/1130
It looks like a bug in an underlying library - I’ve sent a bug report, so let’s see if I get any feedback.

-Marius

Hi, Thanks for the STL file. I think you’re hitting the same projection bug as this: https://github.com/openscad/openscad/issues/1130 It looks like a bug in an underlying library - I’ve sent a bug report, so let’s see if I get any feedback. -Marius
D
digital
Wed, Jan 21, 2015 12:39 AM

son of a gun, i think you are right. that explains a whole lot.

--
View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117p11161.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

son of a gun, i think you are right. that explains a whole lot. -- View this message in context: http://forum.openscad.org/projection-w-meshmixer-tp11117p11161.html Sent from the OpenSCAD mailing list archive at Nabble.com.