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 entity while boolean and brep #34

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

Missing entity while boolean and brep #34

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

Missing entity while operating boolean and brep.

Steps to Reproduce the Issue

  1. run shell miss_entity.sh:
# miss_entity.sh

BOOLEAN="`basename $0`"

rm -f $BOOLEAN.*

# create two arb8 solids
mged -c $BOOLEAN.g in sph.1 sph 0 0 0  4
mged -c $BOOLEAN.g in sph.2 sph 4 0 0  2
mged -c $BOOLEAN.g in sph.3 sph 0 6 0  4
mged -c $BOOLEAN.g in arb.1 arb8 1 1 -1  1 5 -1  5 5 -1  5 1 -1  1 1 1  1 5 1  5 5 1  5 1 1

mged -c $BOOLEAN.g g union.1 sph.* arb.*
mged -c $BOOLEAN.g brep union.1 brep b.1

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

cat <<EOF | mged -c $BOOLEAN.g
B union.1
ae 100 -65 180
zoom 1.4
saveview $BOOLEAN.expect.rt
EOF

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

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

# keep the geometry database as miss_entity.g and the rendering as miss_entity.expect.png and miss_entity.png
mv $BOOLEAN.g miss_entity.g
mv $BOOLEAN.png miss_entity.png
mv $BOOLEAN.expect.png miss_entity.expect.png

# clean up after ourselves
rm -f $BOOLEAN.*
rm -f bool*

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

Current Result

The rendering png:

One sph entity is lost and two surfaces of arb8 are lost.

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