Scene & Group Manipulation
As with generators, look at the exemplars under Exhibition or the worked examples under Tutorials to see these commands used correctly.
Instance
instance name object
[rotate (rx ry rz)(degrees)] [scale (sx sy sz)] [translate (tx ty tz)]
[surface surface_id] [LOD LOD_type] [shading shading_type]
endinstance
instance name object
[rotate (rx ry rz)(degrees)] [scale (sx sy sz)] [translate (tx ty tz)]
[surface surface_id] [LOD LOD_type] [shading shading_type]
endinstance
Creates an instance of geometry. One can optionally rotate, scale, translate the instance and specify its color, level-of-detail (LOD), and rendering mode.
object
: the name of the primitive, generator, or group that will be instantiated.rotate
: draws a vector from the origin to the point specified in(rx ry rz)
and rotates over that axis(degrees)
.scale
: scales the shape in each included axis by the multiplier given. Ex:scale (1 3 0)
will retain the x-axis size, multiply the y-axis size by 3 times, and flattens the z-axis completely.translate
: moves shape along the coordinate axes by the given number of units. An instance can be translated, rotated, etc. multiple times within the same line: JIPCAD will execute these commands left to right.surface_id
: a specified surface color, given as an RGB fraction from 0 to 1. When multiple surface colors are given for a generator--such as a sphere within a nested groups--JIPCAD will use the first ("deepest") color defined. For example, RGB (25.6 204.8 0) is equivalent tosurface G color (0.1 0.8 0) endsurface
.LOD_type
: defined types:NOME_OFF
: not renderedNOME_BOUND
: render only the bounding box of this subtreeNOME_EDGES
: render this subtree in wireframe modeNOME_FULL
: fully render this subtree
shading_type
: defined types:NOME_INHERIT
: Shade this node in the same style as its parentNOME_WIRE
: render as a wireframeNOME_FLAT
: render with flat shading: one color per polygonNOME_GOURAUD
: render with Gouraud shading; interpolate vertex colors across each polygonNOME_PHONG
: render with Phong shading; interpolate vertex normals across each polygon and recompute lighting at each pixel
Group
group id
instance id1 object_id1 [instance_parameters] endinstance
...
instance idN object_idN [instance_parameters] endinstance
endgroup
group id
instance id1 object_id1 [instance_parameters] endinstance
...
instance idN object_idN [instance_parameters] endinstance
endgroup
Defines a collection of instances of primitive objects or other groups. Groups are the most general construct to introduce hierarchy into a model description.
id
: the name of the instance.object_id
: the name of the object to be instantiated.[instance_parameters]
: all the optional parameters discussed above.
Note that creating a group does not display the objects instanced inside of it. Another instance statement must be added for the group in order to include it in the scene.
Subdivision
subdivision id
[sd_type sd_flag]
sd_level
instance id1 object_id1 [xform & color] endinstance
...
instance idN object_idN [xform & color] endinstance
endsubdivision
subdivision id
[sd_type sd_flag]
sd_level
instance id1 object_id1 [xform & color] endinstance
...
instance idN object_idN [xform & color] endinstance
endsubdivision
Subdivides a merged mesh into smaller facets. (Alternatively, can perform subdivision in the GUI: Edit >> Subdivide
.)
sd_flag
: the type of subdivision algorithm used.NOME_SD_CatmullClark
: the plain and simple CC subdivisionNOME_SD_CC_sharp
: CC subdivision respecting “sharp” flags in the mesh.sd_level
: the integer number of iterated subdivision steps.[xform & color]
: the optional parameters relating to transformations and coloring.
Offset
offset id
[offset_type offset_flag]
height
width
instance id1 object_id1 [xform & color] endinstance
...
instance idN object_idN [xform & color] endinstance
endoffset
offset id
[offset_type offset_flag]
height
width
instance id1 object_id1 [xform & color] endinstance
...
instance idN object_idN [xform & color] endinstance
endoffset
Thickens a surface mesh of zero thickness into a thicker B-rep that can be 3D-printed.
offset_flag
: the type of thickened surface generated:NOME_OFFSET_DEFAULT
: This offsets the starting mesh inward and outward symmetrically. Each facet in the original mesh maps to two facets in the offset mesh; one of them with reversed orientation. Each boundary edge of an open polyhedron will map to a quadrilateral facet.NOME_OFFSET_GRID
: The edges of the starting mesh are viewed as thin wires which are then thickened into 4-sided prism segments. This is different from “gridding” the original mesh, where the openings in each facet are a given fraction of the facet geometry.
height
: the half-thickness of the generated surface normal to the original facets.width
: the width of the prismatic beams in the tangential direction of each facet.[xform & color]
: the optional parameters relating to transformations and coloring.