discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Best practices for OpenSCAD + Blender

NH
nop head
Sat, Oct 15, 2022 4:18 PM

NopSCADlib doesn't interface with Blender. Mendel90, which was my first big
OpenSCAD project did, but it didn't pass much information. It just rendered
all the STLS with the same Blender script that drew it in orange.

[image: image.png]

This is the Python script that called Blender:
https://github.com/nophead/Mendel90/blob/master/render.py

These are the Blender scripts that did the rendering
https://github.com/nophead/Mendel90/tree/master/utils. They were
contributed by somebody else as I don't know much about Blender.

The user guide for NopSCADlib is here:
https://github.com/nophead/NopSCADlib/blob/master/docs/usage.md, It renders
STLs using OpenSCAD with this script
https://github.com/nophead/NopSCADlib/blob/master/scripts/render.py

This is what the JSON that describes the STLS looks like:
https://github.com/nophead/NopSCADlib/blob/master/examples/EnviroPlus/bom/bom.json#L115.
It can easily be extended to include more information.

This is the module that adds STLs to the BOM using ECHO:
https://github.com/nophead/NopSCADlib/blob/master/utils/core/bom.scad#L139.
Adding more parameters in the echo should automatically add them to the
JSON.

On Sat, 15 Oct 2022 at 16:01, neri-engineering via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Sat, 15 Oct 2022 14:14:27 +0000
Subject: [OpenSCAD] Re: Best practices for OpenSCAD + Blender
I would like to look into NopSCADlib.  Do you have a suggested starting
point, which explains in tutorial fashion with examples that I can tinker
with?  Which shows how it can be used to interface between OpenSCAD and
Blender?  I'm looking at various search results now.

Sent with Proton Mail https://proton.me/ secure email.

------- Original Message -------
On Saturday, October 15th, 2022 at 3:47 AM, nop head nop.head@gmail.com
wrote:

I attach information to my STLs in NopSCADlib, which includes a Python
framework. Currently it is just the colour to render them but I might add
material and print profiles and could easily add texture names if I wanted.
I used to render my STLs in Blender for Mendel90 but moved it back to
OpenSCAD when OpenSCAD gained the ability to export PNGs from the command
line. The Blender renders did look nicer but it means clients of the
library would need to install Blender and presumably Blender changes
incompatibly over time.

The way information is attached is I have a module called by each module
that makes an STL that specifies its name and another one that specifies
its colour when it is placed in an assembly. The information is output by
echo statements and then converted to JSON which is processed by Python
scripts to make a build manual with pictures of an the STLs and exploded
assembly diagrams.

You could do something similar to make Blender scripts with texture, etc.

On Sat, 15 Oct 2022 at 03:54, Jordan Brown openscad@jordan.maileater.net
wrote:

If you really want to work with Blender, sure.

If you just want something that can be used to light and paint your 3D
models and produce images of them, POV-Ray might help.


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

---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 14:14:27 +0000
Subject: [OpenSCAD] Re: Best practices for OpenSCAD + Blender


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

NopSCADlib doesn't interface with Blender. Mendel90, which was my first big OpenSCAD project did, but it didn't pass much information. It just rendered all the STLS with the same Blender script that drew it in orange. [image: image.png] This is the Python script that called Blender: https://github.com/nophead/Mendel90/blob/master/render.py These are the Blender scripts that did the rendering https://github.com/nophead/Mendel90/tree/master/utils. They were contributed by somebody else as I don't know much about Blender. The user guide for NopSCADlib is here: https://github.com/nophead/NopSCADlib/blob/master/docs/usage.md, It renders STLs using OpenSCAD with this script https://github.com/nophead/NopSCADlib/blob/master/scripts/render.py This is what the JSON that describes the STLS looks like: https://github.com/nophead/NopSCADlib/blob/master/examples/EnviroPlus/bom/bom.json#L115. It can easily be extended to include more information. This is the module that adds STLs to the BOM using ECHO: https://github.com/nophead/NopSCADlib/blob/master/utils/core/bom.scad#L139. Adding more parameters in the echo should automatically add them to the JSON. On Sat, 15 Oct 2022 at 16:01, neri-engineering via Discuss < discuss@lists.openscad.org> wrote: > > > > ---------- Forwarded message ---------- > From: neri-engineering <neri-engineering@protonmail.com> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: > Bcc: > Date: Sat, 15 Oct 2022 14:14:27 +0000 > Subject: [OpenSCAD] Re: Best practices for OpenSCAD + Blender > I would like to look into NopSCADlib. Do you have a suggested starting > point, which explains in tutorial fashion with examples that I can tinker > with? Which shows how it can be used to interface between OpenSCAD and > Blender? I'm looking at various search results now. > > Sent with Proton Mail <https://proton.me/> secure email. > > ------- Original Message ------- > On Saturday, October 15th, 2022 at 3:47 AM, nop head <nop.head@gmail.com> > wrote: > > I attach information to my STLs in NopSCADlib, which includes a Python > framework. Currently it is just the colour to render them but I might add > material and print profiles and could easily add texture names if I wanted. > I used to render my STLs in Blender for Mendel90 but moved it back to > OpenSCAD when OpenSCAD gained the ability to export PNGs from the command > line. The Blender renders did look nicer but it means clients of the > library would need to install Blender and presumably Blender changes > incompatibly over time. > > The way information is attached is I have a module called by each module > that makes an STL that specifies its name and another one that specifies > its colour when it is placed in an assembly. The information is output by > echo statements and then converted to JSON which is processed by Python > scripts to make a build manual with pictures of an the STLs and exploded > assembly diagrams. > > You could do something similar to make Blender scripts with texture, etc. > > On Sat, 15 Oct 2022 at 03:54, Jordan Brown <openscad@jordan.maileater.net> > wrote: > >> If you really want to work with Blender, sure. >> >> If you just want *something* that can be used to light and paint your 3D >> models and produce images of them, POV-Ray might help. >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > > > > > ---------- Forwarded message ---------- > From: neri-engineering via Discuss <discuss@lists.openscad.org> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: neri-engineering <neri-engineering@protonmail.com> > Bcc: > Date: Sat, 15 Oct 2022 14:14:27 +0000 > Subject: [OpenSCAD] Re: Best practices for OpenSCAD + Blender > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
N
neri-engineering
Sat, Oct 15, 2022 4:33 PM

That's a good start. I think it's what I needed, which is tips on how to start using Blender programmatically, not by point and click. I can probably figure the rest out.

Sent with Proton Mail secure email.

------- Original Message -------
On Saturday, October 15th, 2022 at 11:18 AM, nop head nop.head@gmail.com wrote:

NopSCADlib doesn't interface with Blender. Mendel90, which was my first big OpenSCAD project did, but it didn't pass much information. It just rendered all the STLS with the same Blender script that drew it in orange.

[image.png]

This is the Python script that called Blender: https://github.com/nophead/Mendel90/blob/master/render.py

These are the Blender scripts that did the rendering https://github.com/nophead/Mendel90/tree/master/utils. They were contributed by somebody else as I don't know much about Blender.

The user guide for NopSCADlib is here: https://github.com/nophead/NopSCADlib/blob/master/docs/usage.md, It renders STLs using OpenSCAD with this script https://github.com/nophead/NopSCADlib/blob/master/scripts/render.py

This is what the JSON that describes the STLS looks like: https://github.com/nophead/NopSCADlib/blob/master/examples/EnviroPlus/bom/bom.json#L115. It can easily be extended to include more information.

This is the module that adds STLs to the BOM using ECHO: https://github.com/nophead/NopSCADlib/blob/master/utils/core/bom.scad#L139. Adding more parameters in the echo should automatically add them to the JSON.

On Sat, 15 Oct 2022 at 16:01, neri-engineering via Discuss discuss@lists.openscad.org wrote:

---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Sat, 15 Oct 2022 14:14:27 +0000
Subject: [OpenSCAD] Re: Best practices for OpenSCAD + Blender

I would like to look into NopSCADlib. Do you have a suggested starting point, which explains in tutorial fashion with examples that I can tinker with? Which shows how it can be used to interface between OpenSCAD and Blender? I'm looking at various search results now.

Sent with Proton Mail secure email.

------- Original Message -------
On Saturday, October 15th, 2022 at 3:47 AM, nop head nop.head@gmail.com wrote:

I attach information to my STLs in NopSCADlib, which includes a Python framework. Currently it is just the colour to render them but I might add material and print profiles and could easily add texture names if I wanted. I used to render my STLs in Blender for Mendel90 but moved it back to OpenSCAD when OpenSCAD gained the ability to export PNGs from the command line. The Blender renders did look nicer but it means clients of the library would need to install Blender and presumably Blender changes incompatibly over time.

The way information is attached is I have a module called by each module that makes an STL that specifies its name and another one that specifies its colour when it is placed in an assembly. The information is output by echo statements and then converted to JSON which is processed by Python scripts to make a build manual with pictures of an the STLs and exploded assembly diagrams.

You could do something similar to make Blender scripts with texture, etc.

On Sat, 15 Oct 2022 at 03:54, Jordan Brown openscad@jordan.maileater.net wrote:

If you really want to work with Blender, sure.

If you just want something that can be used to light and paint your 3D models and produce images of them, POV-Ray might help.


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

---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 14:14:27 +0000
Subject: [OpenSCAD] Re: Best practices for OpenSCAD + Blender


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

That's a good start. I think it's what I needed, which is tips on how to start using Blender programmatically, not by point and click. I can probably figure the rest out. Sent with [Proton Mail](https://proton.me/) secure email. ------- Original Message ------- On Saturday, October 15th, 2022 at 11:18 AM, nop head <nop.head@gmail.com> wrote: > NopSCADlib doesn't interface with Blender. Mendel90, which was my first big OpenSCAD project did, but it didn't pass much information. It just rendered all the STLS with the same Blender script that drew it in orange. > > [image.png] > > This is the Python script that called Blender: https://github.com/nophead/Mendel90/blob/master/render.py > > These are the Blender scripts that did the rendering https://github.com/nophead/Mendel90/tree/master/utils. They were contributed by somebody else as I don't know much about Blender. > > The user guide for NopSCADlib is here: https://github.com/nophead/NopSCADlib/blob/master/docs/usage.md, It renders STLs using OpenSCAD with this script https://github.com/nophead/NopSCADlib/blob/master/scripts/render.py > > This is what the JSON that describes the STLS looks like: https://github.com/nophead/NopSCADlib/blob/master/examples/EnviroPlus/bom/bom.json#L115. It can easily be extended to include more information. > > This is the module that adds STLs to the BOM using ECHO: https://github.com/nophead/NopSCADlib/blob/master/utils/core/bom.scad#L139. Adding more parameters in the echo should automatically add them to the JSON. > > On Sat, 15 Oct 2022 at 16:01, neri-engineering via Discuss <discuss@lists.openscad.org> wrote: > >> ---------- Forwarded message ---------- >> From: neri-engineering <neri-engineering@protonmail.com> >> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> >> Cc: >> Bcc: >> Date: Sat, 15 Oct 2022 14:14:27 +0000 >> Subject: [OpenSCAD] Re: Best practices for OpenSCAD + Blender >> >> I would like to look into NopSCADlib. Do you have a suggested starting point, which explains in tutorial fashion with examples that I can tinker with? Which shows how it can be used to interface between OpenSCAD and Blender? I'm looking at various search results now. >> >> Sent with [Proton Mail](https://proton.me/) secure email. >> >> ------- Original Message ------- >> On Saturday, October 15th, 2022 at 3:47 AM, nop head <nop.head@gmail.com> wrote: >> >>> I attach information to my STLs in NopSCADlib, which includes a Python framework. Currently it is just the colour to render them but I might add material and print profiles and could easily add texture names if I wanted. I used to render my STLs in Blender for Mendel90 but moved it back to OpenSCAD when OpenSCAD gained the ability to export PNGs from the command line. The Blender renders did look nicer but it means clients of the library would need to install Blender and presumably Blender changes incompatibly over time. >>> >>> The way information is attached is I have a module called by each module that makes an STL that specifies its name and another one that specifies its colour when it is placed in an assembly. The information is output by echo statements and then converted to JSON which is processed by Python scripts to make a build manual with pictures of an the STLs and exploded assembly diagrams. >>> >>> You could do something similar to make Blender scripts with texture, etc. >>> >>> On Sat, 15 Oct 2022 at 03:54, Jordan Brown <openscad@jordan.maileater.net> wrote: >>> >>>> If you really want to work with Blender, sure. >>>> >>>> If you just want *something* that can be used to light and paint your 3D models and produce images of them, POV-Ray might help. >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >> ---------- Forwarded message ---------- >> From: neri-engineering via Discuss <discuss@lists.openscad.org> >> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> >> Cc: neri-engineering <neri-engineering@protonmail.com> >> Bcc: >> Date: Sat, 15 Oct 2022 14:14:27 +0000 >> Subject: [OpenSCAD] Re: Best practices for OpenSCAD + Blender >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org