Artifact during drawing a simple 3D Nef polyhedron
Maintainers usually reply within 3 days
@gdamiand is already working on this.
Since Oct 13, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
Start with the supplied reproducer and trace CGAL::draw(N1) from CGAL/draw_nef_3.h into the drawing implementation; compare the rendered result with the cube built from the six half-spaces. Done means the supplied example draws only the intended cube, without the extra artifact. The issue also notes intersection-order behavior as a separate report (#9002).
Written by the indexing model from the issue text.
Description
Issue Details
A cube, created as an intersection of six half-spaces, is drawn correctly, but the picture also includes another cube. Where does it come from?
Also, the order of intersections matters, but it's another issue, reported by me earlier (#9002).
Source Code
#include <CGAL/Exact_integer.h>
#include <CGAL/Extended_homogeneous.h>
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/draw_nef_3.h>
using Kernel = CGAL::Extended_homogeneous<CGAL::Exact_integer>;
using Nef = CGAL::Nef_polyhedron_3<Kernel>;
using Plane = Nef::Plane_3;
// ------ create axis-aligned cube with center (X,Y,Z) and side 2*A
Nef cube(int const X, int const Y, int const Z, int const A)
{
Nef const pX(Plane(-1, 0, 0, X - A));
Nef const pY(Plane( 0, -1, 0, Y - A));
Nef const pZ(Plane( 0, 0, -1, Z - A));
Nef const qX(Plane( 1, 0, 0, -X - A));
Nef const qY(Plane( 0, 1, 0, -Y - A));
Nef const qZ(Plane( 0, 0, 1, -Z - A));
//return pX * pY * pZ * qX * qY * qZ; // <--- throws exception
return qX * pX * qY * pY * qZ * pZ; // <--- normal return
}
int main()
{
auto const N1 = cube(1, 1, 1, 1);
CGAL::draw(N1);
}
Environment
- Operating system (Windows/Mac/Linux, 32/64 bits): Ubuntu 24.04.2 LTS
- Compiler: g++ 13.3.0
- Release or debug mode:
- Specific flags used (if any):
- CGAL version: 6.0.1
- Boost version: 1.83
- Other libraries versions if used (Eigen, TBB, etc.):
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 1.6k
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 55
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CGAL/cgal
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 3 days
-
Allow cancellable CGAL operationsPossibly taken @AbhaySharma2009 claimed this 9 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 3 days
-
Snap_rounding_2: kd-tree query returns mostly false hot-pixel candidates for diagonal segments, and each query is costly with EpeckPossibly taken @LeoValque claimed this 9 days ago. OpenPkg::Snap_rounding_2
Maintainers usually reply within 3 days
-
corefine_and_compute_union() returns true but the output Surface_mesh has a non-manifold vertex (is_valid_polygon_mesh() is false)Possibly taken @sloriot claimed this 5 days ago. OpenDoc Not a bug Pkg::PMP
Difficulty 5/5 Over a week Newbie friendliness 12/100
CGAL/cgal#9892 · 5 comments · 1 assignee ·
Maintainers usually reply within 3 days
Similar issues
-
RTL-SDR: re-enumerating while streaming removes the in-use entry from the device selection dialogPossibly taken @dpc00 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
throneproj/Throne#2227 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepseek-ai/DeepGEMM-Ascend#49 ·
Maintainers usually reply within 1 day
-
bug needs testing platform:windows topic:buildsystem topic:platforms
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
godotengine/godot#126110 · 1 comment ·
Maintainers usually reply within 1 day