discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Size determination

JW
Joe Weinpert
Sat, Feb 12, 2022 6:17 PM

How do I determine the size in millimeters or inches (X,Y,Z) of an imported
STL file?  Is there an echo that can output the size?

Also,is there a procedure to import an STL file and have it placed at 0,0,0
when loaded?

How do I determine the size in millimeters or inches (X,Y,Z) of an imported STL file? Is there an echo that can output the size? Also,is there a procedure to import an STL file and have it placed at 0,0,0 when loaded?
MM
Michael Möller
Sat, Feb 12, 2022 6:38 PM

STL files are dimensionless. "5.3" could be mm, inches or furlongs.

Do you want the center(middle, inside) to be at 0,0,0 or just lie flat on
the imaginary surface x,y plane? Either way, if you import the STL file in
OpenSCAD it's just a simple translate to move it. Knowing the max/min
values (=enclosing box) I dont know how to get, But there are (probably)
many simple programs to do those two things.

Msquare

lør. 12. feb. 2022 19.18 skrev Joe Weinpert joe.weinpert@gmail.com:

How do I determine the size in millimeters or inches (X,Y,Z) of an
imported STL file?  Is there an echo that can output the size?

Also,is there a procedure to import an STL file and have it placed at
0,0,0 when loaded?


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

STL files are dimensionless. "5.3" could be mm, inches or furlongs. Do you want the center(middle, inside) to be at 0,0,0 or just lie flat on the imaginary surface x,y plane? Either way, if you import the STL file in OpenSCAD it's just a simple translate to move it. Knowing the max/min values (=enclosing box) I dont know how to get, But there are (probably) many simple programs to do those two things. Msquare lør. 12. feb. 2022 19.18 skrev Joe Weinpert <joe.weinpert@gmail.com>: > How do I determine the size in millimeters or inches (X,Y,Z) of an > imported STL file? Is there an echo that can output the size? > > Also,is there a procedure to import an STL file and have it placed at > 0,0,0 when loaded? > > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JW
Joe Weinpert
Sat, Feb 12, 2022 7:30 PM

Understood.  Is there a way to return the objects enclosing box values in
order for it to be moved to the primary (all positive) XYZ quadrant?

On Sat, Feb 12, 2022 at 1:38 PM Michael Möller private2michael@gmail.com
wrote:

STL files are dimensionless. "5.3" could be mm, inches or furlongs.

Do you want the center(middle, inside) to be at 0,0,0 or just lie flat on
the imaginary surface x,y plane? Either way, if you import the STL file in
OpenSCAD it's just a simple translate to move it. Knowing the max/min
values (=enclosing box) I dont know how to get, But there are (probably)
many simple programs to do those two things.

Msquare

lør. 12. feb. 2022 19.18 skrev Joe Weinpert joe.weinpert@gmail.com:

How do I determine the size in millimeters or inches (X,Y,Z) of an
imported STL file?  Is there an echo that can output the size?

Also,is there a procedure to import an STL file and have it placed at
0,0,0 when loaded?


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

Understood. Is there a way to return the objects enclosing box values in order for it to be moved to the primary (all positive) XYZ quadrant? On Sat, Feb 12, 2022 at 1:38 PM Michael Möller <private2michael@gmail.com> wrote: > STL files are dimensionless. "5.3" could be mm, inches or furlongs. > > Do you want the center(middle, inside) to be at 0,0,0 or just lie flat on > the imaginary surface x,y plane? Either way, if you import the STL file in > OpenSCAD it's just a simple translate to move it. Knowing the max/min > values (=enclosing box) I dont know how to get, But there are (probably) > many simple programs to do those two things. > > Msquare > > lør. 12. feb. 2022 19.18 skrev Joe Weinpert <joe.weinpert@gmail.com>: > >> How do I determine the size in millimeters or inches (X,Y,Z) of an >> imported STL file? Is there an echo that can output the size? >> >> Also,is there a procedure to import an STL file and have it placed at >> 0,0,0 when loaded? >> >> >> >> _______________________________________________ >> 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 >
JB
Jordan Brown
Sat, Feb 12, 2022 7:36 PM

Alas, there is exactly zero information available about an imported STL
file.  It gets positioned where it says to position it, and there's no
control or information available.

(Of course, once it's imported you can translate, rotate, and otherwise
transform it, but you can't control where it first appears.)

Alas, there is exactly zero information available about an imported STL file.  It gets positioned where it says to position it, and there's no control or information available. (Of course, once it's imported you can translate, rotate, and otherwise transform it, but you can't control where it first appears.)
F
fred
Sat, Feb 12, 2022 8:21 PM

I've found that the location of an imported STL is based on the origin from the program which created it, although I've not researched/experimented with that aspect beyond ensuring that my STL files are repositioned in Meshmixer, Fusion 360 or similar before saving them. One could import the STL in question if not locally created, translate/move it to the desired spot and save for OpenSCAD use.

On Saturday, February 12, 2022, 02:36:55 PM EST, Jordan Brown <openscad@jordan.maileater.net> wrote:  

Alas, there is exactly zero information available about an imported STL file.  It gets positioned where it says to position it, and there's no control or information available.

(Of course, once it's imported you can translate, rotate, and otherwise transform it, but you can't control where it first appears.)


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I've found that the location of an imported STL is based on the origin from the program which created it, although I've not researched/experimented with that aspect beyond ensuring that my STL files are repositioned in Meshmixer, Fusion 360 or similar before saving them. One could import the STL in question if not locally created, translate/move it to the desired spot and save for OpenSCAD use. On Saturday, February 12, 2022, 02:36:55 PM EST, Jordan Brown <openscad@jordan.maileater.net> wrote: Alas, there is exactly zero information available about an imported STL file.  It gets positioned where it says to position it, and there's no control or information available. (Of course, once it's imported you can translate, rotate, and otherwise transform it, but you can't control where it first appears.) _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org
TP
Torsten Paul
Sat, Feb 12, 2022 10:00 PM

On 12.02.22 20:30, Joe Weinpert wrote:

Is there a way to return the objects enclosing box
values in order for it to be moved to the primary
(all positive) XYZ quadrant?

In the language, not yet, that's being worked on but
it's not ready.

For a simple case as a single STL file, you can just
import the STL alone with the development snapshot:

import("/usr/share/openscad-nightly/examples/Old/example016.stl");

and enable:

Preferences -> Advanced -> Render Summary -> Bounding Box

this will output after F6:

Top level object is a 3D object:
Facets:        128
Bounding box:
Min:  -15.00, -15.00, 0.00
Max:  49.00, 15.00, 15.00
Size: 64.00, 30.00, 15.00
Rendering finished.

ciao,
Torsten.

On 12.02.22 20:30, Joe Weinpert wrote: > Is there a way to return the objects enclosing box > values in order for it to be moved to the primary > (all positive) XYZ quadrant? In the language, not yet, that's being worked on but it's not ready. For a simple case as a single STL file, you can just import the STL alone with the development snapshot: import("/usr/share/openscad-nightly/examples/Old/example016.stl"); and enable: Preferences -> Advanced -> Render Summary -> Bounding Box this will output after F6: Top level object is a 3D object: Facets: 128 Bounding box: Min: -15.00, -15.00, 0.00 Max: 49.00, 15.00, 15.00 Size: 64.00, 30.00, 15.00 Rendering finished. ciao, Torsten.
JW
Joe Weinpert
Sat, Feb 12, 2022 10:43 PM

Thanks for the heads up on the development file.  Will take a peek.

On Sat, Feb 12, 2022 at 5:00 PM Torsten Paul Torsten.Paul@gmx.de wrote:

On 12.02.22 20:30, Joe Weinpert wrote:

Is there a way to return the objects enclosing box
values in order for it to be moved to the primary
(all positive) XYZ quadrant?

In the language, not yet, that's being worked on but
it's not ready.

For a simple case as a single STL file, you can just
import the STL alone with the development snapshot:

import("/usr/share/openscad-nightly/examples/Old/example016.stl");

and enable:

Preferences -> Advanced -> Render Summary -> Bounding Box

this will output after F6:

Top level object is a 3D object:
Facets:        128
Bounding box:
Min:  -15.00, -15.00, 0.00
Max:  49.00, 15.00, 15.00
Size: 64.00, 30.00, 15.00
Rendering finished.

ciao,
Torsten.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Thanks for the heads up on the development file. Will take a peek. On Sat, Feb 12, 2022 at 5:00 PM Torsten Paul <Torsten.Paul@gmx.de> wrote: > On 12.02.22 20:30, Joe Weinpert wrote: > > Is there a way to return the objects enclosing box > > values in order for it to be moved to the primary > > (all positive) XYZ quadrant? > > In the language, not yet, that's being worked on but > it's not ready. > > For a simple case as a single STL file, you can just > import the STL alone with the development snapshot: > > import("/usr/share/openscad-nightly/examples/Old/example016.stl"); > > and enable: > > Preferences -> Advanced -> Render Summary -> Bounding Box > > this will output after F6: > > Top level object is a 3D object: > Facets: 128 > Bounding box: > Min: -15.00, -15.00, 0.00 > Max: 49.00, 15.00, 15.00 > Size: 64.00, 30.00, 15.00 > Rendering finished. > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AC
A. Craig West
Sun, Feb 13, 2022 4:21 AM

If you need dimensions and positions from stl, there is a collection of
command line tools that can help...
https://www.google.com/url?sa=t&source=web&rct=j&url=https://github.com/AllwineDesigns/stl_cmd&ved=2ahUKEwjK2feU6fv1AhWSyIUKHcBNByEQFnoECBUQAQ&sqi=2&usg=AOvVaw0Xz6tzEYgEfKw83mGcTsvJ
One of them allows you to centre a model automatically, either either
centred vertically or with the lowest offset at 0. I use it a lot to
preprocessor models I need to import into openscad

On Sat, 12 Feb 2022, 17:44 Joe Weinpert, joe.weinpert@gmail.com wrote:

Thanks for the heads up on the development file.  Will take a peek.

On Sat, Feb 12, 2022 at 5:00 PM Torsten Paul Torsten.Paul@gmx.de wrote:

On 12.02.22 20:30, Joe Weinpert wrote:

Is there a way to return the objects enclosing box
values in order for it to be moved to the primary
(all positive) XYZ quadrant?

In the language, not yet, that's being worked on but
it's not ready.

For a simple case as a single STL file, you can just
import the STL alone with the development snapshot:

import("/usr/share/openscad-nightly/examples/Old/example016.stl");

and enable:

Preferences -> Advanced -> Render Summary -> Bounding Box

this will output after F6:

Top level object is a 3D object:
Facets:        128
Bounding box:
Min:  -15.00, -15.00, 0.00
Max:  49.00, 15.00, 15.00
Size: 64.00, 30.00, 15.00
Rendering finished.

ciao,
Torsten.


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

If you need dimensions and positions from stl, there is a collection of command line tools that can help... https://www.google.com/url?sa=t&source=web&rct=j&url=https://github.com/AllwineDesigns/stl_cmd&ved=2ahUKEwjK2feU6fv1AhWSyIUKHcBNByEQFnoECBUQAQ&sqi=2&usg=AOvVaw0Xz6tzEYgEfKw83mGcTsvJ One of them allows you to centre a model automatically, either either centred vertically or with the lowest offset at 0. I use it a lot to preprocessor models I need to import into openscad On Sat, 12 Feb 2022, 17:44 Joe Weinpert, <joe.weinpert@gmail.com> wrote: > Thanks for the heads up on the development file. Will take a peek. > > On Sat, Feb 12, 2022 at 5:00 PM Torsten Paul <Torsten.Paul@gmx.de> wrote: > >> On 12.02.22 20:30, Joe Weinpert wrote: >> > Is there a way to return the objects enclosing box >> > values in order for it to be moved to the primary >> > (all positive) XYZ quadrant? >> >> In the language, not yet, that's being worked on but >> it's not ready. >> >> For a simple case as a single STL file, you can just >> import the STL alone with the development snapshot: >> >> import("/usr/share/openscad-nightly/examples/Old/example016.stl"); >> >> and enable: >> >> Preferences -> Advanced -> Render Summary -> Bounding Box >> >> this will output after F6: >> >> Top level object is a 3D object: >> Facets: 128 >> Bounding box: >> Min: -15.00, -15.00, 0.00 >> Max: 49.00, 15.00, 15.00 >> Size: 64.00, 30.00, 15.00 >> Rendering finished. >> >> ciao, >> Torsten. >> _______________________________________________ >> 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 >
JW
Joe Weinpert
Sun, Feb 13, 2022 4:19 PM

I looked at the information on the link you sent.  Looks very interesting.

I have no way that I am aware of in using GIT.  Is there a ZIP or Windows
EXE file for getting these files?

On Sat, Feb 12, 2022 at 11:22 PM A. Craig West acraigwest@gmail.com wrote:

If you need dimensions and positions from stl, there is a collection of
command line tools that can help...
https://www.google.com/url?sa=t&source=web&rct=j&url=https://github.com/AllwineDesigns/stl_cmd&ved=2ahUKEwjK2feU6fv1AhWSyIUKHcBNByEQFnoECBUQAQ&sqi=2&usg=AOvVaw0Xz6tzEYgEfKw83mGcTsvJ
One of them allows you to centre a model automatically, either either
centred vertically or with the lowest offset at 0. I use it a lot to
preprocessor models I need to import into openscad

On Sat, 12 Feb 2022, 17:44 Joe Weinpert, joe.weinpert@gmail.com wrote:

Thanks for the heads up on the development file.  Will take a peek.

On Sat, Feb 12, 2022 at 5:00 PM Torsten Paul Torsten.Paul@gmx.de wrote:

On 12.02.22 20:30, Joe Weinpert wrote:

Is there a way to return the objects enclosing box
values in order for it to be moved to the primary
(all positive) XYZ quadrant?

In the language, not yet, that's being worked on but
it's not ready.

For a simple case as a single STL file, you can just
import the STL alone with the development snapshot:

import("/usr/share/openscad-nightly/examples/Old/example016.stl");

and enable:

Preferences -> Advanced -> Render Summary -> Bounding Box

this will output after F6:

Top level object is a 3D object:
Facets:        128
Bounding box:
Min:  -15.00, -15.00, 0.00
Max:  49.00, 15.00, 15.00
Size: 64.00, 30.00, 15.00
Rendering finished.

ciao,
Torsten.


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

I looked at the information on the link you sent. Looks very interesting. I have no way that I am aware of in using GIT. Is there a ZIP or Windows EXE file for getting these files? On Sat, Feb 12, 2022 at 11:22 PM A. Craig West <acraigwest@gmail.com> wrote: > If you need dimensions and positions from stl, there is a collection of > command line tools that can help... > https://www.google.com/url?sa=t&source=web&rct=j&url=https://github.com/AllwineDesigns/stl_cmd&ved=2ahUKEwjK2feU6fv1AhWSyIUKHcBNByEQFnoECBUQAQ&sqi=2&usg=AOvVaw0Xz6tzEYgEfKw83mGcTsvJ > One of them allows you to centre a model automatically, either either > centred vertically or with the lowest offset at 0. I use it a lot to > preprocessor models I need to import into openscad > > On Sat, 12 Feb 2022, 17:44 Joe Weinpert, <joe.weinpert@gmail.com> wrote: > >> Thanks for the heads up on the development file. Will take a peek. >> >> On Sat, Feb 12, 2022 at 5:00 PM Torsten Paul <Torsten.Paul@gmx.de> wrote: >> >>> On 12.02.22 20:30, Joe Weinpert wrote: >>> > Is there a way to return the objects enclosing box >>> > values in order for it to be moved to the primary >>> > (all positive) XYZ quadrant? >>> >>> In the language, not yet, that's being worked on but >>> it's not ready. >>> >>> For a simple case as a single STL file, you can just >>> import the STL alone with the development snapshot: >>> >>> import("/usr/share/openscad-nightly/examples/Old/example016.stl"); >>> >>> and enable: >>> >>> Preferences -> Advanced -> Render Summary -> Bounding Box >>> >>> this will output after F6: >>> >>> Top level object is a 3D object: >>> Facets: 128 >>> Bounding box: >>> Min: -15.00, -15.00, 0.00 >>> Max: 49.00, 15.00, 15.00 >>> Size: 64.00, 30.00, 15.00 >>> Rendering finished. >>> >>> ciao, >>> Torsten. >>> _______________________________________________ >>> 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 >
AC
A. Craig West
Sun, Feb 13, 2022 4:57 PM

If you choose the code button on that page, you can download zip, but that
gets you the source code, you still have to build it. Depending on what OS
you are on, I may be able to build binaries for you, if you need...

On Sun, Feb 13, 2022 at 11:20 AM Joe Weinpert joe.weinpert@gmail.com
wrote:

I looked at the information on the link you sent.  Looks very interesting.

I have no way that I am aware of in using GIT.  Is there a ZIP or Windows
EXE file for getting these files?

On Sat, Feb 12, 2022 at 11:22 PM A. Craig West acraigwest@gmail.com
wrote:

If you need dimensions and positions from stl, there is a collection of
command line tools that can help...
https://www.google.com/url?sa=t&source=web&rct=j&url=https://github.com/AllwineDesigns/stl_cmd&ved=2ahUKEwjK2feU6fv1AhWSyIUKHcBNByEQFnoECBUQAQ&sqi=2&usg=AOvVaw0Xz6tzEYgEfKw83mGcTsvJ
One of them allows you to centre a model automatically, either either
centred vertically or with the lowest offset at 0. I use it a lot to
preprocessor models I need to import into openscad

On Sat, 12 Feb 2022, 17:44 Joe Weinpert, joe.weinpert@gmail.com wrote:

Thanks for the heads up on the development file.  Will take a peek.

On Sat, Feb 12, 2022 at 5:00 PM Torsten Paul Torsten.Paul@gmx.de
wrote:

On 12.02.22 20:30, Joe Weinpert wrote:

Is there a way to return the objects enclosing box
values in order for it to be moved to the primary
(all positive) XYZ quadrant?

In the language, not yet, that's being worked on but
it's not ready.

For a simple case as a single STL file, you can just
import the STL alone with the development snapshot:

import("/usr/share/openscad-nightly/examples/Old/example016.stl");

and enable:

Preferences -> Advanced -> Render Summary -> Bounding Box

this will output after F6:

Top level object is a 3D object:
Facets:        128
Bounding box:
Min:  -15.00, -15.00, 0.00
Max:  49.00, 15.00, 15.00
Size: 64.00, 30.00, 15.00
Rendering finished.

ciao,
Torsten.


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

If you choose the code button on that page, you can download zip, but that gets you the source code, you still have to build it. Depending on what OS you are on, I may be able to build binaries for you, if you need... On Sun, Feb 13, 2022 at 11:20 AM Joe Weinpert <joe.weinpert@gmail.com> wrote: > > I looked at the information on the link you sent. Looks very interesting. > > I have no way that I am aware of in using GIT. Is there a ZIP or Windows > EXE file for getting these files? > > > > On Sat, Feb 12, 2022 at 11:22 PM A. Craig West <acraigwest@gmail.com> > wrote: > >> If you need dimensions and positions from stl, there is a collection of >> command line tools that can help... >> https://www.google.com/url?sa=t&source=web&rct=j&url=https://github.com/AllwineDesigns/stl_cmd&ved=2ahUKEwjK2feU6fv1AhWSyIUKHcBNByEQFnoECBUQAQ&sqi=2&usg=AOvVaw0Xz6tzEYgEfKw83mGcTsvJ >> One of them allows you to centre a model automatically, either either >> centred vertically or with the lowest offset at 0. I use it a lot to >> preprocessor models I need to import into openscad >> >> On Sat, 12 Feb 2022, 17:44 Joe Weinpert, <joe.weinpert@gmail.com> wrote: >> >>> Thanks for the heads up on the development file. Will take a peek. >>> >>> On Sat, Feb 12, 2022 at 5:00 PM Torsten Paul <Torsten.Paul@gmx.de> >>> wrote: >>> >>>> On 12.02.22 20:30, Joe Weinpert wrote: >>>> > Is there a way to return the objects enclosing box >>>> > values in order for it to be moved to the primary >>>> > (all positive) XYZ quadrant? >>>> >>>> In the language, not yet, that's being worked on but >>>> it's not ready. >>>> >>>> For a simple case as a single STL file, you can just >>>> import the STL alone with the development snapshot: >>>> >>>> import("/usr/share/openscad-nightly/examples/Old/example016.stl"); >>>> >>>> and enable: >>>> >>>> Preferences -> Advanced -> Render Summary -> Bounding Box >>>> >>>> this will output after F6: >>>> >>>> Top level object is a 3D object: >>>> Facets: 128 >>>> Bounding box: >>>> Min: -15.00, -15.00, 0.00 >>>> Max: 49.00, 15.00, 15.00 >>>> Size: 64.00, 30.00, 15.00 >>>> Rendering finished. >>>> >>>> ciao, >>>> Torsten. >>>> _______________________________________________ >>>> 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 >