Rendering Issue

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Rendering Issue

Experimentalist
Hi

I often want to remix work by others. This usually relates to moved fixings and openings. I usually heal the original opening and then create a new one to suit my needs. To do this I usually import the original stl and then create a plug, union() the two together and then finally make the new hole using difference().

I am trying to do this with an object from Thingiverse:

http://www.thingiverse.com/thing:588121


Here is my code that will not render correctly:

$fn=60;

importOnly();

module importOnly(){
    union(){
        #cylinder(h=30.2, d=6);
        translate([-100.55,-146.85,0])
            import("Launchpad_Core_Rounded.stl", convexity=10);
    }
}


What I get is just the cylinder that could be created with just this:

cylinder(h=30.2, d=6);


I have tried using utilities that convert the STL to an OpenSCAD polygon, such as:

http://jsfiddle.net/Riham/yzvGD/embedded/result/

I have the same issue either way, any ideas why this will not work?
Reply | Threaded
Open this post in threaded view
|

Re: Rendering Issue

Parkinbot
With my system the import has no problem. Try to update OpenSCAD (I am using 2016.01)
Reply | Threaded
Open this post in threaded view
|

Re: Rendering Issue

macdarren
This post was updated on .
In reply to this post by Experimentalist
On my system it will Preview but the STL won't render using your code.
I get this error:

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: pe_prev->is_border() || !internal::Plane_constructor::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate() File: /Users/kintel/code/OpenSCAD/openscad/../libraries/install/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h Line: 251

Strangely if I simply import the object by opening it with scad it creates a new file with one line:

import("/Launchpad_Core_Rounded.stl");

 This is will both preview and render fine...
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Rendering Issue

tp3
On 03/24/2016 02:30 AM, macdarren wrote:
> Strangely if I simply import the object by opening it with
> scad it creates a new file with one line:
>
> import("/Users/macdarren/Downloads/Launchpad_Core_Rounded.stl");
>
> This is will both preview and render fine...
>
This is normal as no CSG operation is done for just the import().

The STL has 17 Zero Faces (polygons without area) which OpenSCAD,
or more specifically libCGAL which is used to do the boolean
operations, does not like.

Using the repair filter in MeshLab as mentioned in the FAQ
fixes the issue for me:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_is_my_imported_STL_file_only_showing_up_with_F5_but_not_F6.3F

ciao,
  Torsten.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Rendering Issue

macdarren
In reply to this post by Experimentalist
For grins I ran the original STL through Netfabb,
now your code seems to both preview and render fine using the 'fixed' model.

Your fill plug shows as very slightly taller than the original surface of the model.  It did this on the earlier prefixed model in the preview to so probably not the result of anything in the repair process.

My guess something odd about the STL file when openscad tried to merge the plug into the shape.

https://modelrepair.azurewebsites.net
Reply | Threaded
Open this post in threaded view
|

Re: Rendering Issue

Experimentalist
In reply to this post by Experimentalist
Thanks for all the replies, I will repair the original as advised and move on. I think I am running one of the nightly builds at present so I will also update.