feat(invdes): FXC-4605 added priority attribute to TopologyDesignRegion #3106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added the priority attribute to TopologyDesignRegion to enable manual control of structures in overlapping regions. Previously a static structure of priority=1 would always override the TopologyDesignRegion.
Greptile Summary
This PR adds a
priorityattribute toTopologyDesignRegionto enable manual control of structure overlapping behavior, matching the functionality already available in theStructureclass. The implementation correctly passes the priority value through to the created structure.priorityfield toTopologyDesignRegionclass with the same definition asStructure.priorityto_structure()method to pass priority when creating the structureConfidence Score: 5/5
Structureclass. The field definition is identical to the existingpriorityfield, and the change only adds passthrough functionality without modifying existing behavior.Important Files Changed
priorityfield toTopologyDesignRegionclass, matching theStructureclass definition, and passed it through to the created structureSequence Diagram
sequenceDiagram participant User participant TopologyDesignRegion participant Structure participant Simulation User->>TopologyDesignRegion: Create with priority=1 Note over TopologyDesignRegion: Store priority field User->>TopologyDesignRegion: Call to_structure(params) TopologyDesignRegion->>TopologyDesignRegion: Compute eps_values(params) TopologyDesignRegion->>TopologyDesignRegion: Create CustomMedium with permittivity TopologyDesignRegion->>Structure: Create Structure(geometry, medium, priority) Structure-->>TopologyDesignRegion: Return Structure with priority=1 TopologyDesignRegion-->>User: Return Structure User->>Simulation: Add Structure to simulation Note over Simulation: Apply priority rules in overlapping regions Note over Simulation: Higher priority structure takes precedence