I've managed to import a Wavefront (.obj) file and store it in a variable like so:
model = Import[
"/path_to_object/my.obj",
"Graphics3D",
Lighting -> {
{"Ambient", RGBColor[{0.212, 0.168, 0.2}]},
{"Directional", RGBColor[{0.8, 0., 0.}], ImageScaled[{2, 0, 2}]},
{"Directional", RGBColor[{0., 0.8, 0.}], ImageScaled[{2, 2, 2}]},
{"Directional", RGBColor[{0., 0., 0.8}], ImageScaled[{0, 2, 2}]}
}
]
The output shows no black edges that you would normally see with Graphics3D
objects, sort of like a "wireframe overlay". I've tried to call the Graphics3D
function on model
in this way:
Graphics3D[{AbsoluteThickness[2], AbsoluteDashing[{5, 5}], model}]
But I get the error:
Graphics is not a Graphics3D primitive or directive.
I've also tried adding more arguments to the Import
function but I get the error:
Import::argt: Import called with 3 arguments; 1 or 2 arguments are expected.
Any ideas on how this can be accomplished? I saw that there is the command Mesh->All
, but because I'm not that well versed with Mathematica yet, I don't know exactly how to apply a Mesh
command to an imported Graphics3D
object.
DeleteCases[Import["ExampleData/wrench.obj.gz"], _EdgeForm, Infinity]
? $\endgroup$model /. EdgeForm[] -> EdgeForm[{Thick}]
$\endgroup$