Hello,
Something came up last night that will suck my focus back into a couple of
research projects. It is likely that I can design the instruments in
OpenSCAD, but I am very likely going to need to derive from those 2D
engineering type drawings (with dimensions, angles, and annotations). I
have only just looked briefly into this, and found a discussion on <
https://github.com/openscad/openscad/issues/3433>. Is this functionality
already in place somewhere in OpenSCAD, and if so, is a tutorial
available? If not, can jordanbrown0 comment on his workflow and tools?
Whatever my workflow ends up being, in the end I will need peer-review
publication ready drawings.
Thanks, and best regards,
EBo --
I wonder if these useful functions would best be provided via a library,
like BOSL2.
Jon
On 4/5/2024 2:35 PM, John David via Discuss wrote:
Hello,
Something came up last night that will suck my focus back into a
couple of research projects. It is likely that I can design the
instruments in OpenSCAD, but I am very likely going to need to derive
from those 2D engineering type drawings (with dimensions, angles, and
annotations). I have only just looked briefly into this, and found a
discussion on https://github.com/openscad/openscad/issues/3433. Is
this functionality already in place somewhere in OpenSCAD, and if so,
is a tutorial available? If not, can jordanbrown0 comment on his
workflow and tools?
Whatever my workflow ends up being, in the end I will need peer-review
publication ready drawings.
Thanks, and best regards,
EBo --
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
I would vote for that. (or as Benny Hill, an old British comedian, used to
say: "I would buy that for a dollar")
On Fri, Apr 5, 2024 at 2:38 PM Jon Bondy jon@jonbondy.com wrote:
I wonder if these useful functions would best be provided via a library,
like BOSL2.
Jon
On 4/5/2024 2:35 PM, John David via Discuss wrote:
Hello,
Something came up last night that will suck my focus back into a
couple of research projects. It is likely that I can design the
instruments in OpenSCAD, but I am very likely going to need to derive
from those 2D engineering type drawings (with dimensions, angles, and
annotations). I have only just looked briefly into this, and found a
discussion on https://github.com/openscad/openscad/issues/3433. Is
this functionality already in place somewhere in OpenSCAD, and if so,
is a tutorial available? If not, can jordanbrown0 comment on his
workflow and tools?
Whatever my workflow ends up being, in the end I will need peer-review
publication ready drawings.
Thanks, and best regards,
EBo --
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
While BOSL2 has the stroke()
module that can do arrowed lines, there isn’t a module the does the whole dimension line with number.
Could be a useful addition.
-Revar
On Apr 5, 2024, at 11:57 AM, John David via Discuss <discuss@lists.openscad.org> wrote:
I would vote for that. (or as Benny Hill, an old British comedian, used to say: "I would buy that for a dollar")
On Fri, Apr 5, 2024 at 2:38 PM Jon Bondy <jon@jonbondy.com> wrote:
I wonder if these useful functions would best be provided via a library,
like BOSL2.Jon
On 4/5/2024 2:35 PM, John David via Discuss wrote:
> Hello,
>
> Something came up last night that will suck my focus back into a
> couple of research projects. It is likely that I can design the
> instruments in OpenSCAD, but I am very likely going to need to derive
> from those 2D engineering type drawings (with dimensions, angles, and
> annotations). I have only just looked briefly into this, and found a
> discussion on <https://github.com/openscad/openscad/issues/3433>. Is
> this functionality already in place somewhere in OpenSCAD, and if so,
> is a tutorial available? If not, can jordanbrown0 comment on his
> workflow and tools?
>
> Whatever my workflow ends up being, in the end I will need peer-review
> publication ready drawings.
>
> Thanks, and best regards,
>
> EBo --
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org--
This email has been checked for viruses by AVG antivirus software.
www.avg.com_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I had to construct exactly this for a large project, and work it into a
dimensioning module that leverages BOSL2's $parent_geom[1] to present
available dimensions for simple 3D primitives. For more complex shapes,
like custom gears, it can accept a structure-like element to produce
measurements that aren't managed (or really, exposed today) by BOSL2.
I was going to put it out as part of that project, but it probably would do
better as part of BOSL2, or at the least, as a standalone module library;
I'm largely indifferent which. Revar, if this is something you're
interested in, let's talk.
[image: measure.png]
[image: measure_2.png]
[image: measure_4.png]
[image: measure_15.png]
[1]: probably not the safest thing to depend on, but it works for me
On Fri, Apr 5, 2024 at 6:31 PM Revar Desmera via Discuss <
discuss@lists.openscad.org> wrote:
While BOSL2 has the stroke()
module that can do arrowed lines, there
isn’t a module the does the whole dimension line with number.
Could be a useful addition.
-Revar
On Apr 5, 2024, at 11:57 AM, John David via Discuss <
discuss@lists.openscad.org> wrote:
I would vote for that. (or as Benny Hill, an old British comedian, used
to say: "I would buy that for a dollar")
On Fri, Apr 5, 2024 at 2:38 PM Jon Bondy jon@jonbondy.com wrote:
I wonder if these useful functions would best be provided via a library,
like BOSL2.
Jon
On 4/5/2024 2:35 PM, John David via Discuss wrote:
Hello,
Something came up last night that will suck my focus back into a
couple of research projects. It is likely that I can design the
instruments in OpenSCAD, but I am very likely going to need to derive
from those 2D engineering type drawings (with dimensions, angles, and
annotations). I have only just looked briefly into this, and found a
discussion on https://github.com/openscad/openscad/issues/3433. Is
this functionality already in place somewhere in OpenSCAD, and if so,
is a tutorial available? If not, can jordanbrown0 comment on his
workflow and tools?
Whatever my workflow ends up being, in the end I will need peer-review
publication ready drawings.
Thanks, and best regards,
EBo --
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This looks really interesting.
Please share the code for the same
It would be better if this is a separate standalone library
Regards
Sanjeev
On Sat, 6 Apr, 2024, 7:14 am Jonathan Gilbert via Discuss, <
discuss@lists.openscad.org> wrote:
I had to construct exactly this for a large project, and work it into a
dimensioning module that leverages BOSL2's $parent_geom[1] to present
available dimensions for simple 3D primitives. For more complex shapes,
like custom gears, it can accept a structure-like element to produce
measurements that aren't managed (or really, exposed today) by BOSL2.
I was going to put it out as part of that project, but it probably would
do better as part of BOSL2, or at the least, as a standalone module
library; I'm largely indifferent which. Revar, if this is something you're
interested in, let's talk.
[image: measure.png]
[image: measure_2.png]
[image: measure_4.png]
[image: measure_15.png]
[1]: probably not the safest thing to depend on, but it works for me
On Fri, Apr 5, 2024 at 6:31 PM Revar Desmera via Discuss <
discuss@lists.openscad.org> wrote:
While BOSL2 has the stroke()
module that can do arrowed lines, there
isn’t a module the does the whole dimension line with number.
Could be a useful addition.
-Revar
On Apr 5, 2024, at 11:57 AM, John David via Discuss <
discuss@lists.openscad.org> wrote:
I would vote for that. (or as Benny Hill, an old British comedian, used
to say: "I would buy that for a dollar")
On Fri, Apr 5, 2024 at 2:38 PM Jon Bondy jon@jonbondy.com wrote:
I wonder if these useful functions would best be provided via a library,
like BOSL2.
Jon
On 4/5/2024 2:35 PM, John David via Discuss wrote:
Hello,
Something came up last night that will suck my focus back into a
couple of research projects. It is likely that I can design the
instruments in OpenSCAD, but I am very likely going to need to derive
from those 2D engineering type drawings (with dimensions, angles, and
annotations). I have only just looked briefly into this, and found a
discussion on https://github.com/openscad/openscad/issues/3433. Is
this functionality already in place somewhere in OpenSCAD, and if so,
is a tutorial available? If not, can jordanbrown0 comment on his
workflow and tools?
Whatever my workflow ends up being, in the end I will need peer-review
publication ready drawings.
Thanks, and best regards,
EBo --
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Sanjeev,
I am not sure if it would be better separate or integrated in. I could see
it both ways. I would say whatever the mechanism it would be nice (and
maybe even a requirement) for it to work well with a couple of the more
standard libraries like BOSL2 and NopSCADlib.
On Sat, Apr 6, 2024 at 8:44 PM Sanjeev Prabhakar via Discuss <
discuss@lists.openscad.org> wrote:
This looks really interesting.
Please share the code for the same
It would be better if this is a separate standalone library
Regards
Sanjeev
On Sat, 6 Apr, 2024, 7:14 am Jonathan Gilbert via Discuss, <
discuss@lists.openscad.org> wrote:
I had to construct exactly this for a large project, and work it into a
dimensioning module that leverages BOSL2's $parent_geom[1] to present
available dimensions for simple 3D primitives. For more complex shapes,
like custom gears, it can accept a structure-like element to produce
measurements that aren't managed (or really, exposed today) by BOSL2.
I was going to put it out as part of that project, but it probably would
do better as part of BOSL2, or at the least, as a standalone module
library; I'm largely indifferent which. Revar, if this is something you're
interested in, let's talk.
[image: measure.png]
[image: measure_2.png]
[image: measure_4.png]
[image: measure_15.png]
[1]: probably not the safest thing to depend on, but it works for me
On Fri, Apr 5, 2024 at 6:31 PM Revar Desmera via Discuss <
discuss@lists.openscad.org> wrote:
While BOSL2 has the stroke()
module that can do arrowed lines, there
isn’t a module the does the whole dimension line with number.
Could be a useful addition.
-Revar
On Apr 5, 2024, at 11:57 AM, John David via Discuss <
discuss@lists.openscad.org> wrote:
I would vote for that. (or as Benny Hill, an old British comedian, used
to say: "I would buy that for a dollar")
On Fri, Apr 5, 2024 at 2:38 PM Jon Bondy jon@jonbondy.com wrote:
I wonder if these useful functions would best be provided via a
library,
like BOSL2.
Jon
On 4/5/2024 2:35 PM, John David via Discuss wrote:
Hello,
Something came up last night that will suck my focus back into a
couple of research projects. It is likely that I can design the
instruments in OpenSCAD, but I am very likely going to need to derive
from those 2D engineering type drawings (with dimensions, angles, and
annotations). I have only just looked briefly into this, and found a
discussion on https://github.com/openscad/openscad/issues/3433. Is
this functionality already in place somewhere in OpenSCAD, and if so,
is a tutorial available? If not, can jordanbrown0 comment on his
workflow and tools?
Whatever my workflow ends up being, in the end I will need
peer-review
publication ready drawings.
Thanks, and best regards,
EBo --
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Seems the general need is to have it non-integrated, which is fine. I've
segmented the annotation portions into their own library, and put them all
up for release at https://github.com/jon-gilbert/openscad_annotations/ -
this include the dimensional measurements posted earlier, along with
general annotations on shapes, mechanical annotations that detail movement,
and (my favorite) individual part numbering and automatic expansion of
joined parts.
Take a look and let me know what you think. If you find the modules useful,
I'd love to know. If you've got issues with them, I'd love to know that
also: the github issues tab is the best way to get those thoughts to me.
Cheers :D
On Fri, Apr 5, 2024 at 6:43 PM Jonathan Gilbert jong@jong.org wrote:
I had to construct exactly this for a large project, and work it into a
dimensioning module that leverages BOSL2's $parent_geom[1] to present
available dimensions for simple 3D primitives. For more complex shapes,
like custom gears, it can accept a structure-like element to produce
measurements that aren't managed (or really, exposed today) by BOSL2.
I was going to put it out as part of that project, but it probably would
do better as part of BOSL2, or at the least, as a standalone module
library; I'm largely indifferent which. Revar, if this is something you're
interested in, let's talk.
[image: measure.png]
[image: measure_2.png]
[image: measure_4.png]
[image: measure_15.png]
[1]: probably not the safest thing to depend on, but it works for me
On Fri, Apr 5, 2024 at 6:31 PM Revar Desmera via Discuss <
discuss@lists.openscad.org> wrote:
While BOSL2 has the stroke()
module that can do arrowed lines, there
isn’t a module the does the whole dimension line with number.
Could be a useful addition.
-Revar
On Apr 5, 2024, at 11:57 AM, John David via Discuss <
discuss@lists.openscad.org> wrote:
I would vote for that. (or as Benny Hill, an old British comedian, used
to say: "I would buy that for a dollar")
On Fri, Apr 5, 2024 at 2:38 PM Jon Bondy jon@jonbondy.com wrote:
I wonder if these useful functions would best be provided via a library,
like BOSL2.
Jon
On 4/5/2024 2:35 PM, John David via Discuss wrote:
Hello,
Something came up last night that will suck my focus back into a
couple of research projects. It is likely that I can design the
instruments in OpenSCAD, but I am very likely going to need to derive
from those 2D engineering type drawings (with dimensions, angles, and
annotations). I have only just looked briefly into this, and found a
discussion on https://github.com/openscad/openscad/issues/3433. Is
this functionality already in place somewhere in OpenSCAD, and if so,
is a tutorial available? If not, can jordanbrown0 comment on his
workflow and tools?
Whatever my workflow ends up being, in the end I will need peer-review
publication ready drawings.
Thanks, and best regards,
EBo --
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
--
On 4/5/2024 11:35 AM, John David via Discuss wrote:
Something came up last night that will suck my focus back into a
couple of research projects. It is likely that I can design the
instruments in OpenSCAD, but I am very likely going to need to derive
from those 2D engineering type drawings (with dimensions, angles, and
annotations). I have only just looked briefly into this, and found a
discussion on https://github.com/openscad/openscad/issues/3433. Is
this functionality already in place somewhere in OpenSCAD, and if so,
is a tutorial available? If not, can jordanbrown0 comment on his
workflow and tools?
There is not, and for the reasons I gave in my comments it isn't even
obvious how to add it.
Conceptually, PR#4478 might help. You might have a mechanism to drop
"markers" into the geometry, and then if you use the added-by-4478
"render" function it could make those positions accessible as part of
the results.
As for what I've done... I assume that you're interested in the
floorplan dimension markings.
Those are pretty straightforward, just generating geometry. They're
buried in a larger project, with no effort to library-ize them, but you
should be able to get the idea from snippets below. Note that $floor
gives the height of the floor and $floorplan is true to generate a 2D
representation. I don't see any other dependencies, but let me know if
there's something you can't figure out.
module dim3(a, b, rot=0, h=10, r, d=1, label) {
a = make3(a);
b = make3(b);
r = default(r, default(d, 1)/2);
d = default(d, r2);
p = topolar(b-a);
label = default(label, str(round(p[0]/inch), """));
cone_r = r2;
cone_h = r4;
translate(a) rotate([0,p[2],p[1]]) {
translate([0,0,cone_h]) cylinder(h=p[0]-cone_h2,r=r);
translate([0,0,p[0]-cone_h]) cylinder(h=cone_h, r1=cone_r, r2=0);
cylinder(h=cone_h, r1=0, r2=cone_r);
rotate([0,-90,0])
rotate([rot,0,0])
linear_extrude(height=r2, center=true)
translate([p[0]/2,r1.2,0])
text(label, size=h, halign="center", valign="bottom");
}
}
module dim2(a, b, h=10, r, d, label) {
a = make2(a);
b = make2(b);
r = default(r, default(d, 1)/2);
d = default(d, r2);
p = topolar(b-a);
label = default(label, str(round(p[0]/inch), """));
cone_r = r3;
cone_h = r4;
translate(a) rotate(p[1]) {
translate([cone_h,-r]) square([p[0]-cone_h2,d]);
translate([p[0]-cone_h,0]) rotate(-90) trapezoid(h=cone_h, w1=cone_r2, w2=0);
rotate(-90) trapezoid(h=cone_h, w1=0, w2=cone_r2);
translate([p[0]/2,r*1.2])
text(label, size=h, halign="center", valign="bottom");
}
}
module dim(a, b, h=10, r, d=1, label) {
if ($dims) {
if (!is_undef($floorplan) && $floorplan) {
dim2(a=a, b=b, h=h, r=r, d=d, label=label);
} else {
translate([0,0,is_undef($floor) ? 0 : $floor])
dim3(a=a, b=b, h=h, r=r, d=d, label=label);
}
}
}
function default(val, def) = is_undef(val) ? def : val;
module trapezoid(h, w, w1, w2) {
w1 = default(w1, w);
w2 = default(w2, w);
polygon([
[-w1/2, 0],
[-w2/2, h],
[w2/2, h],
[w1/2, 0]
]);
}
// Given an [x,y] or [x,y,z], transform to a
// [rho, theta] or [rho, theta, phi].
// Note that in mathematical spherical coordinates,
// phi is measured down from vertical. This is as
// opposed to geographic coordinates, where latitude
// is measured up from the equator.
function topolar(p) =
len(p) == 3 ? topolar3(p) : topolar2(p);
function topolar2(p) = [
norm(p),
atan2(p.y, p.x)
];
function topolar3(p) = [
norm(p),
atan2(p.y, p.x),
atan2(norm([p.x,p.y]), p.z)
];
// @brief Given an [x,y] or an [x,y,z], return an [x,y,z].
// @param a A two- or three- element array
// @returns A three-element array
function make3(a) =
assert(len(a) == 2 || len(a) == 3)
len(a) == 3 ? a : concat(a, 0);
// @brief Given an [x,y] or an [x,y,z], return an [x,y],
// discarding z.
// @param a A two- or three- element array
// @returns A two-element array
function make2(a) =
assert(len(a) == 2 || len(a) == 3)
[ a[0], a[1] ];
Hi!
In the following 2 sketches I’m trying to create a hole in the middle of a sphere by subtracting a cylinder.
While the sphere comes out in the correct place, There is no hole.
I should mention that I’m blind and can’t check my design in the app.
Obviously there is something I’m not getting about transformation. I’d be really glad if someone could enlighten me as to the actual positions of the cylinders.
Sketch 1:
difference()
{
cylinder(h=10,d=39);
cylinder(h=10,d=35);
}
difference()
{
translate([0,0,5])
cylinder(h=50,r1=23,r2=5);
cylinder(h=50,r1=19,r2=4);
}
difference()
{
translate([0,0,50])
sphere(d=10);
translate([0,0,50])
cylinder(h=10,d=3, center=true);
}
Sketch 2:
difference()
{
cylinder(h=140,r1=33,r2=23);
cylinder(h=140,r1=30.5,r2=20.5);
}
difference()
{
translate([0,0,7])
cylinder(h=3,d=65);
translate([0,0,7])
cylinder(h=3,d=54);
}
difference()
{
translate([21,0,127])
sphere(d=14);
rotate([0,90,0])
translate([12,0,127])
cylinder(h=20,d=11.1);
}
Cheers! Robbie