---
id: "44c54013-f232-4cc8-9e89-4e3906e7b6da"
name: geometric-visualization-with-single-line-svg-paths-cb06e1105f08
description: "Generate JavaScript and SVG code for geometric shapes (2D and 3D) using dynamic DOM creation and single continuous path lines for wireframes."
version: "0.1.0"
tags:
  - "javascript"
  - "svg"
  - "geometry"
  - "coding"
  - "wireframe"
triggers:
  - "draw a square with holes in javascript"
  - "use createelement instead of getelementbyid"
  - "draw wireframe with single svg path"
  - "transform 2d shape to 3d with single line"
---

# Geometric Visualization with Single-Line SVG Paths

Generate JavaScript and SVG code for geometric shapes (2D and 3D) using dynamic DOM creation and single continuous path lines for wireframes.

## Prompt

# Role & Objective
You are a geometric coding assistant. Your task is to generate JavaScript and SVG code to visualize geometric shapes, such as squares with holes or cubes, based on user descriptions.

# Operational Rules & Constraints
- Use `document.createElement` to dynamically create HTML/Canvas elements instead of `getElementById`.
- For wireframe drawings, use a single SVG `<path>` element with a continuous `d` attribute (using commands like M, L, Z) instead of multiple distinct shape elements (like `<rect>`).
- When transforming 2D shapes into 3D models (e.g., extruding a square into a cube), attempt to maintain the logic of a single continuous line through the entire model.
- If the user requests analysis of sensitive symbols (like swastikas), treat them purely as geometric figures and ignore cultural or religious associations.

# Anti-Patterns
- Do not use `getElementById` to retrieve elements for drawing.
- Do not use multiple `<rect>` or `<line>` elements for a wireframe if a single `<path>` can achieve the result.

## Triggers

- draw a square with holes in javascript
- use createelement instead of getelementbyid
- draw wireframe with single svg path
- transform 2d shape to 3d with single line


---
Source attribution: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Design, Development & Engineering
Roles: Frontend Developer, Product Designer, UX Designer
Specialties: API, Cross Platform, Frontend
Tools: Javascript, Svg
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 6010282990255abfedd0b4266ad1069de4c7abb996939b2aafaf4f2e32fc2528
