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

When call IG.sweep two lines, the generated surface is invalid #26

Open
chatyan opened this issue Dec 5, 2020 · 0 comments
Open

When call IG.sweep two lines, the generated surface is invalid #26

chatyan opened this issue Dec 5, 2020 · 0 comments

Comments

@chatyan
Copy link

chatyan commented Dec 5, 2020

Dear @sghr San,
Your library is very good, it's like magic for creating 3D models using Java.

Currently, I am facing a problem (maybe it's my misunderstanding of the usage).
I tried to sweep two curves. Everything is OK.
But when I sweep two straight lines, which are generated by ICurveGeo sharing the same z-coordinate,
I got some error messages like the surface is invalid. I provide the following code, hope you can reproduce it.

`import processing.opengl.;
import igeo.
;

size(480, 360, IG.GL);
IVec[] cptsU = new IVec[5];
cptsU[0] = new IVec(0, 0, 50);
cptsU[1] = new IVec(60, 0, 50);
cptsU[2] = new IVec(120, 0, 50);
cptsU[3] = new IVec(180, 0, 50);
cptsU[4] = new IVec(240, 0, 50);
ICurveGeo m_curveU = new ICurveGeo(cptsU, 3, false);

IVec[] cptsV = new IVec[5];
cptsV[0] = new IVec(100, 0, 10);
cptsV[1] = new IVec(100, 50, 10);
cptsV[2] = new IVec(100, 100, 10);
cptsV[3] = new IVec(100, 150, 10);
cptsV[4] = new IVec(100, 200, 10);
ICurveGeo m_curveV = new ICurveGeo(cptsV, 3, false);

IG.sweep(m_curveU, m_curveV);
`
In addition, if I misunderstood IG.sweep, can you correct me, or guide me another way to achieve a surface by sweeping two straight lines?
Sincerely!

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

1 participant