Package cc.sketchchair.sketch

Examples of cc.sketchchair.sketch.SketchShape


  }

  public SketchShape getShapePickBuffer(int col) {
    for (int i = 0; i < this.getList().size(); i++) {
      SlicePlane curSlice = this.getList().get(i);
      SketchShape shape = curSlice.getSketch().getShapePickBuffer(col);
      if (shape != null)
        return shape;
    }
    return null;
  }
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;
View Full Code Here

      if (crossSliceSelection.path != null
          && crossSliceSelection.path.isDestroying() == true)
        crossSliceSelection.destroy(null);

      Object sketch = crossSliceSelection.path;
      SketchShape guideSpline = (SketchShape) sketch;

      //if (guideSpline == null || guideSpline.size() < 2)
      //  return;

      if (crossSliceSelection != null
View Full Code Here

  }

  public SketchShape getShapePickBuffer(int col) {

    SketchShape shape = this.selectedPlanes.getShapePickBuffer(col);
    if (shape != null)
      return shape;

    shape = this.slicePlanesSlatSlices.getShapePickBuffer(col);
    if (shape != null)
View Full Code Here

  // without the chairs translation matrix so the silohouette will need to be
  // translated later

  private void makeNewChairFromLastSketch() {

    SketchShape lastShape = this.selectedPlanes.getFirst().getLastSketch();
    SketchChair newChair = new SketchChair(lastShape);

    this.selectedPlanes.removeLastSketch();

    if (SETTINGS.EXHIBITION_MODE) {
View Full Code Here

      //clear the cross planes of this object
      this.slicePlanesSlatSlices.destroyPlanes();
      this.slicePlanesSlatSlices.empty();

      Object sketch = crossSliceSelection.path;
      SketchShape guideSpline = (SketchShape) sketch;

      if (crossSliceSelection != null
          && crossSliceSelection.type == CrossSliceSelection.SLICES
          || crossSliceSelection.type == CrossSliceSelection.LEG
          || crossSliceSelection.type == CrossSliceSelection.SINGLE_SLICE)
View Full Code Here

    if (GLOBAL.uiTools.getCurrentTool() == UITools.SLICES_SINGLE_SLICE) {
      SketchShapes overShapes = getOverShapes(GLOBAL.uiTools.mouseX,
          GLOBAL.uiTools.mouseY);

      if (overShapes.size() > 0) {
        SketchShape overShape = overShapes.getClosest(
            GLOBAL.uiTools.mouseX, GLOBAL.uiTools.mouseY);
        creossSelectionTempOver = new CrossSliceSelection(overShape,
            overShape.getParentSketch().getOnSketchPlane(),
            overShape.lastMouseOverPercent,
            overShape.lastMouseOverPercent, 1, this);
        creossSelectionTempOver.type = CrossSliceSelection.SINGLE_SLICE;
        creossSelectionTempOver.select();
        creossSelectionTempOver.tempSlice = true;
        updateLen = true;

      }

    }

    if (GLOBAL.uiTools.getCurrentTool() == UITools.SLICES_GROUP_SLICES
        && ((creossSelectionTempOver == null || !creossSelectionTempOver.editing))) {

      SketchShapes overShapes = getOverShapes(GLOBAL.uiTools.mouseX,
          GLOBAL.uiTools.mouseY);
      if (overShapes.size() > 0) {
        SketchShape overShape = overShapes.getClosest(
            GLOBAL.uiTools.mouseX, GLOBAL.uiTools.mouseY);
        creossSelectionTempOver = new CrossSliceSelection(overShape,
            overShape.getParentSketch().getOnSketchPlane(),
            overShape.lastMouseOverPercent,
            overShape.lastMouseOverPercent, 10f, this);
        creossSelectionTempOver.type = CrossSliceSelection.SLICES;
        creossSelectionTempOver.mousePercent = overShape.lastMouseOverPercent;
        creossSelectionTempOver.select();
        creossSelectionTempOver.tempSlice = true;

        updateLen = true;
      }

    }

    if (GLOBAL.uiTools.getCurrentTool() == UITools.SLICES_SLATSLICE_GROUP
        && ((creossSelectionTempOver == null || !creossSelectionTempOver.editing))) {

      SketchShapes overShapes = getOverShapes(GLOBAL.uiTools.mouseX,
          GLOBAL.uiTools.mouseY);

      if (overShapes.size() > 0) {
        SketchShape overShape = overShapes.getClosest(
            GLOBAL.uiTools.mouseX, GLOBAL.uiTools.mouseY);
        creossSelectionTempOver = new CrossSliceSelection(overShape,
            overShape.getParentSketch().getOnSketchPlane(),
            overShape.lastMouseOverPercent,
            overShape.lastMouseOverPercent, 50, this);
        creossSelectionTempOver.type = CrossSliceSelection.SLATSLICES;
        creossSelectionTempOver
            .setSlatHeight(SETTINGS.DEFAULT_SLATSLICE_HEIGHT);
        creossSelectionTempOver.mousePercent = overShape.lastMouseOverPercent;
        creossSelectionTempOver.select();
        creossSelectionTempOver.tempSlice = true;

        updateLen = true;
      }

    }

    if (GLOBAL.uiTools.getCurrentTool() == UITools.SLICES_SINGLE_SLAT
        && ((creossSelectionTempOver == null || !creossSelectionTempOver.editing))) {

      SketchShapes overShapes = getOverShapes(GLOBAL.uiTools.mouseX,
          GLOBAL.uiTools.mouseY);

      if (overShapes.size() > 0) {
        SketchShape overShape = overShapes.getClosest(
            GLOBAL.uiTools.mouseX, GLOBAL.uiTools.mouseY);
        creossSelectionTempOver = new CrossSliceSelection(overShape,
            overShape.getParentSketch().getOnSketchPlane(),
            overShape.lastMouseOverPercent,
            overShape.lastMouseOverPercent + 0.01f, 1, this);
        creossSelectionTempOver.type = CrossSliceSelection.PLANE_ON_EDGE;
        creossSelectionTempOver.mousePercent = overShape.lastMouseOverPercent;
        creossSelectionTempOver.select();
View Full Code Here

      for (int i = 0; i < actions.size(); i++) {
        UndoAction action = (UndoAction) actions.get(i);

        if (action.action == UndoAction.ADD_SHAPE) {
          //if(() )
          SketchShape shape = (SketchShape) action.obj;
          shape.destroy();

        }

        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() )
          SketchChair chair = (SketchChair) action.obj;
          chair.destroy();
        }

        if (action.action == UndoAction.EDIT_SHAPE) {
          SketchShape shape = (SketchShape) action.obj;
          shape.replace((SketchShape) action.objClone);
          //action.objClone;
          shape.setSelectedNodes(new ArrayList<Object>());

          if (GLOBAL.sketchChairs.getCurChair() != null) {

            //GLOBAL.sketchChairs.curChair.build();
            GLOBAL.sketchChairs.getCurChair().getSlicePlanesY()
View Full Code Here

    }
   
    //Go through all selected shapes and see if we have settings for them
    if(GLOBAL.sketchChairs.getCurChair() != null){
      for(int i = 0 ; i < GLOBAL.sketchChairs.getCurChair().selectedPlanes.count(); i++){
        SketchShape selectedShape = GLOBAL.sketchChairs.getCurChair().selectedPlanes.getSelectedShape();
       
        if(selectedShape != null && selectedShape instanceof SketchSpline)
          show = true;
      }
    }
View Full Code Here

                    if (tempSketchShapes.sketchOutlines
                        .getOutterOutline() == null)
                      return;
                   
                   
                    SketchShape sktch = tempSketchShapes.sketchOutlines.getOutterOutline().getPath();

                   
                    List<List<Vec2D>> points02 = currentPlaneY.getIntersection(
                        slicePlane, true,
                        sktch);
View Full Code Here

TOP

Related Classes of cc.sketchchair.sketch.SketchShape

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.