Apg-Cii
Apg Cad Instructions Interpreter

Viewer

Layers

 

Cad test settings

 
ApgCiiTest_01.json Apg Svg Cad Instr. Interp. -1000 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 0 1000 2000 3000 4000 5000 Annotation Test Multiline Will work? HF: 2550 hF: 125 Roof: 2912 hT: 3475 ZERO: 0,0 HF: 0,2550 HFE: -250,2550 HTE: -250,3550 hF: 0,2675 hF1: 250,2675 hT: 250,3475 Ceiling1: 3050,4275 P23: 5000,100 P24: 5500,800 ApgCiiTest_01.json Apg Svg Cad Instr. Interp. 2026-01-29T00:26:07.557Z

Logger

0000 0.00000 0.00000   1    ApgCii.constructor{ 
0001 0.00000 0.00000 1 }
0002 0.00000 0.00000 1 ApgCii.set{
0003 0.00200 0.00200 2 ApgCii.#validateAndSet{
0004 0.00200 0.00000 2 }
0005 0.00200 0.00000 1 }
0006 0.00200 0.00000 1 ApgCii.build{
0007 0.00200 0.00000 2 ApgCii.setupBegin{
0008 0.00200 0.00000 2 > 1: SETUP_BEGIN
0009 0.00200 0.00000 2 }
0010 0.00200 0.00000 2 ApgCii.setName_{
0011 0.00200 0.00000 2 > 2: SET_NAME
0012 0.00200 0.00000 2 }
0013 0.00400 0.00200 2 ApgCii.setupEnd{
0014 0.00400 0.00000 2 > 3: SETUP_END
0015 0.00400 0.00000 2 }
0016 0.00400 0.00000 2 ApgCii.newPoint_{
0017 0.00400 0.00000 2 > 4: NEW_POINT - ZERO
0018 0.00400 0.00000 2 }
0019 0.00400 0.00000 2 ApgCii.newPoint_{
0020 0.00400 0.00000 2 > 5: NEW_POINT - HF
0021 0.00400 0.00000 2 }
0022 0.00400 0.00000 2 ApgCii.newPointByDelta_{
0023 0.00400 0.00000 2 > 6: NEW_POINT_DELTA - HFE
0024 0.00400 0.00000 2 }
0025 0.00400 0.00000 2 ApgCii.newPointByDelta_{
0026 0.00400 0.00000 2 > 7: NEW_POINT_DELTA - HTE
0027 0.00600 0.00200 2 }
0028 0.00600 0.00000 2 ApgCii.#drawPolyLine{
0029 0.00600 0.00000 2 > 8: DRAW_POLYLINE
0030 0.00600 0.00000 3 ApgCii.#getPointsByNames{
0031 0.00600 0.00000 3 }
0032 0.00600 0.00000 2 }
0033 0.00600 0.00000 2 ApgCii.newPointByDelta_{
0034 0.00600 0.00000 2 > 9: NEW_POINT_DELTA - hF
0035 0.00600 0.00000 2 }
0036 0.00600 0.00000 2 ApgCii.newPointByDelta_{
0037 0.00600 0.00000 2 > 10: NEW_POINT_DELTA - hF1
0038 0.00600 0.00000 2 }
0039 0.00600 0.00000 2 ApgCii.newPointByDelta_{
0040 0.00800 0.00200 2 > 11: NEW_POINT_DELTA - hT
0041 0.00800 0.00000 2 }
0042 0.00800 0.00000 2 ApgCii.newPointByDelta_{
0043 0.00800 0.00000 2 > 12: NEW_POINT_DELTA - Ceiling1
0044 0.00800 0.00000 2 }
0045 0.00800 0.00000 2 ApgCii.#drawPolyLine{
0046 0.00800 0.00000 2 > 13: DRAW_POLYLINE
0047 0.00800 0.00000 3 ApgCii.#getPointsByNames{
0048 0.00800 0.00000 3 }
0049 0.00800 0.00000 2 }
0050 0.00800 0.00000 2 ApgCii.pushLayer_{
0051 0.00800 0.00000 2 > 14: PUSH_LAYER - Layer_Dimensions
0052 0.00800 0.00000 2 }
0053 0.00800 0.00000 2 ApgCii.#drawLinearDim{
0054 0.01000 0.00200 2 > 15: DRAW_LIN_DIM
0055 0.01000 0.00000 3 ApgCii.#get2PointsByNames{
0056 0.01000 0.00000 4 ApgCii.#getPointsByNames{
0057 0.01000 0.00000 4 }
0058 0.01000 0.00000 3 }
0059 0.01000 0.00000 2 }
0060 0.01000 0.00000 2 ApgCii.#drawLinearDim{
0061 0.01000 0.00000 2 > 16: DRAW_LIN_DIM
0062 0.01000 0.00000 3 ApgCii.#get2PointsByNames{
0063 0.01000 0.00000 4 ApgCii.#getPointsByNames{
0064 0.01000 0.00000 4 }
0065 0.01000 0.00000 3 }
0066 0.01200 0.00200 2 }
0067 0.01200 0.00000 2 ApgCii.#drawLinearDim{
0068 0.01200 0.00000 2 > 17: DRAW_LIN_DIM
0069 0.01200 0.00000 3 ApgCii.#get2PointsByNames{
0070 0.01200 0.00000 4 ApgCii.#getPointsByNames{
0071 0.01200 0.00000 4 }
0072 0.01200 0.00000 3 }
0073 0.01200 0.00000 2 }
0074 0.01400 0.00200 2 ApgCii.#drawLinearDim{
0075 0.01400 0.00000 2 > 18: DRAW_LIN_DIM
0076 0.01400 0.00000 3 ApgCii.#get2PointsByNames{
0077 0.01400 0.00000 4 ApgCii.#getPointsByNames{
0078 0.01400 0.00000 4 }
0079 0.01400 0.00000 3 }
0080 0.01400 0.00000 2 }
0081 0.01400 0.00000 2 ApgCii.newPoint_{
0082 0.01400 0.00000 2 > 19: NEW_POINT - P23
0083 0.01400 0.00000 2 }
0084 0.01400 0.00000 2 ApgCii.newPoint_{
0085 0.01400 0.00000 2 > 20: NEW_POINT - P24
0086 0.01400 0.00000 2 }
0087 0.01600 0.00200 2 ApgCii.popLayer_{
0088 0.01600 0.00000 2 > 21: POP_LAYER
0089 0.01600 0.00000 2 }
0090 0.01600 0.00000 2 ApgCii.pushLayer_{
0091 0.01600 0.00000 2 > 22: PUSH_LAYER - Layer_Annotations
0092 0.01600 0.00000 2 }
0093 0.01600 0.00000 2 ApgCii.#drawAnnotation{
0094 0.01600 0.00000 2 > 23: DRAW_ANNOTATION
0095 0.01600 0.00000 3 ApgCii.#get2PointsByNames{
0096 0.01600 0.00000 4 ApgCii.#getPointsByNames{
0097 0.01600 0.00000 4 }
0098 0.01600 0.00000 3 }
0099 0.01600 0.00000 2 }
0100 0.01600 0.00000 2 ApgCii.popLayer_{
0101 0.01800 0.00200 2 > 24: POP_LAYER
0102 0.01800 0.00000 2 }
0103 0.01800 0.00000 2 ApgCii.pushLayer_{
0104 0.01800 0.00000 2 > 25: PUSH_LAYER - Layer_Debug
0105 0.01800 0.00000 2 }
0106 0.01800 0.00000 2 ApgCii.drawAllPointsWithInfo_{
0107 0.01800 0.00000 2 > 26: DRAW_ALL_POINTS
0108 0.01800 0.00000 2 }
0109 0.01800 0.00000 1 }

Instructions

{"type":"SETUP_BEGIN"}
{"type":"SET_NAME", "name":"JSON TEST 01"}
{"type":"SETUP_END"}
{"type":"NEW_POINT", "name":"ZERO", "x":0, "y":0}
{"type":"NEW_POINT", "name":"HF", "x":0, "y":2550}
{"type":"NEW_POINT_DELTA", "name":"HFE", "origin":"HF", "w":-250, "h":0}
{"type":"NEW_POINT_DELTA", "name":"HTE", "origin":"HFE", "w":0, "h":1000}
{"type":"DRAW_POLYLINE", "points":["HF", "HFE", "HTE"]}
{"type":"NEW_POINT_DELTA", "name":"hF", "origin":"HF", "w":0, "h":125}
{"type":"NEW_POINT_DELTA", "name":"hF1", "origin":"hF", "w":250, "h":0}
{"type":"NEW_POINT_DELTA", "name":"hT", "origin":"hF1", "w":0, "h":800}
{"type":"NEW_POINT_DELTA", "name":"Ceiling1", "origin":"hT", "w":2800, "h":800}
{"type":"DRAW_POLYLINE", "points":["HF", "hF", "hF1", "hT", "Ceiling1"]}
{"type":"PUSH_LAYER", "name":"Layer_Dimensions"}
{"type":"DRAW_LIN_DIM", "points":["ZERO", "HF"], "radious":500, "text":["HF:", ""]}
{"type":"DRAW_LIN_DIM", "points":["hF", "HF"], "radious":500, "text":["hF:", ""]}
{"type":"DRAW_LIN_DIM", "points":["Ceiling1", "hT"], "radious":500, "text":["Roof:", ""], "payload":{"type":2}}
{"type":"DRAW_LIN_DIM", "points":["ZERO", "hT"], "radious":500, "text":["hT:", ""], "payload":{"type":1}}
{"type":"NEW_POINT", "name":"P23", "x":5000, "y":100}
{"type":"NEW_POINT", "name":"P24", "x":5500, "y":800}
{"type":"POP_LAYER"}
{"type":"PUSH_LAYER", "name":"Layer_Annotations"}
{"type":"DRAW_ANNOTATION", "points":["P23", "P24"], "text":["Annotation", "Test", "Multiline", "Will work?"]}
{"type":"POP_LAYER"}
{"type":"PUSH_LAYER", "name":"Layer_Debug"}
{"type":"DRAW_ALL_POINTS", "radious":10}

CAD State

settings

{
  "name": "JSON TEST 01",
  "viewBox": {
    "canvasWidth": 1000,
    "canvasHeight": 562.5,
    "viewPortWidth": 10000,
    "viewPortHeight": 5625,
    "originXDisp": 1000,
    "originYDisp": 562.5
  },
  "background": {
    "draw": true,
    "strokeWidth": 4,
    "strokeColor": "#888888",
    "fillColor": "white"
  },
  "foreGround": {
    "draw": true,
    "strokeWidth": 4,
    "strokeColor": "black",
    "fillColor": "black"
  },
  "grid": {
    "mode": "Lines",
    "gridStep": 100,
    "gridStroke": {
      "color": "green",
      "width": 1,
      "dashPattern": [
        10,
        90
      ],
      "dashOffset": 5
    },
    "drawMajors": true,
    "majorEvery": 1000,
    "majorGridStroke": {
      "color": "cyan",
      "width": 2,
      "dashPattern": [
        10,
        90
      ],
      "dashOffset": 5
    }
  },
  "cartesians": {
    "mode": "Normal",
    "axisStroke": {
      "color": "#888888",
      "width": 4
    },
    "drawTicks": true,
    "tickStroke": {
      "color": "cyan",
      "width": 2
    },
    "ticksStep": 100,
    "ticksSize": 25,
    "drawBigTicks": true,
    "bigTicksEvery": 1000,
    "bigTicksSize": 50,
    "drawBigTicksLables": true,
    "labelsTextStyleName": "CartesianLabel",
    "labelsStyle": {
      "font": "Courier New, Courier, monospace",
      "size": 100,
      "anchor": "middle",
      "italic": true,
      "aspectRatio": 0.6,
      "fill": {
        "color": "#888888",
        "opacity": 1
      }
    }
  },
  "debug": false
}

strokeStyles

[
  "None",
  "Background",
  "Foreground",
  "Grids",
  "Cartesian",
  "Debug",
  "Annotations",
  "Dimensions",
  "Symmetry",
  "Symmetry_Large",
  "Dotted",
  "DottedLarge",
  "Hidden",
  "HiddenLarge",
  "Cartouche",
  "HatchGray",
  "HatchBrown",
  "HatchGreen"
]

fillStyles

[
  "None",
  "Background",
  "Foreground",
  "Debug",
  "Hidden",
  "Dimensions",
  "Annotations",
  "Cartouche"
]

textStyles

[
  "Default",
  "Debug",
  "Mono",
  "Title",
  "Dimensions",
  "Annotations",
  "CartesianLabel"
]

gradients

[
  "LinearLeftToRightLightShadow",
  "LinearLeftToRightDarkShadow",
  "LinearTopToDownLightShadow",
  "LinearTopToDownDarkShadow"
]

patterns

[
  "BackGridLines",
  "BackGridLinesAsDots",
  "CartesianHorizontal",
  "CartesianVertical",
  "Cross1",
  "Cross2",
  "Saltire1",
  "Saltire2",
  "Diagonal1",
  "Diagonal2",
  "Floor1",
  "Floor2",
  "Brick1",
  "Brick2",
  "Roof1",
  "Roof2",
  "RoofTiles1",
  "RoofTiles2"
]

textures

[
  "Wood_Ash",
  "Wood_Oak"
]

blocks

[
  "mechArrow",
  "simpleArrow",
  "archArrow",
  "dotArrow"
]

layers

[
  "Layer_Background",
  "Layer_Grids",
  "Layer_Cartesians",
  "Layer_Annotations",
  "Layer_Dimensions",
  "Layer_Debug",
  "Layer_Hidden",
  "Layer_Zero",
  "Layer_Cartouche"
]

groups

[]