Creating an Extrusion Programatically
#3
Hm, what do you mean by "extrusion vector acts oddly i can step it up 1 unit at a time but if i do big changes i see the length changing in odd lengths"?

If you set the extrudeVector to new Vector3D(0,123.456, 0), then the created mesh will have SizeX: 10.00, SizeY: 123.456, SizeZ: 10.00. This is correct.

Note that if you rotate the extrudeVector, then you also need to rotate the shapeYVector3D. Those two vectors define 2 axes for the extruded mesh (the third axis can be calculated with doing a vector cross product between those two vectors).


The BoxMesh3D and BoxVisual3D will always create an axis-aligned box. You can apply a transformation to them to rotate them.

If you want to create a box from a start 3D position to an end 3D position, you can also use the TubeLineMesh3D and TubeLineVisual3D - by default this will create a cylinder but you can set the Segments to 4 and this will create a 4 sided cylinder - a box.
Andrej Benedik
  


Messages In This Thread
Creating an Extrusion Programatically - by Madaxe - 05-18-2020, 03:39 PM
RE: Creating an Extrusion Programatically - by abenedik - 05-19-2020, 10:23 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)