Make it work when I insert against a NULL bsp3.

[git-p4: depot-paths = "//depot/solvespace/": change = 1747]
solver
Jonathan Westhues 2008-05-26 16:34:26 -08:00
parent b484c26493
commit dd70cb55a2
1 changed files with 5 additions and 0 deletions

View File

@ -475,6 +475,11 @@ triangulate:
SBsp3 *SBsp3::Insert(STriangle *tr, SMesh *instead) {
if(!this) {
if(instead && !(instead->flipNormal)) {
instead->AddTriangle(tr->a, tr->b, tr->c);
return NULL;
}
// Brand new node; so allocate for it, and fill us in.
SBsp3 *r = Alloc();
r->n = (tr->Normal()).WithMagnitude(1);