I'll add a shape to rigid body.
If you add a shape, please call the setupMass method to step up to the start of the next.
@param   shape shape to Add
170106
function(shape){
        if(shape.parent){
            throw new Error("It is not possible that you add to the multi-rigid body the shape of one");
        }
        if(this.shapes!=null)(this.shapes.prev=shape).next=this.shapes;
        this.shapes=shape;
        shape.parent=this;
        if(this.parent)this.parent.addShape(shape);
        this.numShapes++;
    }
1100211
public void add(Face vtx) {
        if (head == null) {
            head = vtx;
        } else {
            tail.next = vtx;
        }
        vtx.next = null;
        tail = vtx;
    }
967358
public void add(double x, double y, double z) {
		resize(m_pointCount + 1);
		Point3D pt = new Point3D();
		pt.setCoords(x, y, z);
		setXYZ(m_pointCount - 1, pt);
	}
1101567
synchronized void addBlock(Block block) {
    if (!isInitialized()) {
      return;
    }
    
    BlockScanInfo info = blockMap.get(block);
    if ( info != null ) {
      LOG.warn("Adding an already existing block " + block);
      delBlockInfo(info);
    }
    
    info = new BlockScanInfo(block);    
    info.lastScanTime = getNewBlockScanTime();
    
    addBlockInfo(info);
    adjustThrottler();
  }
1208911
private static void addShapeAndMembers(String shapeName,
            Map<String, ShapeModel> in,
            Map<String, ShapeModel> out) {

        if (shapeName == null) return;

        final ShapeModel shape = in.get(shapeName);
        if (shape == null) return;

        if (!out.containsKey(shapeName)) {
            out.put(shapeName, in.get(shapeName));
            List<MemberModel> members = shape.getMembers();

            if (members != null) {
                for (MemberModel member : members) {
                    List<String> memberShapes = resolveMemberShapes(member);
                    if (memberShapes == null) continue;
                    for (String memberShape : memberShapes) {
                        addShapeAndMembers(memberShape, in, out);
                    }
                }
            }
        }
    }
831826
void add(Iterable<SGraphSegment> segments) {
		for (final SGraphSegment segment : segments) {
			this.segments.add(segment);
		}
	}
1355700
private void updateShapeOffset() {
    int offsetX = scroller.getOffsetX();
    int offsetY = scroller.getOffsetY();
    shape.setOffset(offsetX, offsetY);
  }
737611
def setShape(self, polygonID, shape):
        
        self._connection._beginMessage(tc.CMD_SET_POLYGON_VARIABLE,
                                       tc.VAR_SHAPE, polygonID, 1 + 1 + len(shape) * (8 + 8))
        self._connection._string += struct.pack("!BB",
                                                tc.TYPE_POLYGON, len(shape))
        for p in shape:
            self._connection._string += struct.pack("!dd", p)
        self._connection._sendExact()
531460
public static final void fill(final Shape shape, final ShapeFill fill) {
        if (!validFill(shape)) {
    		return;
    	}
        
        Texture t = TextureImpl.getLastBind();
        TextureImpl.bindNone();

        final float center[] = shape.getCenter();
        fill(shape, new PointCallback() {
			public float[] preRenderPoint(Shape shape, float x, float y) {
	            fill.colorAt(shape, x, y).bind();
	            Vector2f offset = fill.getOffsetAt(shape, x, y);
	            
	            return new float[] {offset.x + x,offset.y + y};
			}
    	});
        
        if (t == null) {
        	TextureImpl.bindNone();
        } else {
        	t.bind();
        }
    }
819473
def set_shape(self, id, new_shape):
        """"""
        old_shape = self.id_to_shape[id]
        old_buffer = self.get_buffer(old_shape)
        model, color = old_buffer.get(id)
        new_data = self._create_turtle(id, new_shape, model, color)
        old_buffer.remove(id)
        self.id_to_shape[id] = new_shape
        return new_data
1121096
public function setPointShape($shape)
    {
        $allowedValues = array("circle", "triangle", "square", "diamond", "star", "polygon");
        
        if (!in_array($shape, $allowedValues))
        {
            throw new \Exception("Invalid point shape: " . $shape);
        }
        
        $this->m_options['pointShape'] = $shape;
    }
890626
protected synchronized void addShapeGeometryChangeListener(ShapeGeometryChangeListener listener) {
		assert listener != null : AssertMessages.notNullParameter();
		if (this.geometryListeners == null) {
			this.geometryListeners = new WeakArrayList<>();
		}
		this.geometryListeners.add(listener);
	}
780716
void addGeometry(Geometry geometry) {
		if (geometry.isEmpty())
			return;
		
		int type = geometry.getType().value();

		if (MultiVertexGeometry.isMultiVertex(type))
			addMultiVertexGeometry_((MultiVertexGeometry) geometry);
		else if (MultiPath.isSegment(type))
			addSegment_((Segment) geometry);
		else if (type == Geometry.GeometryType.Envelope)
			addEnvelope_((Envelope) geometry);
		else if (type == Geometry.GeometryType.Point)
			addPoint_((Point) geometry);
		else
			throw new IllegalArgumentException("invalid shape type");
	}
29369
public void add(double x, double y) {
		resize(m_pointCount + 1);
		Point2D pt = new Point2D();
		pt.setCoords(x, y);
		setXY(m_pointCount - 1, pt);
	}
1077729
def _set_shape(self, shape):
        """"""
        try:
            shape = (int(shape),)
        except TypeError:
            pass
        shp = list(shape)
        shp[0] = timetools.Period('366d')/self.simulationstep
        shp[0] = int(numpy.ceil(round(shp[0], 10)))
        getattr(self.fastaccess, self.name).ratios = numpy.zeros(
            shp, dtype=float)
313744
public void addPoint(PolygonPoint p )    
    {
        p.setPrevious( _last );
        p.setNext( _last.getNext() );
        _last.setNext( p );
        _points.add( p );
    }
764539
public void setGeometries(List<Geometry> geometries) {
        this.mGeometries.clear();
        if (geometries != null) {
            this.mGeometries.addAll(geometries);
        }
    }