MCPcopy Create free account
hub / github.com/OpenWebCAD/node-occ / extractSubShape

Function extractSubShape

src/Tools.cc:152–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150
151
152static int extractSubShape(const TopoDS_Shape& shape, std::list<v8::Local<v8::Object> >& shapes)
153{
154 TopAbs_ShapeEnum type = shape.ShapeType();
155 switch (type)
156 {
157 case TopAbs_COMPOUND:
158 return 0;
159 case TopAbs_COMPSOLID:
160 case TopAbs_SOLID:
161 {
162 shapes.push_back(Nan::To<v8::Object>(Solid::NewInstance(shape)).ToLocalChecked());
163 break;
164 }
165 case TopAbs_FACE:
166 case TopAbs_SHELL:
167 {
168 break;
169 }
170 case TopAbs_WIRE:
171 {
172
173 break;
174 }
175 case TopAbs_EDGE:
176 {
177 break;
178 }
179 case TopAbs_VERTEX:
180 {
181 break;
182 }
183 default:
184 return 0;
185 }
186 return 1;
187}
188
189static int extractShape(const TopoDS_Shape& shape, std::list<v8::Local<v8::Object> >& shapes)
190{

Callers 1

extractShapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected