EditObject
Create an edit object feature in 2D.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"EditObject");
model.component(<ctag>).geom(<tag>).feature(<ftag>).set(property,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getType(property);
model.component(<ctag>).geom(<tag>).feature(<ftag>).vertexNew();
model.component(<ctag>).geom(<tag>).feature(<ftag>).vertexDelete(<vertex>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).vertexSnap(<vertex>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).startVertexDisconnect(<edge>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).endVertexDisconnect(<edge>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).edgeNew();
model.component(<ctag>).geom(<tag>).feature(<ftag>).edgeDelete(<edge>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).setAttribute(attribute,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getAttribute(attribute);
Description
Use model.component(<ctag>).geom(<tag>).create(<ftag>,"EditObject") to create an edit object feature.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).vertexNew() to add a new vertex to the object.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).vertexDelete(<vertex>) to delete <vertex> from the object.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).vertexSnap(<vertex>) to delete <vertex> from the object, and move any adjacent edges to the closest remaining vertex.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).startVertexDisconnect(<edge>) to create a new vertex and use this vertex as the start vertex for <edge>.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).endVertexDisconnect(<edge>) to create a new vertex and use this vertex as the end vertex for <edge>.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).edgeNew() to add a new edge to the object.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).edgeDelete(<edge>) to delete <edge> from the object.
The following properties are available:
none | custom | integer between 1 and the number of colors in the current theme
The color to use. Active when color is set to custom.
1 | 2 | 3
on | off
all | obj | dom | bnd | pnt | off
Show selections, if selresult is on, in physics, materials, and so on; in part instances; or in 3D from a plane geometry. obj is not available in a component’s geometry. dom, bnd, and edg are not available in all features.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
The following attributes are available:
Table 3-70: Valid attributes
on | off | inherit
Designate the resulting objects as construction geometry. Use inherit to set the construction geometry attribute only if all input objects are construction geometry.
Example
The following sequence edits a circle, setting the degree of one edge to one to create a straight edge:
Code for Use with Java
Model model = ModelUtil.create("Model");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1", 2);
g.create("c1", "Circle");
g.run("c1");
g.create("edo1", "EditObject");
g.feature("edo1").selection("input").set(new String[]{"c1"});
g.feature("edo1").set("edge", "1");
g.feature("edo1").set("degree", "1");
g.run("edo1");
Code for Use with MATLAB
model = ModelUtil.create('Model');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1', 2);
g.create('c1', 'Circle');
g.run('c1');
g.create('edo1', 'EditObject');
g.feature('edo1').selection('input').set({'c1'});
g.feature('edo1').set('edge', '1');
g.feature('edo1').set('degree', '1');
g.run('edo1');
See Also
BezierPolygon