Find bounding box of arbitrary 3d graphics?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












7












$begingroup$


What's the best workaround for this limitation:



RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[Cone, Cuboid]]]


enter image description here










share|improve this question











$endgroup$







  • 1




    $begingroup$
    Tz. Who downvotes this? @M.R. What about RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]?
    $endgroup$
    – Henrik Schumacher
    Jan 14 at 15:50










  • $begingroup$
    The very last item in the DiscretizeRegion docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
    $endgroup$
    – Carl Lange
    Jan 14 at 15:56






  • 1




    $begingroup$
    @HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
    $endgroup$
    – Carl Lange
    Jan 14 at 15:57










  • $begingroup$
    @HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
    $endgroup$
    – Kuba
    Jan 14 at 15:58










  • $begingroup$
    Possible duplicate: mathematica.stackexchange.com/questions/18034/…
    $endgroup$
    – Michael E2
    Jan 14 at 16:33















7












$begingroup$


What's the best workaround for this limitation:



RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[Cone, Cuboid]]]


enter image description here










share|improve this question











$endgroup$







  • 1




    $begingroup$
    Tz. Who downvotes this? @M.R. What about RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]?
    $endgroup$
    – Henrik Schumacher
    Jan 14 at 15:50










  • $begingroup$
    The very last item in the DiscretizeRegion docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
    $endgroup$
    – Carl Lange
    Jan 14 at 15:56






  • 1




    $begingroup$
    @HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
    $endgroup$
    – Carl Lange
    Jan 14 at 15:57










  • $begingroup$
    @HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
    $endgroup$
    – Kuba
    Jan 14 at 15:58










  • $begingroup$
    Possible duplicate: mathematica.stackexchange.com/questions/18034/…
    $endgroup$
    – Michael E2
    Jan 14 at 16:33













7












7








7


2



$begingroup$


What's the best workaround for this limitation:



RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[Cone, Cuboid]]]


enter image description here










share|improve this question











$endgroup$




What's the best workaround for this limitation:



RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[Cone, Cuboid]]]


enter image description here







graphics3d geometry






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 14 at 16:16









Carl Lange

3,5951731




3,5951731










asked Jan 14 at 15:28









M.R.M.R.

15.2k555186




15.2k555186







  • 1




    $begingroup$
    Tz. Who downvotes this? @M.R. What about RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]?
    $endgroup$
    – Henrik Schumacher
    Jan 14 at 15:50










  • $begingroup$
    The very last item in the DiscretizeRegion docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
    $endgroup$
    – Carl Lange
    Jan 14 at 15:56






  • 1




    $begingroup$
    @HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
    $endgroup$
    – Carl Lange
    Jan 14 at 15:57










  • $begingroup$
    @HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
    $endgroup$
    – Kuba
    Jan 14 at 15:58










  • $begingroup$
    Possible duplicate: mathematica.stackexchange.com/questions/18034/…
    $endgroup$
    – Michael E2
    Jan 14 at 16:33












  • 1




    $begingroup$
    Tz. Who downvotes this? @M.R. What about RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]?
    $endgroup$
    – Henrik Schumacher
    Jan 14 at 15:50










  • $begingroup$
    The very last item in the DiscretizeRegion docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
    $endgroup$
    – Carl Lange
    Jan 14 at 15:56






  • 1




    $begingroup$
    @HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
    $endgroup$
    – Carl Lange
    Jan 14 at 15:57










  • $begingroup$
    @HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
    $endgroup$
    – Kuba
    Jan 14 at 15:58










  • $begingroup$
    Possible duplicate: mathematica.stackexchange.com/questions/18034/…
    $endgroup$
    – Michael E2
    Jan 14 at 16:33







1




1




$begingroup$
Tz. Who downvotes this? @M.R. What about RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]?
$endgroup$
– Henrik Schumacher
Jan 14 at 15:50




$begingroup$
Tz. Who downvotes this? @M.R. What about RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]?
$endgroup$
– Henrik Schumacher
Jan 14 at 15:50












$begingroup$
The very last item in the DiscretizeRegion docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
$endgroup$
– Carl Lange
Jan 14 at 15:56




$begingroup$
The very last item in the DiscretizeRegion docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
$endgroup$
– Carl Lange
Jan 14 at 15:56




1




1




$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
Jan 14 at 15:57




$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
Jan 14 at 15:57












$begingroup$
@HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
$endgroup$
– Kuba
Jan 14 at 15:58




$begingroup$
@HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
$endgroup$
– Kuba
Jan 14 at 15:58












$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
Jan 14 at 16:33




$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
Jan 14 at 16:33










3 Answers
3






active

oldest

votes


















6












$begingroup$

Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
(* -1., 1., -1., 1., -1., 1. *)


See How to get the real PlotRange using AbsoluteOptions?



If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange still works:



Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
(* -2., 1., -1., 1., -3., 1. *)





share|improve this answer











$endgroup$




















    7












    $begingroup$

    RegionBounds@RegionUnion[ 
    BoundaryDiscretizeRegion[Cone],
    BoundaryDiscretizeRegion[Cuboid]
    ]



    -1., 1., -1., 1., -1., 1.







    share|improve this answer









    $endgroup$




















      4












      $begingroup$

      MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]



      -1, 1, -1, 1, -1, 1







      share|improve this answer









      $endgroup$












        Your Answer





        StackExchange.ifUsing("editor", function ()
        return StackExchange.using("mathjaxEditing", function ()
        StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
        StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
        );
        );
        , "mathjax-editing");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "387"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f189470%2ffind-bounding-box-of-arbitrary-3d-graphics%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        6












        $begingroup$

        Charting`get3DPlotRange[
        Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
        (* -1., 1., -1., 1., -1., 1. *)


        See How to get the real PlotRange using AbsoluteOptions?



        If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange still works:



        Charting`get3DPlotRange[
        Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
        Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
        (* -2., 1., -1., 1., -3., 1. *)





        share|improve this answer











        $endgroup$

















          6












          $begingroup$

          Charting`get3DPlotRange[
          Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
          (* -1., 1., -1., 1., -1., 1. *)


          See How to get the real PlotRange using AbsoluteOptions?



          If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange still works:



          Charting`get3DPlotRange[
          Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
          Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
          (* -2., 1., -1., 1., -3., 1. *)





          share|improve this answer











          $endgroup$















            6












            6








            6





            $begingroup$

            Charting`get3DPlotRange[
            Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
            (* -1., 1., -1., 1., -1., 1. *)


            See How to get the real PlotRange using AbsoluteOptions?



            If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange still works:



            Charting`get3DPlotRange[
            Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
            Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
            (* -2., 1., -1., 1., -3., 1. *)





            share|improve this answer











            $endgroup$



            Charting`get3DPlotRange[
            Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
            (* -1., 1., -1., 1., -1., 1. *)


            See How to get the real PlotRange using AbsoluteOptions?



            If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange still works:



            Charting`get3DPlotRange[
            Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
            Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
            (* -2., 1., -1., 1., -3., 1. *)






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 14 at 16:44

























            answered Jan 14 at 16:32









            Michael E2Michael E2

            146k12197469




            146k12197469





















                7












                $begingroup$

                RegionBounds@RegionUnion[ 
                BoundaryDiscretizeRegion[Cone],
                BoundaryDiscretizeRegion[Cuboid]
                ]



                -1., 1., -1., 1., -1., 1.







                share|improve this answer









                $endgroup$

















                  7












                  $begingroup$

                  RegionBounds@RegionUnion[ 
                  BoundaryDiscretizeRegion[Cone],
                  BoundaryDiscretizeRegion[Cuboid]
                  ]



                  -1., 1., -1., 1., -1., 1.







                  share|improve this answer









                  $endgroup$















                    7












                    7








                    7





                    $begingroup$

                    RegionBounds@RegionUnion[ 
                    BoundaryDiscretizeRegion[Cone],
                    BoundaryDiscretizeRegion[Cuboid]
                    ]



                    -1., 1., -1., 1., -1., 1.







                    share|improve this answer









                    $endgroup$



                    RegionBounds@RegionUnion[ 
                    BoundaryDiscretizeRegion[Cone],
                    BoundaryDiscretizeRegion[Cuboid]
                    ]



                    -1., 1., -1., 1., -1., 1.








                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 14 at 15:56









                    Henrik SchumacherHenrik Schumacher

                    51.6k469146




                    51.6k469146





















                        4












                        $begingroup$

                        MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]



                        -1, 1, -1, 1, -1, 1







                        share|improve this answer









                        $endgroup$

















                          4












                          $begingroup$

                          MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]



                          -1, 1, -1, 1, -1, 1







                          share|improve this answer









                          $endgroup$















                            4












                            4








                            4





                            $begingroup$

                            MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]



                            -1, 1, -1, 1, -1, 1







                            share|improve this answer









                            $endgroup$



                            MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]



                            -1, 1, -1, 1, -1, 1








                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jan 14 at 16:29









                            halmirhalmir

                            10.2k2443




                            10.2k2443



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Mathematica Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                Use MathJax to format equations. MathJax reference.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f189470%2ffind-bounding-box-of-arbitrary-3d-graphics%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown






                                Popular posts from this blog

                                How to check contact read email or not when send email to Individual?

                                Bahrain

                                Postfix configuration issue with fips on centos 7; mailgun relay