Find bounding box of arbitrary 3d graphics?
$begingroup$
What's the best workaround for this limitation:
RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[{Cone, Cuboid}]]]
graphics3d geometry
$endgroup$
add a comment |
$begingroup$
What's the best workaround for this limitation:
RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[{Cone, Cuboid}]]]
graphics3d geometry
$endgroup$
1
$begingroup$
Tz. Who downvotes this? @M.R. What aboutRegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?
$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
The very last item in theDiscretizeRegion
docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
$endgroup$
– Carl Lange
2 days ago
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
2 days ago
$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♦
2 days ago
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
2 days ago
add a comment |
$begingroup$
What's the best workaround for this limitation:
RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[{Cone, Cuboid}]]]
graphics3d geometry
$endgroup$
What's the best workaround for this limitation:
RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[{Cone, Cuboid}]]]
graphics3d geometry
graphics3d geometry
edited 2 days ago
Carl Lange
2,6261727
2,6261727
asked 2 days ago
M.R.M.R.
15.1k555183
15.1k555183
1
$begingroup$
Tz. Who downvotes this? @M.R. What aboutRegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?
$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
The very last item in theDiscretizeRegion
docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
$endgroup$
– Carl Lange
2 days ago
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
2 days ago
$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♦
2 days ago
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
2 days ago
add a comment |
1
$begingroup$
Tz. Who downvotes this? @M.R. What aboutRegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?
$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
The very last item in theDiscretizeRegion
docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
$endgroup$
– Carl Lange
2 days ago
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
2 days ago
$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♦
2 days ago
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
2 days ago
1
1
$begingroup$
Tz. Who downvotes this? @M.R. What about
RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
Tz. Who downvotes this? @M.R. What about
RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?$endgroup$
– Henrik Schumacher
2 days ago
$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
2 days ago
$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
2 days ago
1
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
2 days ago
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
2 days ago
$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♦
2 days ago
$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♦
2 days ago
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
2 days ago
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
2 days ago
add a comment |
3 Answers
3
active
oldest
votes
$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.}} *)
$endgroup$
add a comment |
$begingroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
{{-1., 1.}, {-1., 1.}, {-1., 1.}}
$endgroup$
add a comment |
$begingroup$
MinMax /@ Transpose[RegionBounds /@ {Cone, Cuboid}]
{{-1, 1}, {-1, 1}, {-1, 1}}
$endgroup$
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$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.}} *)
$endgroup$
add a comment |
$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.}} *)
$endgroup$
add a comment |
$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.}} *)
$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.}} *)
edited 2 days ago
answered 2 days ago
Michael E2Michael E2
146k12197468
146k12197468
add a comment |
add a comment |
$begingroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
{{-1., 1.}, {-1., 1.}, {-1., 1.}}
$endgroup$
add a comment |
$begingroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
{{-1., 1.}, {-1., 1.}, {-1., 1.}}
$endgroup$
add a comment |
$begingroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
{{-1., 1.}, {-1., 1.}, {-1., 1.}}
$endgroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
{{-1., 1.}, {-1., 1.}, {-1., 1.}}
answered 2 days ago
Henrik SchumacherHenrik Schumacher
50.4k469144
50.4k469144
add a comment |
add a comment |
$begingroup$
MinMax /@ Transpose[RegionBounds /@ {Cone, Cuboid}]
{{-1, 1}, {-1, 1}, {-1, 1}}
$endgroup$
add a comment |
$begingroup$
MinMax /@ Transpose[RegionBounds /@ {Cone, Cuboid}]
{{-1, 1}, {-1, 1}, {-1, 1}}
$endgroup$
add a comment |
$begingroup$
MinMax /@ Transpose[RegionBounds /@ {Cone, Cuboid}]
{{-1, 1}, {-1, 1}, {-1, 1}}
$endgroup$
MinMax /@ Transpose[RegionBounds /@ {Cone, Cuboid}]
{{-1, 1}, {-1, 1}, {-1, 1}}
answered 2 days ago
halmirhalmir
10.1k2443
10.1k2443
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
$begingroup$
Tz. Who downvotes this? @M.R. What about
RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?$endgroup$
– Henrik Schumacher
2 days ago
$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
2 days ago
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
2 days ago
$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♦
2 days ago
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
2 days ago