mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-12 19:32:37 +01:00
keep information about kind of an object
This commit is contained in:
parent
f3e8328b80
commit
a3fa22de62
1 changed files with 3 additions and 2 deletions
|
|
@ -151,7 +151,7 @@ TCAD.utils.createPlane = function(basis, depth, boundingPolygon, shared) {
|
|||
var currentBounds = new TCAD.BBox();
|
||||
var points = boundingPolygon.map(function(p) { currentBounds.checkBounds(p.x, p.y); return tr._apply(p); });
|
||||
var polygon = new CSG.Polygon(points.map(function(p){return new CSG.Vertex(TCAD.utils.csgVec(p))}), shared);
|
||||
var plane = new TCAD.Solid(CSG.fromPolygons([polygon]), material);
|
||||
var plane = new TCAD.Solid(CSG.fromPolygons([polygon]), material, 'PLANE');
|
||||
plane.wireframeGroup.visible = false;
|
||||
plane.mergeable = false;
|
||||
|
||||
|
|
@ -592,8 +592,9 @@ TCAD.utils.getDerivedFrom = function(shared) {
|
|||
};
|
||||
|
||||
/** @constructor */
|
||||
TCAD.Solid = function(csg, material) {
|
||||
TCAD.Solid = function(csg, material, type) {
|
||||
THREE.Geometry.call( this );
|
||||
this.tCadType = type || 'SOLID';
|
||||
this.csg = csg;
|
||||
this.dynamic = true; //true by default
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue