You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We generate assembly documentation from OpenSCAD. Each component is rendered in OpenSCAD, and then we have OpenSCAD assemblies.
If we want to make a coloured 3D model to share we have a script that can read OpenSCAD CSG files. The script runs openscad on each colour group. The resulting STL is created read into python and converted to a GTLF mesh. This allows us to share colour 3D models generated in OpenSCAD.
The next stage of this would be to allow the user to toggle the visibility components/ sub assemblies in an online 3D viewer. For this we would need to have the information of which code corresponds to which components passed through to the CSG file.
Some sort of named group system would allow the main OpenSCAD editor to also display a tree view and to allow a user to toggle visibility of elements without needing to add * and ! into their code.
Describe the solution you'd like
CSG already uses groups. It is possible to add these groups directly into OpenSCAD code. If group had an optional argument for a name that was passed through to the CSG file this would allow further processing in separate tools. It could also be used by the OpenSCAD editor to create a tree view.
For example, the following would be possible:
group("Top assembly"){
group("Lid"){
/*Lots of code*/
}
group("Hinge"){
/*Lots of code*/
}
group("Screws"){
/*Lots of code*/
}
}
group("Bottom assembly"){
group("Case"){
/*Lots of code*/
}
group("Gubbins"){
/*Lots of code*/
}
group("Fixings"){
/*Lots of code*/
}
}
I feel this would unlock a number of further features to make it easier to design assemblies and complex components in OpenSCAD
Describe alternatives you've considered
I did try to echo at the start and end of each component as a hacky solution, but echos are not passed to the CSG.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We generate assembly documentation from OpenSCAD. Each component is rendered in OpenSCAD, and then we have OpenSCAD assemblies.
If we want to make a coloured 3D model to share we have a script that can read OpenSCAD CSG files. The script runs openscad on each colour group. The resulting STL is created read into python and converted to a GTLF mesh. This allows us to share colour 3D models generated in OpenSCAD.
The next stage of this would be to allow the user to toggle the visibility components/ sub assemblies in an online 3D viewer. For this we would need to have the information of which code corresponds to which components passed through to the CSG file.
Some sort of named group system would allow the main OpenSCAD editor to also display a tree view and to allow a user to toggle visibility of elements without needing to add
*
and!
into their code.Describe the solution you'd like
CSG already uses groups. It is possible to add these groups directly into OpenSCAD code. If
group
had an optional argument for a name that was passed through to the CSG file this would allow further processing in separate tools. It could also be used by the OpenSCAD editor to create a tree view.For example, the following would be possible:
I feel this would unlock a number of further features to make it easier to design assemblies and complex components in OpenSCAD
Describe alternatives you've considered
I did try to echo at the start and end of each component as a hacky solution, but echos are not passed to the CSG.
The text was updated successfully, but these errors were encountered: