discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Size determination

JW
Joe Weinpert
Sun, Feb 13, 2022 6:22 PM

Am currently on an older desktop using 64-bit Windows 7 Pro w/ Service Pack
1.

The zip is downloaded.

I assume that each cpp is to be compiled into an exe and run from the cmd
window, correct?

If so, what do I need to run from the cmd window to compile each of the cpp
files?

What would I look for on my system to determine if I already have what is
needed for compiling?

On Sun, Feb 13, 2022 at 11:57 AM A. Craig West acraigwest@gmail.com wrote:

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


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

Am currently on an older desktop using 64-bit Windows 7 Pro w/ Service Pack 1. The zip is downloaded. I assume that each cpp is to be compiled into an exe and run from the cmd window, correct? If so, what do I need to run from the cmd window to compile each of the cpp files? What would I look for on my system to determine if I already have what is needed for compiling? On Sun, Feb 13, 2022 at 11:57 AM A. Craig West <acraigwest@gmail.com> wrote: > 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 >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
L
larry
Tue, Feb 15, 2022 9:24 PM

On Sat, 2022-02-12 at 13:17 -0500, Joe Weinpert wrote:

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?

Have a look at https://github.com/lar3ry/OpenSCAD---Move-STL-to-origin
This is a Python script that you run against an STL file. It will give
you the 3D bounding box, the X, Y, and Z opositions, and a set of
translations that you can copy and paste to position the STL at 6
different positions.

Example output:
// File: Spotlight.stl
// X size: 199.757
// Y size: 197.0
// Z size: 95.0
// X position: -326.797
// Y position: 187.443
// Z position: -0.05

Positions: NE, NW, SW, SE, Centre XY, Centre All

// NE
translate([ 326.797 , -187.443 , 0.05 ])
import ("Spotlight.stl");

// NW
translate([ 127.03999 , -187.443 , 0.05 ])
import ("Spotlight.stl");

// SW
translate([ 127.03999 , -384.443 , 0.05 ])
import ("Spotlight.stl");

// SE
translate([ 326.797 , -384.443 , 0.05 , ])
import ("Spotlight.stl");

// Center XY
translate([ 226.918 , -286.0 , 0.05 ])
import ("Spotlight.stl");

On Sat, 2022-02-12 at 13:17 -0500, Joe Weinpert wrote: > 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? Have a look at https://github.com/lar3ry/OpenSCAD---Move-STL-to-origin This is a Python script that you run against an STL file. It will give you the 3D bounding box, the X, Y, and Z opositions, and a set of translations that you can copy and paste to position the STL at 6 different positions. Example output: // File: Spotlight.stl // X size: 199.757 // Y size: 197.0 // Z size: 95.0 // X position: -326.797 // Y position: 187.443 // Z position: -0.05 Positions: NE, NW, SW, SE, Centre XY, Centre All // NE translate([ 326.797 , -187.443 , 0.05 ]) import ("Spotlight.stl"); // NW translate([ 127.03999 , -187.443 , 0.05 ]) import ("Spotlight.stl"); // SW translate([ 127.03999 , -384.443 , 0.05 ]) import ("Spotlight.stl"); // SE translate([ 326.797 , -384.443 , 0.05 , ]) import ("Spotlight.stl"); // Center XY translate([ 226.918 , -286.0 , 0.05 ]) import ("Spotlight.stl");