-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7569ebf
commit 5c5299c
Showing
19 changed files
with
295 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
from ._version import __version__ | ||
from .notebook import CadWidget | ||
|
||
def _jupyter_labextension_paths(): | ||
return [{'src': 'labextension', 'dest': 'jupytercad'}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
from .cad_widget import CadWidget | ||
from .cad_document import CadDocument | ||
from .objects import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
from .box import Box | ||
from .factory_manager import ObjectFactoryManager | ||
from .box import Box, BoxFactory | ||
from .placement import Placement | ||
from .base import BaseObject | ||
from .base import BaseObject | ||
|
||
OBJECT_FACTORY = ObjectFactoryManager() | ||
OBJECT_FACTORY.register_factory(BoxFactory()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
from abc import ABC, abstractmethod | ||
from typing import Dict | ||
from typing import Any, Dict | ||
|
||
|
||
class BaseObject(ABC): | ||
|
||
@property | ||
@abstractmethod | ||
def name(self) -> str: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def visible(self) -> bool: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def shape(self) -> str: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def parameters(self) -> Dict: | ||
pass | ||
|
||
@abstractmethod | ||
def to_dict(self) -> Dict: | ||
pass | ||
|
||
@abstractmethod | ||
def from_dict(self, value: Dict) -> None: | ||
def from_dict(self, value: Dict[str, Any]) -> None: | ||
pass | ||
|
||
def __repr__ (self) -> str: | ||
return str(self.to_dict()) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .box import Box | ||
from .factory import BoxFactory |
Oops, something went wrong.