Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinity rendered in svg #48

Closed
seveibar opened this issue Sep 6, 2024 · 4 comments
Closed

Infinity rendered in svg #48

seveibar opened this issue Sep 6, 2024 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@seveibar
Copy link
Contributor

seveibar commented Sep 6, 2024

image

Soup that reproduces:

[
  {
    "type": "source_port",
    "source_port_id": "source_port_0",
    "name": "pin1",
    "pin_number": 1,
    "port_hints": [
      "pin1",
      "1"
    ],
    "source_component_id": "source_component_0"
  },
  {
    "type": "source_port",
    "source_port_id": "source_port_1",
    "name": "pin2",
    "pin_number": 2,
    "port_hints": [
      "pin2",
      "2"
    ],
    "source_component_id": "source_component_0"
  },
  {
    "type": "source_component",
    "source_component_id": "source_component_0",
    "ftype": "simple_chip",
    "name": "U1"
  },
  {
    "type": "schematic_component",
    "schematic_component_id": "schematic_component_0",
    "center": {
      "x": 0,
      "y": 0
    },
    "rotation": 0,
    "size": {
      "width": 0.4,
      "height": 0.4
    },
    "pin_spacing": 0.2,
    "source_component_id": "source_component_0"
  },
  {
    "type": "schematic_port",
    "schematic_port_id": "schematic_port_0",
    "schematic_component_id": "schematic_component_0",
    "center": {
      "x": 0,
      "y": 0
    },
    "source_port_id": "source_port_0",
    "facing_direction": "up"
  },
  {
    "type": "schematic_port",
    "schematic_port_id": "schematic_port_1",
    "schematic_component_id": "schematic_component_0",
    "center": {
      "x": 0,
      "y": 0
    },
    "source_port_id": "source_port_1",
    "facing_direction": "up"
  },
  {
    "type": "pcb_component",
    "pcb_component_id": "pcb_component_0",
    "center": {
      "x": 0,
      "y": 0
    },
    "width": null,
    "height": null,
    "layer": "top",
    "rotation": 0,
    "source_component_id": "source_component_0"
  },
  {
    "type": "pcb_board",
    "pcb_board_id": "pcb_board_0",
    "center": {
      "x": 0,
      "y": 0
    },
    "width": 10,
    "height": 10
  },
  {
    "type": "pcb_smtpad",
    "pcb_smtpad_id": "pcb_smtpad_0",
    "pcb_component_id": null,
    "pcb_port_id": null,
    "layer": "top",
    "shape": "rect",
    "width": 1,
    "height": 1,
    "port_hints": [
      "pin1"
    ],
    "x": -2.5,
    "y": 1.25
  },
  {
    "type": "pcb_smtpad",
    "pcb_smtpad_id": "pcb_smtpad_1",
    "pcb_component_id": null,
    "pcb_port_id": null,
    "layer": "top",
    "shape": "rect",
    "width": 1,
    "height": 1,
    "port_hints": [
      "pin2"
    ],
    "x": 2.5,
    "y": 1.25
  },
  {
    "type": "pcb_hole",
    "pcb_hole_id": "pcb_hole_0",
    "hole_shape": "round",
    "hole_diameter": 1,
    "x": 0,
    "y": -1.25
  },
  {
    "type": "pcb_port",
    "pcb_port_id": "pcb_port_0",
    "pcb_component_id": "pcb_component_0",
    "layers": [
      "top"
    ],
    "x": -2.5,
    "y": 1.25,
    "source_port_id": "source_port_0"
  },
  {
    "type": "pcb_port",
    "pcb_port_id": "pcb_port_1",
    "pcb_component_id": "pcb_component_0",
    "layers": [
      "top"
    ],
    "x": 2.5,
    "y": 1.25,
    "source_port_id": "source_port_1"
  }
]
@seveibar seveibar added the good first issue Good for newcomers label Sep 9, 2024
@jarek-foksa
Copy link

I would replace Infinity with 8388608 (256 x 256 x 256 / 2). In theory it could be a much larger number, but in practice browsers such as Chrome don't handle properly attributes with huge numeric values.

Copy link

homie-gg bot commented Sep 13, 2024

This might have already been done via: updated /soup dependency.

Copy link

homie-gg bot commented Sep 16, 2024

This might have already been done via: updated circuit-to-svg and dependency.

@imrishabh18 imrishabh18 self-assigned this Sep 16, 2024
@imrishabh18
Copy link
Member

This is fixed now, tested in the main and I don't see the Infinity issue in svg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants