discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: mistake

PR
Peter Ragosch
Thu, Oct 28, 2021 9:14 AM

Am Thu, 28 Oct 2021 09:55:48 +0200
schrieb Andr__ Lefranc via Discuss discuss@lists.openscad.org:

/hello, I don't understand where is the mystake ./

/on my computer this file make an white circle ...
the mystake is in module "affichage"/

/My apologise for my porr english language./

/for your information it's a design for ETX 125 telescope./

DiamOTA =127;
visserie ="Y";//[Y: Pr__sentation visserie fixation, N: pas d'affic
hage]
VueGenerale ="Y";//[Y: Pr__sentation g__n__rale , N: pas d'
affichage]
reparation ="Y"; //[Y: Pr__sentation r__paration , N: pas d'aff
ichage]
// __cartement
dec=1;//[1:5:30]
module tube ()
{
____ ________ color ("Purple")
translate ([0,DiamOTA/2,0])
cylinder (r=DiamOTA/2, h=DiamOTA2,$fn=60);
// couvercle aliminium du tube
____ __color ("Azure")
translate ([0,DiamOTA/2,1+DiamOTA
2])
cylinder (r=DiamOTA/2, h=3,$fn=60);
}




___ ______ ______ //end of tube ();
module coqueBras ()
{
____ __color ("LightBlue")
____ __minkowski ()
____ ________ {
____ ________ $fn=120;
____ ________ union ()


_ ______ ______ ______ {
____ ________ translate ([0,8,75______
______ ])
____ ________ cube ([50-10,30,70], center=true
);
____ ________ translate ([0,8,105_____
_ ______ ])
____ ________ rotate ([90,0,0])
____ __cylinder (r=DiamOTA/5, h=50,$fn=120,center=tr
ue);


_ ______ ______ ______ }
____ ________ sphere (5);
____ ________ }
}

//ContreCoqueBras ();
module__ ContreCoqueBras ()
{
color ("SkyBlue")
____ ________ ______ union ()
____ ________ {
____ ________ translate ([0,8,75______
______ ])
____ ________ cube ([50-4,30,75], center=true)
;
____ ________ translate ([0,-1,105_____
_ ______ ])
____ ________ rotate ([90,0,0])
____ __cylinder (r=(DiamOTA/5)+3, h=35,$fn=120,center=
true);
____ ________ }
}

module affichage ()
{difference ()
____ ________ ______ {
____ __coqueBras ();
____ __union ()
____ ________ ______ {
____ __ContreCoqueBras ();
____ __alesage () ;
____ __tube();
____ ________ ______ }


_ }
difference () {
color ("red")
____ ________ ContreAlesage ();
____ ________ alesage () ;


_ ______ }
if (VueGenerale =="Y")
____ __{
translate ([0,DiamOTA,0])
rotate ([0,0,180])
mirror ([1,0,0])
____ ________ {
____ __difference ()



__ {
____ __coqueBras ();
____ __union ()


_ ______ ______ {
____ ________ ContreCoqueBras ();
____ __alesage () ;
____ __tube();


_ ______ ______ }



__ }
____ __difference ()


_ ______ {
____ ________ ______ color ("red")
____ ________ ______ ContreAlesage (
);
____ ________ ______ alesage () ;


_ ______ }
____ ________ }
____ ________ tube ();
____ __}
}
affichage () ;

Hello André Lefranc,

I'm not an expert, but run your scad file on OpenSCAD version
2021.10.13, linux Manjaro.

  1. I corrected the line breaks inserted by email. Not nice but known.
    And I replaced all TABs which were replaced by wrong characters.

  2. two modules are missing:

WARNING: Ignoring unknown module 'ContreAlesage' in file , lines <some>
WARNING: Ignoring unknown module 'alesage' in file , line <some>

They can't be simply commented out because then two difference() statements becomes empty.

  1. I got the attached preview (F5). [If attachments are allowed :) ]
    There are some transparent areas shown, dependent on the view. So here
    are more investigations to do.

  2. even with the missing modules the design could be rendered:

Parsing design (AST generation)...
Saved backup file: /home/peter/snap/openscad-nightly/2875/.local/share/OpenSCAD/backups/unsaved-backup-MGiltEaq.scad
Compiling design (CSG Tree generation)...
WARNING: Ignoring unknown module 'ContreAlesage' in file , line 73
WARNING: Ignoring unknown module 'alesage' in file , line 74
WARNING: Ignoring unknown module 'alesage' in file , line 94
Rendering Polygon Mesh using CGAL...
Geometries in cache: 20
Geometry cache size in bytes: 7614728
CGAL Polyhedrons in cache: 4
CGAL cache size in bytes: 104423488
Total rendering time: 0:00:00.095
Top level object is a 3D object:
Simple:        no
Vertices:    23670
Halfedges:  120604
Edges:      60302
Halffacets:  73276
Facets:      36638
Volumes:        5
WARNING: Object may not be a valid 2-manifold and may need repair! <<<<<
Rendering finished.

The warning may be grounded on the small distance between tube and
circle plate on top (the front glass of the telescope?) or because one
or more mesh faces are designed in the wrong direction (out-side-in).
More investigations on this item makes only sense with all modules at
hand.

The union() are mostly not necessary because an implicit union is
implemented in openSCAD.

I hope this message will push you in the right direction.
Peter

Am Thu, 28 Oct 2021 09:55:48 +0200 schrieb Andr__ Lefranc via Discuss <discuss@lists.openscad.org>: > /hello, I don't understand where is the mystake ./ > > /on my computer this file make an white circle ... > the mystake is in module "*affichage*"/ > > /My apologise for my porr english language./ > > /for your information it's a design for ETX 125 telescope./ > > DiamOTA =127; > visserie ="Y";//[Y: Pr__sentation visserie fixation, N: pas d'affic > hage] > VueGenerale ="Y";//[Y: Pr__sentation g__n__rale , N: pas d' > affichage] > reparation ="Y"; //[Y: Pr__sentation r__paration , N: pas d'aff > ichage] > // __cartement > dec=1;//[1:5:30] > module tube () > { > ____ ________ color ("Purple") > translate ([0,DiamOTA/2,0]) > cylinder (r=DiamOTA/2, h=DiamOTA*2,$fn=60); > // couvercle aliminium du tube > ____ __color ("Azure") > translate ([0,DiamOTA/2,1+DiamOTA*2]) > cylinder (r=DiamOTA/2, h=3,$fn=60); > } > ____ ________ ______ _____ > _ ______ ______ ______ ____ > __ ______ ______ ______ ___ > ___ ______ ______ //end of tube (); > __module__ coqueBras () > { > ____ __color ("LightBlue") > ____ __minkowski () > ____ ________ { > ____ ________ $fn=120; > ____ ________ union () > ____ ________ ______ _____ > _ ______ ______ ______ { > ____ ________ translate ([0,8,75______ > ______ ]) > ____ ________ cube ([50-10,30,70], center=true > ); > ____ ________ translate ([0,8,105_____ > _ ______ ]) > ____ ________ rotate ([90,0,0]) > ____ __cylinder (r=DiamOTA/5, h=50,$fn=120,center=tr > ue); > ____ ________ ______ _____ > _ ______ ______ ______ } > ____ ________ sphere (5); > ____ ________ } > } > > //ContreCoqueBras (); > module__ ContreCoqueBras () > { > color ("SkyBlue") > ____ ________ ______ union () > ____ ________ { > ____ ________ translate ([0,8,75______ > ______ ]) > ____ ________ cube ([50-4,30,75], center=true) > ; > ____ ________ translate ([0,-1,105_____ > _ ______ ]) > ____ ________ rotate ([90,0,0]) > ____ __cylinder (r=(DiamOTA/5)+3, h=35,$fn=120,center= > true); > ____ ________ } > } > > > module affichage () > {difference () > ____ ________ ______ { > ____ __coqueBras (); > ____ __union () > ____ ________ ______ { > ____ __ContreCoqueBras (); > ____ __alesage () ; > ____ __tube(); > ____ ________ ______ } > > ____ ________ ______ _____ > _ } > difference () { > color ("red") > ____ ________ ContreAlesage (); > ____ ________ alesage () ; > > ____ ________ ______ _____ > _ ______ } > if (VueGenerale =="Y") > ____ __{ > translate ([0,DiamOTA,0]) > rotate ([0,0,180]) > mirror ([1,0,0]) > ____ ________ { > ____ __difference () > ____ ________ ______ _____ > _ ______ ______ ______ ____ > __ { > ____ __coqueBras (); > ____ __union () > ____ ________ ______ _____ > _ ______ ______ { > ____ ________ ContreCoqueBras (); > ____ __alesage () ; > ____ __tube(); > ____ ________ ______ _____ > _ ______ ______ } > ____ ________ ______ _____ > _ ______ ______ ______ ____ > __ } > ____ __difference () > ____ ________ ______ _____ > _ ______ { > ____ ________ ______ color ("red") > ____ ________ ______ ContreAlesage ( > ); > ____ ________ ______ alesage () ; > ____ ________ ______ _____ > _ ______ } > ____ ________ } > ____ ________ tube (); > ____ __} > } > affichage () ; Hello André Lefranc, I'm not an expert, but run your scad file on OpenSCAD version 2021.10.13, linux Manjaro. 1. I corrected the line breaks inserted by email. Not nice but known. And I replaced all TABs which were replaced by wrong characters. 2. two modules are missing: WARNING: Ignoring unknown module 'ContreAlesage' in file , lines <some> WARNING: Ignoring unknown module 'alesage' in file , line <some> They can't be simply commented out because then two difference() statements becomes empty. 3. I got the attached preview (F5). [If attachments are allowed :) ] There are some transparent areas shown, dependent on the view. So here are more investigations to do. 4. even with the missing modules the design could be rendered: Parsing design (AST generation)... Saved backup file: /home/peter/snap/openscad-nightly/2875/.local/share/OpenSCAD/backups/unsaved-backup-MGiltEaq.scad Compiling design (CSG Tree generation)... WARNING: Ignoring unknown module 'ContreAlesage' in file , line 73 WARNING: Ignoring unknown module 'alesage' in file , line 74 WARNING: Ignoring unknown module 'alesage' in file , line 94 Rendering Polygon Mesh using CGAL... Geometries in cache: 20 Geometry cache size in bytes: 7614728 CGAL Polyhedrons in cache: 4 CGAL cache size in bytes: 104423488 Total rendering time: 0:00:00.095 Top level object is a 3D object: Simple: no Vertices: 23670 Halfedges: 120604 Edges: 60302 Halffacets: 73276 Facets: 36638 Volumes: 5 WARNING: Object may not be a valid 2-manifold and may need repair! <<<<< Rendering finished. The warning may be grounded on the small distance between tube and circle plate on top (the front glass of the telescope?) or because one or more mesh faces are designed in the wrong direction (out-side-in). More investigations on this item makes only sense with all modules at hand. The union() are mostly not necessary because an implicit union is implemented in openSCAD. I hope this message will push you in the right direction. Peter