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

"alternate construction" for convex faces in polyhedron missing #2246

Closed
Parkinbot opened this issue Jan 2, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@Parkinbot
Copy link

commented Jan 2, 2018

In older dev builds (like 2017.01) I get the following output, whenever a polyhedron is F6-rendered that contains a previously rotated convex polygon as face:

Rendering Polygon Mesh using CGAL...
PolySet has nonplanar faces. Attempting alternate construction

In OpenSCAD 2017.11 I get a CGAL error instead:

Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: ss_circle.has_on(sp) File: /opt/mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h Line: 263 

here some test code that builds a pyramid over a rotated N-gon star:

N = 6;  // gets convex if N>5
angle = 10; 

npyramid = Rx_(10, concat([[0,0,10]], star(N=N))); 

fac_top = [for(i=[0:N-1]) [0, i+1, (i+1)%N+1]]; 
fac_bot = [[for(i=[N:-1:1]) i]];
faces = concat(fac_top, fac_bot); 

polyhedron(npyramid, faces); 
cube(1); 

function star(r=10, N=6) = [for(i=[0:N-1]) 
  let(a = 360/N*i) (i%2?r:r/3)*[sin(a), cos(a), 0]]; 
  
function Rx_(w, A) = A*[[1, 0, 0], [0, cos(w), sin(w)], [0, -sin(w), cos(w)]]; 
@kintel

This comment has been minimized.

Copy link
Member

commented Jan 2, 2018

Duplicate of #2139 - fixed Dec 2nd

@kintel kintel closed this Jan 2, 2018

@Parkinbot

This comment has been minimized.

Copy link
Author

commented Jan 5, 2018

Just downloaded 2018.01.02 and found out, my code still doesn't execute. This issue does not seem to be fixed. Are you sure, you tested my sample code with the new version, before closing this issue?

@thehans

This comment has been minimized.

Copy link
Member

commented Jan 5, 2018

@Parkinbot Works for me on Linux Mint 18.3 with nightly build. What OS are you on?

@Parkinbot

This comment has been minimized.

Copy link
Author

commented Jan 5, 2018

I'm using Windows 8.1 and installed the 64 bit zip version

@thehans

This comment has been minimized.

Copy link
Member

commented Jan 5, 2018

OK, I can confirm the bug on F6 rendering on my Windows 7 machine using the 2018.01.02 build.

edit: I also just realized/remembered the nightly linux is still linked with CGAL 4.7 and this is an issue for CGAL >= 4.10 so of course it would work for me on the nightly build. The windows build in question uses CGAL 4.10

@thehans thehans reopened this Jan 5, 2018

@kintel

This comment has been minimized.

Copy link
Member

commented Jan 5, 2018

Sorry, I didn't test the snippet - made some assumptions based on the error message.

@kintel kintel added the Dep: CGAL label Jan 5, 2018

kintel added a commit that referenced this issue Jan 6, 2018

kintel added a commit that referenced this issue Jan 6, 2018

@kintel kintel closed this in 3473eb1 Jan 6, 2018

@Parkinbot

This comment has been minimized.

Copy link
Author

commented Jan 8, 2018

Thanks. I can confirm the fix for my general sweep() code as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.