Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extrusions along x/z axes look flat #499

Open
sevaa opened this issue May 27, 2015 · 1 comment
Open

Extrusions along x/z axes look flat #499

sevaa opened this issue May 27, 2015 · 1 comment

Comments

@sevaa
Copy link
Contributor

sevaa commented May 27, 2015

X3D Extrusion elements where the spine is straight along the X or Z direction appear flat in X3DOM. In general, if the straight spine is not aligned with the Y axis, X3DOM distorts the cross-section.

See here: http://www.jishop.com/temp/x3d/ , click on Extrusions, notice how the topmost two ones look flat.

The spec says: "If the entire spine is collinear, the SCP is computed by finding the rotation of a vector along the positive Y-axis (v1) to the vector formed by the spine points (v2). The Y=0 plane is then rotated by this value."

Here's how I think it should be interpreted: find the rotation between the Y axis and the spine direction, and then apply that rotation to the vector (0, 0, 1) to get the Z axis for the cross-section plane (CSP). As a result, if the spine is along the X axis, the rotation is pi/2 clockwise around the Z axis, so the Z of CSP should be (0,0,1). If the spine is along the Z axis, the rotation is pi/2 counterclockwise around the X axis, and the Z of the CSP is (0, -1, 0).

@sevaa sevaa changed the title Extrusions along x/z aces look flat Extrusions along x/z axes look flat May 27, 2015
@splace
Copy link

splace commented Oct 8, 2018

confirmed as fault.

i think you can write a lot more clearly a part of the spec. as; "extrusion cross-sections, for straight splines, with no orientations, are at right-angle to the spline." a simple and useful situation.

the definition also tells you how to rotate the csp, which is with x will be up, +y.

however the spec. seems to neglect the situation of the spine going -y, where the rotation of the scp seems to be undefined.

this has been recorded here:- http://www.web3d.org/wiki/index.php/Extrusion_Edge_Cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants