Replies: 1 comment
-
I not sure I completely understand your question. Part of the issue is that the library does not know what its side is - and what its position is. You can use the bounding box to have a rough estimate of the position (and what is the longest side). But you can get some weird issues. If you have a more specific assumptions you want to bake into your code then it can be easier (for instance all the shapes are cylinders). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm hoping to take an array of 3D geometries, lay each piece flat on the XY plane and translate them to specific points on the plane. I'm using a three js helper and I never specifically declared a plane with replicad. What would be the methods to use in order to translate my geometry to a specific point (without specifying a distance) and to rotate their longest side inline with the XY plane?

For example, if i had:
const { sketchCircle, sketchRectangle, loft } = replicad
const main = () => {
return sketchCircle(10,10).clone().extrude(100).translate(50,15,0).rotate(30,(5,5))
};
How would I go about setting the cylinder on its side and returning it to (0,0) on the XY?
Beta Was this translation helpful? Give feedback.
All reactions