KitWallace / Polyhedra

XQuery and OpenSCAD code for polyhedra creation
9 stars 1 forks source link

Difference and intersection #60

Open Montibus opened 1 year ago

Montibus commented 1 year ago

In a foolish attempt to create a mash table tennis ball, I tried to make intersection of openface polyhedron with a sphere to make the vertices round.

In the generated code I made a simple modification:

intersection(){ sphere(20); scale(24) show_solid(solid_2); };

The object is displayed correctly but rendering gives the following error:

ERROR: CGAL error in CGALUtils::applyBinaryOperator intersection: CGAL ERROR: assertion violation! Expr: itl != it->second.end() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h Line: 1152

I tried various approaches with difference and failed in a similar way.

I know it is not important whatsoever, however I wanted to share the issue.

Marek

P.S. The generator is awesome, but you know that. :-) mk

KitWallace commented 1 year ago

Hi Merek

Which polyhedron were you using? I'll try it myself.

Thanks fo the compliment - but really you have to thank David McCooey whose coordinates I use for most of the polyhedra

Chris

On Sun, Jul 23, 2023 at 3:46 PM Montibus @.***> wrote:

In a foolish attempt to create a mash table tennis ball, I tried to make intersection of openface polyhedron with a sphere to make the vertices round.

In the generated code I made a simple modification:

intersection(){ sphere(20); scale(24) show_solid(solid_2); };

The object is displayed correctly but rendering gives the following error:

ERROR: CGAL error in CGALUtils::applyBinaryOperator intersection: CGAL ERROR: assertion violation! Expr: itl != it->second.end() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h Line: 1152

I tried various approaches with difference and failed in a similar way.

I know it is not important whatsoever, however I wanted to share the issue.

Marek

P.S. The generator is awesome, but you know that. :-) mk

— Reply to this email directly, view it on GitHub https://github.com/KitWallace/Polyhedra/issues/60, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABOZHJM4PWFHXHEP6OMHNLXRU2NXANCNFSM6AAAAAA2UR6CU4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

KitWallace commented 1 year ago

OK I tried the intersection with

https://kitwallace.co.uk/3d/solid-index.xq?mode=solid&id=TruncatedIcosahedron

used difference() to get the scaling right and

intersection(){ scale(20) show_solid(solid_2); sphere(r=49,$fn=100); };

rounded (well truncated) the corners

This is with version 2021-01

On Sun, Jul 23, 2023 at 4:28 PM Chris Wallace @.***> wrote:

Hi Merek

Which polyhedron were you using? I'll try it myself.

Thanks fo the compliment - but really you have to thank David McCooey whose coordinates I use for most of the polyhedra

Chris

On Sun, Jul 23, 2023 at 3:46 PM Montibus @.***> wrote:

In a foolish attempt to create a mash table tennis ball, I tried to make intersection of openface polyhedron with a sphere to make the vertices round.

In the generated code I made a simple modification:

intersection(){ sphere(20); scale(24) show_solid(solid_2); };

The object is displayed correctly but rendering gives the following error:

ERROR: CGAL error in CGALUtils::applyBinaryOperator intersection: CGAL ERROR: assertion violation! Expr: itl != it->second.end() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h Line: 1152

I tried various approaches with difference and failed in a similar way.

I know it is not important whatsoever, however I wanted to share the issue.

Marek

P.S. The generator is awesome, but you know that. :-) mk

— Reply to this email directly, view it on GitHub https://github.com/KitWallace/Polyhedra/issues/60, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABOZHJM4PWFHXHEP6OMHNLXRU2NXANCNFSM6AAAAAA2UR6CU4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

KitWallace commented 1 year ago

actually, reducing the sphere radius to r=47 yields a spherical outer surface - this is a rather nice addition - thanks for the suggestion, I may incorporate it into the generator.

[image: image.png]

Still interested to know which poly failed for you

On Sun, Jul 23, 2023 at 4:58 PM Chris Wallace @.***> wrote:

OK I tried the intersection with

https://kitwallace.co.uk/3d/solid-index.xq?mode=solid&id=TruncatedIcosahedron

used difference() to get the scaling right and

intersection(){ scale(20) show_solid(solid_2); sphere(r=49,$fn=100); };

rounded (well truncated) the corners

This is with version 2021-01

On Sun, Jul 23, 2023 at 4:28 PM Chris Wallace @.***> wrote:

Hi Merek

Which polyhedron were you using? I'll try it myself.

Thanks fo the compliment - but really you have to thank David McCooey whose coordinates I use for most of the polyhedra

Chris

On Sun, Jul 23, 2023 at 3:46 PM Montibus @.***> wrote:

In a foolish attempt to create a mash table tennis ball, I tried to make intersection of openface polyhedron with a sphere to make the vertices round.

In the generated code I made a simple modification:

intersection(){ sphere(20); scale(24) show_solid(solid_2); };

The object is displayed correctly but rendering gives the following error:

ERROR: CGAL error in CGALUtils::applyBinaryOperator intersection: CGAL ERROR: assertion violation! Expr: itl != it->second.end() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h Line: 1152

I tried various approaches with difference and failed in a similar way.

I know it is not important whatsoever, however I wanted to share the issue.

Marek

P.S. The generator is awesome, but you know that. :-) mk

— Reply to this email directly, view it on GitHub https://github.com/KitWallace/Polyhedra/issues/60, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABOZHJM4PWFHXHEP6OMHNLXRU2NXANCNFSM6AAAAAA2UR6CU4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>