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

Missing surfaces while boolean and brep #33

Open
GregoryLi0 opened this issue Apr 24, 2022 · 0 comments
Open

Missing surfaces while boolean and brep #33

GregoryLi0 opened this issue Apr 24, 2022 · 0 comments

Comments

@GregoryLi0
Copy link
Contributor

code version

BRL-CAD 7.32.4

OS version

win10 & ubuntu 20.04

Description

While operating boolean and brep, some surfaces are lost not as expected.

Steps to Reproduce the Issue

  1. run shell cube_brep.sh:
# cube_brep.sh

CUBE="`basename $0`"

rm -f $CUBE.*

# create two arb8 solids
mged -c $CUBE.g in arb8.1 arb8 0 0 1  0 4 1  0 4 3  0 0 3  4 0 1  4 4 1  4 4 3  4 0 3
mged -c $CUBE.g in arb8.2 arb8 1 0 -1  1 2 -1  1 2 5  1 0 5  3 0 -1  3 2 -1  3 2 5  3 0 5

# boolean and brep
mged -c $CUBE.g r u.1 u arb8.1 u arb8.2
mged -c $CUBE.g brep u.1 brep b.1

# pipe in mged commands for setting up and saving the view to a render script
cat <<EOF | mged -c $CUBE.g
B b.1
ae 135 -65 180
saveview $CUBE.rt
B u.1
saveview $CUBE.expect.rt
EOF

# render the view we saved as a 1024x1024 image
./$CUBE.rt -s1024
./$CUBE.expect.rt -s1024

# convert from raw pix image format to png format
pix-png -s1024 < $CUBE.rt.pix > $CUBE.png
pix-png -s1024 < $CUBE.expect.rt.pix > $CUBE.expect.png

# keep the geometry database as cube_boolean.g and the rendering as cube_boolean.expect.png and cube_boolean.png
mv $CUBE.g cube_boolean.g
mv $CUBE.png cube_boolean.png
mv $CUBE.expect.png cube_boolean.expect.png

# clean up after ourselves
rm -f $CUBE.*
rm -f bool1*

The geometry database cube_boolean.g and the rendering png cube_boolean.expect.png and cube_boolean.png are generated.

Current Result

The rendering png:

Clearly, the output of boolean operation is wrong. Some surfaces did not generated properly.

Expected Result

zhuodannychen pushed a commit to zhuodannychen/brlcad that referenced this issue May 9, 2023
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