Package cc.sketchchair.geometry

Examples of cc.sketchchair.geometry.SlicePlane


        creossSelectionTempOver.tempSlice = true;

        updateLen = true;
      } else {
        if (this.selectedPlanes.size() > 0) {
          SlicePlane tempPlane = this.selectedPlanes.get(0);
          ;
          Vec2D tempP = new Vec2D(GLOBAL.uiTools.mouseX,
              GLOBAL.uiTools.mouseY);
          SketchPath tempPath = new SketchPath(tempPlane.getSketch());
          tempPath.add(new SketchPoint(GLOBAL.uiTools
              .getPointOnPlane(tempP, tempPlane.getPlane())));
          tempPath.add(new SketchPoint(GLOBAL.uiTools
              .getPointOnPlane(tempP, tempPlane.getPlane()).add(
                  100, 0)));
          tempPath.setIsContructionLine(true);
          creossSelectionTempOver = new CrossSliceSelection(tempPath,
              tempPath.getParentSketch().getOnSketchPlane(), 0,
              1, 1, this);
View Full Code Here


  }

  public void importSVG(String path) {
   
    if(this.selectedPlanes.size() == 0){
      SlicePlane slicePlane = new SlicePlane(new Plane(
          new Vec3D(0, 0, 0), new Vec3D(0, 0, -1)));
      slicePlane.importSVG(path);
      this.getSlicePlanesY().add(slicePlane);
     
    }else{
      this.selectedPlanes.importSVG(path);
    }
View Full Code Here

        }

        if (action.action == UndoAction.ADD_PLANE) {
          //if(action.obj.getClass() )
          SlicePlane plane = (SlicePlane) action.obj;
          plane.destroy = true;
        }

        if (action.action == UndoAction.ADD_CHAIR) {
          //if(action.obj.getClass() )
View Full Code Here

   * Build design from SketchShape element
   * @param shape
   */
  public SketchChair(SketchShape shape) {

    SlicePlane plane = new SlicePlane(new Plane(new Vec3D(0, 0, 0),
        new Vec3D(0, 0, -1)));
    plane.setSelected(true);
    plane.getSketch().getSketchShapes().add(shape);
    this.selectedPlanes.add(plane);
    this.mouseReleased(0, 0);
   

  }
View Full Code Here

   * Add a new slice plane to the design.
   */
  public void addNewSlicePlane() {

    SketchShape selected = this.selectedPlanes.getSelectedShape();
    SlicePlane selectedPlane = this.selectedPlanes.getSelectedShapePlane();

    if (selected != null && selectedPlane != null) {
      if (selected instanceof SketchSpline) {
        SketchSpline SketchSpline = (SketchSpline) selected;
        selected = SketchSpline.getPath();
View Full Code Here

  /**
   * Add a new layer to the design.
   */
  public void addLayer() {
    if (this.selectedPlanes.size() > 0) {
      SlicePlane copyPlane = this.selectedPlanes.getFirst().clone();

      int index = this.getSlicePlanesY().indexOf(
          this.selectedPlanes.getFirst());

      this.getSlicePlanesY().add(index, copyPlane);
      this.rebuildWidth();

    } else {
      SlicePlane copyPlane = this.getSlicePlanesY().getFirst().clone();
      this.getSlicePlanesY().add(copyPlane);
      this.rebuildWidth();

    }
    //  SETTINGS.slat_num++;
View Full Code Here

    GLOBAL.shapePack.empty();
    // GLOBAL.shapePack.pdf_pixels_per_mm = SETTINGS.pixels_per_mm;
    GLOBAL.shapePack.content_scale = SETTINGS.scale;
    //GLOBAL.shapePack.ZOOM = ((float) GLOBAL.applet.height) / 390f;
    for (int i = 0; i < this.getSlicePlanesY().size(); i++) {
      SlicePlane slicePlane = this.getSlicePlanesY().get(i);

      if (!slicePlane.guide) {
        spShape shape = slicePlane.getspShape();
        shape.shapePack = GLOBAL.shapePack; //hacky

        shape.build();
        shape.setLabel(((char) ('A' + i)) + "");
        shape.linkedObject = slicePlane;
        GLOBAL.shapePack.add(shape);
      }
    }

    for (int i = 0; i < this.slicePlanesSlatSlices.size(); i++) {
      SlicePlane slicePlane = this.slicePlanesSlatSlices.get(i);
      if (!slicePlane.guide) {
        spShape shape = slicePlane.getspShape();
        shape.shapePack = GLOBAL.shapePack; //hacky

        shape.build();
        shape.setLabel("" + (i + 1));
        shape.linkedObject = slicePlane;
View Full Code Here

   */
  public void addToPreviewShapePack(spShapePack shapePack) {

    LOGGER.debug("addToPreviewShapePack");
    for (int i = 0; i < this.getSlicePlanesY().size(); i++) {
      SlicePlane slicePlane = this.getSlicePlanesY().get(i);

      if (!slicePlane.guide) {
        spShape shape = slicePlane.getspShape();
        shape.shapePack = shapePack; //hacky
        shape.build();
        shape.linkedObject = slicePlane;
        shapePack.add(shape);
      }
    }

    for (int i = 0; i < this.slicePlanesSlatSlices.size(); i++) {
      SlicePlane slicePlane = this.slicePlanesSlatSlices.get(i);
      if (!slicePlane.guide) {
        spShape shape = slicePlane.getspShape();
        shape.shapePack = shapePack; //hacky

        shape.build();
        shape.linkedObject = slicePlane;
        shapePack.add(shape);
View Full Code Here

    LOGGER.debug("build");
   
    setPlaneWidth(SETTINGS.materialThickness);

    this.getSlicePlanesY().build();
    SlicePlane lastPlane = null;

   
    selectedPlanes.empty();
    for (int i = 0; i < this.getSlicePlanesY().getList().size(); i++) {
      SlicePlane plane = this.getSlicePlanesY().getList().get(i);
      if (plane.isSelected()){
        this.selectedPlanes.add(plane);
      }
    }

    this.builtOuline = true;
View Full Code Here

     * return new TriangleIndexVertexArray(TrianglesNum, this
     * .getIndexBuffer(gIndices), 4 * 3, VerticesNum / 3, this
     * .getVertexBuffer(gVertices), 4 * 3);
     */

    SlicePlane lastPlane = null;

    for (int i = 0; i < this.getSlicePlanesY().getList().size(); i++) {
      SlicePlane plane = this.getSlicePlanesY().getList().get(i);
      plane.buildCoverPath();
      if (lastPlane != null) {
        IndexedMesh vertexArray = lastPlane.loftCollisonMeshBetween(
            lastPlane.coverPath, plane, plane.coverPath, 0.2f,
            offset);
        if (vertexArray != null) {
View Full Code Here

TOP

Related Classes of cc.sketchchair.geometry.SlicePlane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.