Tiles and tile maps

 From:  bemfarmer
8663.41 
Hi Michael,

Given an objectlist filtered from MoI's geometry database, containing say BRep surfaces and Curves,

Is there javascript code to determine the object.type of the various objects in the objectlist?

The question is asked, because Curves do not contain .edges, and I am hiding .edges after using copy.

(Alternatively, I can filter the geometry database, and get two objectlists, and hide the edges for the BReps, and then concatenate the Curves.)


function selectTileCurves( tileName )
{
//var objs = moi.geometryDatabase.getObjects();
//Next line is a test line, to select only curves.
var objs = moi.geometryDatabase.getObjects().getCurves();
//Next line is a test line, to exclude curves.
//var objs = moi.geometryDatabase.getObjects().getBReps();
for ( var i = 0; i < objs.length; ++i )
{
var obj = objs.item(i);
if ( obj.name == tileName )
obj.selected = true;
}
}

The question is also asked, because if edges are not hidden, boundaries between surfaces do not look as good.
(unhidden edges do work well visually, if there is only one surface, with screen background.)

Having one Curve at the boundary improves the visual look, by reducing "pixel jaggedness."

- Brian

(I have the truchet tile script working well, but am trying to tune up the boundaries between colors or tones, with hidden edges.
I have code from the forum to hide the edges.)

EDITED: 23 Nov 2017 by BEMFARMER