import React, {Fragment as FR} from 'react';
import Section from "./section";
import {
ActiveLabel, Controls, getEdgesViewObjects, getEdgeViewObjects, getFacesViewObjects, getFaceViewObjects,
getLoopsViewObjects,
getLoopViewObjects,
getVertexViewObjects, InteractiveSection, mapIterable,
TAB
} from "./utils";
export default class ShellExplorer extends React.PureComponent {
render() {
const {shell, group3d} = this.props;
const category='default';
const context = null;
const faces = shell ? shell.faces : [];
return
{faces.map(face => )}
;
}
}
export function FaceExplorer({face, group3d, customName, category, context}) {
return
}
export function LoopsExplorer({loops, group3d, name, category, context}) {
const ctrlProps = {
viewObjectsProvider: getLoopsViewObjects, topoObj: loops, group3d, category, context
};
const controls = ;
const nameComp = {name};
return
{mapIterable(loops, loop => )}
}
export function LoopExplorer({loop, group3d, customName, category, context}) {
const highlightProps = {
viewObjectsProvider: getEdgesViewObjects, topoObj: loop.halfEdges, group3d, category, context
};
return
{mapIterable(loop.halfEdges, edge => )}
{loop.face && }
}
export function EdgesExplorer({edges, group3d, name, category, context}) {
const ctrlProps = {
viewObjectsProvider: getEdgesViewObjects, topoObj: edges, group3d, category, context
};
const controls = ;
const nameCtrl = {name};
return
{mapIterable(edges, edge => )}
}
export function EdgeExplorer({edge, group3d, customName, category, context}) {
const ctrlProps = {
viewObjectsProvider: getEdgeViewObjects, topoObj: edge, group3d, category, context
};
const controls = ;
const name = {getName('edge', customName, edge)};
const twin = edge.twin();
return
{twin &&
{twin.loop &&
{twin.loop.face && }
}
}
{edge.loop && }
}
export function VertexExplorer({vertex, group3d, customName, category, context}) {
const ctrlProps = {
viewObjectsProvider: getVertexViewObjects, topoObj: vertex, group3d, category, context
};
const controls = ;
const name = {getName('vertex', customName, vertex)};
return
}
function getName(name, customName, topoObj) {
return (customName || name) + ' ' + topoObj.refId;
}