Extracting a part to avoid waste

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

Extracting a part to avoid waste

gounthar
Hi there, 

I'm currently trying to design a jig to help me sharpen my Record #50 bead cutters. 
I was so confident about my work that I printed the result right away... And of course, I had forgotten to setup a few tolerances here and there, so some of the parts won't slide in each other. 
Stupid me, 10 hours of printing, and most of the parts are unusable. 
I changed a few things on the smaller parts and printed them, and they now slide in. 
The problem is that I should now print again the bigger parts, but that will take ages... And maybe fail again. 
So I'm about to try to extract key sub-parts of the bigger parts so that I can try my modifications in no time. 
I think I could do that with a difference between the big part, and the difference between two cubes (with the inner cube being the volume of the bigger part's sub-part si want to keep). 
But... Do we have somewhere a library that would do the same thing ? Give it a part, coordinates and it will return a sub-part of the part. 

Thanks in advance. 

Bruno Verachten

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

Re: Extracting a part to avoid waste

nophead
I use a module called clip() for that, see https://github.com/nophead/NopSCADlib#Clip.

On Wed, 17 Feb 2021 at 12:50, Verachten Bruno <[hidden email]> wrote:
Hi there, 

I'm currently trying to design a jig to help me sharpen my Record #50 bead cutters. 
I was so confident about my work that I printed the result right away... And of course, I had forgotten to setup a few tolerances here and there, so some of the parts won't slide in each other. 
Stupid me, 10 hours of printing, and most of the parts are unusable. 
I changed a few things on the smaller parts and printed them, and they now slide in. 
The problem is that I should now print again the bigger parts, but that will take ages... And maybe fail again. 
So I'm about to try to extract key sub-parts of the bigger parts so that I can try my modifications in no time. 
I think I could do that with a difference between the big part, and the difference between two cubes (with the inner cube being the volume of the bigger part's sub-part si want to keep). 
But... Do we have somewhere a library that would do the same thing ? Give it a part, coordinates and it will return a sub-part of the part. 

Thanks in advance. 

Bruno Verachten
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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

Re: Extracting a part to avoid waste

JordanBrown
In reply to this post by gounthar
On 2/17/2021 4:49 AM, Verachten Bruno wrote:
So I'm about to try to extract key sub-parts of the bigger parts so that I can try my modifications in no time. 
I think I could do that with a difference between the big part, and the difference between two cubes (with the inner cube being the volume of the bigger part's sub-part si want to keep).

Maybe I'm not following, but that sounds like a job for intersection(), not difference().

For the simple case of extracting a "cube" that's aligned on the axes, why is it anything more than
intersection() {
    mymodel();
    translate([...]) cube([...]);
}

?

To make it easier to pick out the right cube interactively, you might make it Customizer-friendly:

/* [ Extraction ] */
// Extract a cube?
extract = false;
// Origin of cube to extract?
extract_origin = [ 0, 0, 0 ];
// Size of cube to extract?
extract_size = [ 100, 100, 100 ];

if (extract) {
    intersection() {
        mymodel();
        translate(extract_origin) cube(extract_size);
    }
} else {
    mymodel();
}



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

Re: Extracting a part to avoid waste

gounthar
> > So I'm about to try to extract key sub-parts of the bigger parts so that I can try my modifications in no time.
> > I think I could do that with a difference between the big part, and the difference between two cubes (with the inner cube being the volume of the bigger part's sub-part si want to keep).
> Maybe I'm not following, but that sounds like a job for intersection(), not difference().
Yes you're right, I was not crystal clear.

> I use a module called clip() for that, see https://github.com/nophead/NopSCADlib#Clip.
That did the trick.

Thanks a lot for your inputs, I have since then made several attempts
with the smallest critical parts sporting my latest changes, and I
noticed a few issues... that will be solved in minutes instead of
hours.

Best regards,

Bruno

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org