Im trying to extrude a shape along a curve which happens to be a straight line in this case
Below is Case 1 where the extrusion of the wall cornice is as desired
Below is Case 2 where the orientation isn’t as desired even though the curve is a straight line as well
Is there a way to gain control on the orientation of the shape?
I assume the resulting geometry is used in context of a mesh, right? If so, why don’t you just change the rotation of the 3D object?
In any event, you can also apply a rotation directly to the geometry. This can be done by applying a rotation matrix to the geometry via BufferGeometry.applyMatrix() or by using one of the rotate methods like BufferGeometry.rotateX().
I’m already aware that i can rotate the geometry after extruding, but the issue is that it is unpredictable how the extrusion’s result would be and I cannot predict whether I should be rotating the geometry or not, because sometimes the extrusion is as desired and needs no further modification.
Is there at least a hack in which i can predict the shape twist based on the curve im giving. The curve I’m using is a simple 2 point catmull rom curve which is nothing but a 3d straight line segment
Do you ming illustrating this circumstance in a simple live example? It might be easier to provide feedback if you could actually demonstrate such a curve and the resulting extruded geometry.
The outcome of ExtrudeGeometry
really depends on the curve which is a user-provided value. Without seeing it, it’s hard to say something more concrete.
https://jsfiddle.net/b9gq0jtk/9/
I reproduced the objects in the scene, use the orbit controls to have a view of the cross sectional faces of the extrusions, one has the shape going downwards and one has it upwards. both of the extrusions have been made by 2 point ccatmullrom curves
both the extrusions are made by using the exact same THREE.Shape but one of the extrusion has the shape inverted
if there was a way to control the normals or binormals i would have a way to make the cross section pattern point inwards to the room like a wall cornice of a room
Sorry, I really don’t understand what you are doing in your code. What exactly should your two extrusions demonstrate?
Hi!
Maybe this topic will give you some ideas: ProfiledContourGeometry
1 Like
I’m trying to construct wall cornices inside a room using a shape profile. I know the start and end points of the top of each wall. When i extrude the cornice for wall 1 by giving the profile shape and a curve3 comprising of the start and end points of the wall, it works fine, but when i do the same for wall 2 the shape profile is flipped. It can be seen in the visuals in the first message of this thread
This might help, I’ll try it