33#include <NDEVR/StationModel.h>
35#include <NDEVR/Deployment.h>
36#include <NDEVR/Material.h>
37#include <NDEVR/Geometry.h>
46 class NDEVR_DESIGN_API DrillHole :
public StationModel
60 DrillHole(
const Model& model,
const Vector<3, fltp08>& location)
70 setLocation(location);
77 DrillHole(
const Model& model)
80 if (!hasMetaData(
"drill_hole"))
82 setMetaData(
"drill_hole",
true);
92 Model drillRow()
const
94 Model model = getParent();
95 while (model.isValid())
97 if (model.is<NDPN::type>(
"drill_pattern_row"))
99 model = model.getParent();
107 Model drillPattern()
const
109 Model model = getParent();
110 while (model.isValid())
112 if (model.is<NDPN::type>(
"drill_pattern"))
114 model = model.getParent();
128 void addHolePath(
const StringView& deployment_name,
const Buffer<Vertex<3, fltp08>>& locations,
const Buffer<Time>& times, fltp08 radius)
131 lib_assert(getChildrenByName(deployment_name).size() == 0,
"Unexpected duplicate path name");
132 Model hole_data = createChild();
133 Deployment deployment(hole_data);
134 deployment.addSegments(locations, times);
135 deployment.set<NDPO::name>(deployment_name);
137 deployment.setUseTube(Geometry::ThicknessMode::e_circle, radius);
139 deployment.setUseTube(Geometry::ThicknessMode::e_pixel, 1.0);
148 void addHolePath(
const StringView& deployment_name,
const Buffer<Vertex<3, fltp08>>& locations, fltp08 radius)
150 lib_assert(getChildrenByName(deployment_name).size() == 0,
"Unexpected duplicate path name");
151 Model hole_data = createChild();
152 Deployment deployment(hole_data);
153 deployment.addSegments(locations);
154 deployment.set<NDPO::name>(deployment_name);
155 deployment.setUseTube(Geometry::ThicknessMode::e_pixel, radius);
165 void addHolePath(
const StringView& deployment_name,
const Buffer<fltp08>& depths, fltp08 radius)
167 Buffer<Vertex<3, fltp08>> new_data(depths.size());
168 Vertex<3, fltp08> collar_location = getLocation();
169 for (uint04 i = 0; i < depths.size(); i++)
171 new_data.add(Vertex<3, fltp08>(collar_location[X], collar_location[Y], depths[i]));
173 addHolePath(deployment_name, new_data, radius);
180 void setPathVisible(
const StringView& deployment_name,
bool visible)
182 Buffer<Model> children = getChildrenByName(deployment_name);
183 lib_assert(children.size() == 1,
"Bad deployment name");
184 if (children.size() != 1)
186 children[0].set<NDPO::spacial_visible>(visible);
197 void colorBy(
const StringView& property, fltp08 min, fltp08 mid, fltp08 max)
199 Material mat = getMaterial();
200 mat.setUVMode(UVType::e_KD, Material::UVMode::e_scaled_channel);
201 mat.set<NDPM::extra_property_value_max>(min);
202 mat.set<NDPM::extra_property_value_mid>(mid);
203 mat.set<NDPM::extra_property_value_min>(max);
204 mat.set<NDPM::draw_by_property_channel>(property);
205 mat.updateModifiedTime();
212 void colorBy(
const StringView& property)
214 Material mat = getMaterial();
215 colorByChannel(mat, property);
The primary namespace for the NDEVR SDK.