Is it possible to add logical gates like OR/AND gates to component diagram?

0 votes
asked Oct 3, 2023 in Wanted features by Marcus

Is it possible to provide logical OR/AND gates as shapes in the component diagrams?
 

2 Answers

0 votes
answered Mar 12 by dickmaley (4,120 points) 1 flag

It’s possible to represent logical OR and AND gates in PlantUML component diagrams by using custom shapes or annotations, though PlantUML doesn’t natively provide specific symbols for logic gates like a dedicated digital circuit design tool would. PlantUML is primarily designed for UML diagrams (e.g., component, class, sequence diagrams), but it’s flexible enough to allow customization through its syntax. Here's how you can approach this:

image

@startuml
[OR Gate] #--> [Output]
[Input 1] --> [OR Gate]
[Input 2] --> [OR Gate]

[AND Gate] #--> [Output]
[Input 3] --> [AND Gate]
[Input 4] --> [AND Gate]
@enduml

0 votes
answered 5 days ago by kirchsth (7,480 points)

Martin found a solution, details see https://forum.plantuml.net/13081/logic-symbols-inside-plant-uml?show=13089#a13089
.
And I updated with some svg which I found, click on the image



BR Helmut

...