discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Parting Line?

PF
Peter Falke
Mon, Sep 7, 2015 9:50 PM

Now, here is a video of someone doing it in Solidworks:
https://www.youtube.com/watch?v=wzEDtLCFKMs

Pretty cumplicated, and doing it with a part created in solidworks.

2015-09-07 23:10 GMT+02:00 Peter Falke stempeldergeschichte@googlemail.com
:

Yes, I was afraid that that is what you needed.

2015-09-07 23:04 GMT+02:00 Dan dan.beavers@acm.org:

Peter Falke wrote

Here is a quick and dirty way to do it with arbitrarry shapes.
(This cound be impruved by using the 2d commands for growing and

shrinking

2d-shapes)

That is getting closer.  I just need the red part to be a line (no
dimension
in the z axis) and then extrude that into a surface along the xy
directions,
then extrude a solid in the z direction and subtract the object from the
solid.  The other half of the mold is created from extruding in the -z
direction.  It needs to be a line because there can't be any gaps between
the z and -z parts.

--
View this message in context:
http://forum.openscad.org/Parting-Line-tp13715p13734.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

Now, here is a video of someone doing it in Solidworks: https://www.youtube.com/watch?v=wzEDtLCFKMs Pretty cumplicated, and doing it with a part created in solidworks. 2015-09-07 23:10 GMT+02:00 Peter Falke <stempeldergeschichte@googlemail.com> : > Yes, I was afraid that that is what you needed. > > 2015-09-07 23:04 GMT+02:00 Dan <dan.beavers@acm.org>: > >> Peter Falke wrote >> > Here is a quick and dirty way to do it with arbitrarry shapes. >> > (This cound be impruved by using the 2d commands for growing and >> shrinking >> > 2d-shapes) >> >> That is getting closer. I just need the red part to be a line (no >> dimension >> in the z axis) and then extrude that into a surface along the xy >> directions, >> then extrude a solid in the z direction and subtract the object from the >> solid. The other half of the mold is created from extruding in the -z >> direction. It needs to be a line because there can't be any gaps between >> the z and -z parts. >> >> >> >> -- >> View this message in context: >> http://forum.openscad.org/Parting-Line-tp13715p13734.html >> Sent from the OpenSCAD mailing list archive at Nabble.com. >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > > > -- > stempeldergeschichte@googlemail.com <karsten@rohrbach.de> > > P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: > Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu > schreiben. > Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. > > P.S. In case my e-mail is shorter than you enjoy: > I am currently trying short replies instead of no replies at all. > Please let me know, if you like to read more. > > Enjoy! > -- stempeldergeschichte@googlemail.com <karsten@rohrbach.de> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben. Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. P.S. In case my e-mail is shorter than you enjoy: I am currently trying short replies instead of no replies at all. Please let me know, if you like to read more. Enjoy!
N
Neon22
Tue, Sep 8, 2015 1:57 AM

Here's a refinement using children.
Still only generates a thin shell object.
Aals the morphology operators only work on 2D shapes . Else coudl outset the
resulting shell and difference it with a cube.
I've highlighted the cube mod and used inset so it works on arbitrary stl
files.

eps=0.01;
use<scad-utils/morphology.scad>;

// sample shape
module shape()  {
hull() {
sphere(10);
translate([15,0,10]) sphere(10);
}
hull() {
translate([15,0,10]) sphere(10);
translate([45,0,0]) sphere(10);
}
}

// Generate parting line object
module parting_1() {
// Call with a child object of any kind
scale([2+eps,2+eps,1])color("red")
intersection(){
// move object below origin
translate([0,0,-50])
linear_extrude(convexity=6)
// create a thin border line (flat at origin)
#difference(){
square(size=[200,100], center=true);
inset(d=eps)
projection()
children(0);
}
// intersect with shape
children(0);
}
}

//
parting_1() shape();

--
View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13740.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Here's a refinement using children. Still only generates a thin shell object. Aals the morphology operators only work on 2D shapes . Else coudl outset the resulting shell and difference it with a cube. I've highlighted the cube mod and used inset so it works on arbitrary stl files. eps=0.01; use<scad-utils/morphology.scad>; // sample shape module shape() { hull() { sphere(10); translate([15,0,10]) sphere(10); } hull() { translate([15,0,10]) sphere(10); translate([45,0,0]) sphere(10); } } // Generate parting line object module parting_1() { // Call with a child object of any kind scale([2+eps,2+eps,1])color("red") intersection(){ // move object below origin translate([0,0,-50]) linear_extrude(convexity=6) // create a thin border line (flat at origin) #difference(){ square(size=[200,100], center=true); inset(d=eps) projection() children(0); } // intersect with shape children(0); } } // parting_1() shape(); -- View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13740.html Sent from the OpenSCAD mailing list archive at Nabble.com.
N
Neon22
Tue, Sep 8, 2015 2:06 AM

Ideally the projection() function would somehow make a polygon list
available.
Then if we could test if intersection() of a point, projected along Z, hit
an object and the resulting XYZ location we could then construct a
polyhedron from resulting list of intersection points.
This could then be further adjusted using existing tools to make a two part
mold.

any chance of thi skind of interaction in OpenSCAD2 ?

--
View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13741.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Ideally the projection() function would somehow make a polygon list available. Then if we could test if intersection() of a point, projected along Z, hit an object and the resulting XYZ location we could then construct a polyhedron from resulting list of intersection points. This could then be further adjusted using existing tools to make a two part mold. any chance of thi skind of interaction in OpenSCAD2 ? -- View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13741.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Tue, Sep 8, 2015 2:14 AM

...again we come to the dichotomy of OpenSCAD; currently OpenSCAD is a
geometry generator as a descriptive language, lately people want to make it
an iterative geometry processor, other languages do that.

(yes I have asked for stuff like bounding box in the past...)


Newly minted Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :)  - Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13743.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

...again we come to the dichotomy of OpenSCAD; currently OpenSCAD is a geometry generator as a descriptive language, lately people want to make it an iterative geometry processor, other languages do that. (yes I have asked for stuff like bounding box in the past...) ----- Newly minted Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) - Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13743.html Sent from the OpenSCAD mailing list archive at Nabble.com.
N
Neon22
Tue, Sep 8, 2015 2:58 AM

yes - indeed.
However my point is to not go as far as that but to see if we can do this
kind of op with a sensible set of useful operations within OpenSCAD.
I.e. is there a way to use the core to construct (which I feel is
reasonable) a negative mold of a complex part.

My suggestion is to facilitate this within the design of OpenSCAD, not to
turn it into a more complex programming lang.

E.g.

  • we have list complerehensions and we can construct polys from lists and
    polyhedrons from lists.
  • we should also (IMHO) be able to get a list back from a projection() so we
    can use it in a list comprehension to further adjust it...
  • I agree BBOX() is another super useful thing for exact same reasons.
    • potentially a query like bbox(modulename) would fit into the language
      (the geometry from the module being discarded from the CSG tree.

So:

  • bbox(modulename); could return a list of min,max XYZ triplets.
  • 2D(projection(modulename)); could return a nested polygon list. I.e.
    points and paths.
  • hit_test(object1, object2); could return a true or false depending on the
    existance of an intersected result. or better an XYZ triplet of center of
    bbox of the intersected objects.
    In all three cases any resulting geometry would be discarded (or hidden(*)
    so caches would be kept) from the final tree.

In this way there is minimal adjustment to how OpenSCAD currently works.

--
View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13744.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

yes - indeed. However my point is to not go as far as that but to see if we can do this kind of op with a sensible set of useful operations within OpenSCAD. I.e. is there a way to use the core to construct (which I feel is reasonable) a negative mold of a complex part. My suggestion is to facilitate this within the design of OpenSCAD, not to turn it into a more complex programming lang. E.g. - we have list complerehensions and we can construct polys from lists and polyhedrons from lists. - we should also (IMHO) be able to get a list back from a projection() so we can use it in a list comprehension to further adjust it... - I agree BBOX() is another super useful thing for exact same reasons. - potentially a query like bbox(modulename) would fit into the language (the geometry from the module being discarded from the CSG tree. So: - bbox(modulename); could return a list of min,max XYZ triplets. - 2D(projection(modulename)); could return a nested polygon list. I.e. points and paths. - hit_test(object1, object2); could return a true or false depending on the existance of an intersected result. or better an XYZ triplet of center of bbox of the intersected objects. In all three cases any resulting geometry would be discarded (or hidden(*) so caches would be kept) from the final tree. In this way there is minimal adjustment to how OpenSCAD currently works. -- View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13744.html Sent from the OpenSCAD mailing list archive at Nabble.com.
D
Dan
Tue, Sep 8, 2015 10:26 PM

This would make sense to me.  As opposed to the gyrations that may not
work well.

On 2015-09-07 21:06, Neon22 [via OpenSCAD] wrote:

Ideally the projection() function would somehow make a polygon list
available.
Then if we could test if intersection() of a point, projected along Z,
hit an object and the resulting XYZ location we could then construct a
polyhedron from resulting list of intersection points.
This could then be further adjusted using existing tools to make a two
part mold.

any chance of thi skind of interaction in OpenSCAD2 ?

--
View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13746.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

This would make sense to me. As opposed to the gyrations that may not work well. On 2015-09-07 21:06, Neon22 [via OpenSCAD] wrote: > Ideally the projection() function would somehow make a polygon list > available. > Then if we could test if intersection() of a point, projected along Z, > hit an object and the resulting XYZ location we could then construct a > polyhedron from resulting list of intersection points. > This could then be further adjusted using existing tools to make a two > part mold. > > any chance of thi skind of interaction in OpenSCAD2 ? -- View this message in context: http://forum.openscad.org/Parting-Line-tp13715p13746.html Sent from the OpenSCAD mailing list archive at Nabble.com.