routing.wires#
Wires.
- class routing.wires.AWGWire(waypoints, n, name='')[source]#
Bases:
WireAWGWire object.
- Parameters:
waypoints (waypoints) – waypoints
n (n) – n
name (str, optional, defaults to ‘’) – name
- class routing.wires.IECWire(waypoints, section, name='')[source]#
Bases:
WireIECWire object.
- Parameters:
waypoints (waypoints) – waypoints
section (section) – section
name (str, optional, defaults to ‘’) – name of IECWire
- class routing.wires.JunctionWire(point1: Point3D, tangeancy1: Vector3D, point2: Point3D, tangeancy2: Vector3D, targeted_length: float, diameter: float, targeted_curvature: float | None = None, name: str = '')[source]#
Bases:
WireJunctionWire object.
- Parameters:
point1 (volmdlr.Point3D) – point1
tangeancy1 (volmdlr.Vector3D) – tangeancy1
point2 (volmdlr.Point3D) – point2
tangeancy2 (volmdlr.Vector3D) – tangeancy2
targeted_length (float) – targeted_length
diameter (float) – diameter
targeted_curvature (float) – targeted_curvature
name (str, optional, defaults to ‘’) – Name of JunctionWire
- classmethod curvature_radius(point1: Point3D, tangeancy1: Vector3D, point2: Point3D, tangeancy2: Vector3D, targeted_curv: float, diameter: float, length_min: float, length_max: float, quick: bool = False, name: str = '')[source]#
- classmethod dict_to_object(dict_: Dict[str, Any], force_generic: bool = False, global_dict=None, pointers_memo: dict[str, Any] | None = None, path: str = '#')[source]#
Generic dict_to_object method.
- distance_to_shell(shell: OpenTriangleShell3D, precision: float = 0.001, return_points: bool = False)[source]#
- distance_to_trimesh_shell(trimesh_shell, precision: float = 0.001, return_points: bool = False)[source]#
- classmethod from_min_distance(point1: Point3D, tangeancy1: Vector3D, point2: Point3D, tangeancy2: Vector3D, targeted_curv: float, diameter: float, length_min: float, length_max: float, list_point_cloud, name: str = '')[source]#
- classmethod n_junction_wires(points, curvature_radius, diameter, tangent_start=None, tangent_end=None, avg_length=0)[source]#
- class routing.wires.JunctionWireGenerator(point1: Point3D, tangent1: Vector3D, point2: Point3D, name: str = '')[source]#
Bases:
Object3DJunctionWireGenerator object.
- Parameters:
point1 (volmdlr.Point3D) – point1
tangent1 (volmdlr.Vector3D) – tangent1
point2 (volmdlr.Point3D) – point2
name (str, optional, defaults to ‘’) – Name of JunctionWireGenerator
- class routing.wires.JunctionWireTangentOptimizer(junction_wire: JunctionWire, tangent2: Vector3D, range_theta: tuple[float, float], range_alpha: tuple[float, float], lmax: float, lmin: float, list_point_cloud3d: PointCloud3D | None = None, name: str = '')[source]#
Bases:
DessiaObjectJunctionWireTangentOptimizer object.
- Parameters:
junction_wire (JunctionWire) – junction_wire
tangent1 (volmdlr.Vector3D) – tangent1
range_theta (Tuple[float, float]) – range_theta
range_alpha (Tuple[float, float]) – range_alpha
lmax (float) – lmax
lmin (float) – lmin
list_point_cloud3d (cloud.PointCloud3D) – list_point_cloud3d
name (str, optional, defaults to ‘’) – Name of JunctionWireGenerator
- class routing.wires.RoutingSpec(source: Point3D, destination: Point3D, diameter: float, color: tuple[float, float, float] | None = None, curvature_radius: float = 0, name: str = '')[source]#
Bases:
DessiaObjectRoutingSpec object.
- Parameters:
source (volmdlr.Point3D) – source
destination (volmdlr.Point3D) – destination
diameter (float) – diameter
color (Tuple[float, float, float]) – color
name (str, optional, defaults to ‘’) – Name of RoutingSpec
- class routing.wires.Wire(waypoints: list[Point3D], diameter: float, color: tuple[float, float, float] | None = None, name: str = '')[source]#
Bases:
Object3D- Parameters:
waypoints – a list of volmdlr.Point3D waypoints
- classmethod dict_to_object(dict_: Dict[str, Any], force_generic: bool = False, global_dict=None, pointers_memo: dict[str, Any] | None = None, path: str = '#')[source]#
Generic dict_to_object method.
- property path#
- class routing.wires.WireHarness(wires: list[Wire], name: str = '')[source]#
Bases:
DessiaObjectWireHarness object.
- Parameters:
wires (List[Wire]) – wires
name (str, optional, defaults to ‘’) – Name of WireHarness
- class routing.wires.Wiring(single_wires: list[Wire], wire_harnesses: list[WireHarness], dicts_section: list[dict] | None = None, vol_weight: float = 0, fixation_zones: list[WiringFixationZone] | None = None, env_temp: VolumeModel | None = None, color: tuple[float, float, float] = (0.5725490196078431, 0.42745098039215684, 0.15294117647058825), name: str = '')[source]#
Bases:
Object3DDefines a combination of single wires and wire harnesses.
- combined_dict_connected()[source]#
Function that returns a dictionary with the linked between simple wire and combined. Self has to be a non combined solution.
- Returns:
A dictionary of linked between wires.
- Return type:
dict
- property graph#
- property length#
- length_(estimate=False)[source]#
Gives the cumulative length of wires.
- Parameters:
estimate – If set to True, compute the length without the raddi of wires
- property number_branch#
- property number_derivations#
- plot(x3d=Vector3D(1.0, 0.0, 0.0), y3d=Vector3D(0.0, 1.0, 0.0), ax=None, breaking_points=False, target=False)[source]#
Generic plot getting plot_data function to plot.
- property total_length_m#
- volmdlr_primitives(add_env: bool = True)[source]#
Get Primitive3D objects representing the 3D geometry.
This method must be implemented by subclasses to provide their 3D geometric representation.
- Returns:
List of Primitive3D objects
- Raises:
NotImplementedError – If not implemented by subclass
- property volume#
- property wire_mass_kg#
- property wires_from_waypoints#
Create wire from waypoints.
- class routing.wires.WiringFixationZone(start: Point3D, end: Point3D, edges: list[LineSegment3D], name: str = '')[source]#
Bases:
DessiaObjectDefines zone where a fixation is possible.
- property length#
- class routing.wires.WiringResult(wirings: list[Wiring], env_displace: list[Stl] | None = None, env_displacement: list[Frame3D] | None = None, env_fix: list[Stl] | None = None, initial_wirings: list[Wiring] | None = None, distance_multiplier: float = 0.001, env_tempo: VolumeModel | None = None, name: str = '')[source]#
Bases:
Object3DWiringResult object.
- Parameters:
wirings (List[Wiring]) – wirings
env_displace (List[volmdlr.stl.Stl]) – env_displace
env_displacement (List[volmdlr.Frame3D]) – env_displacement
env_fix (List[volmdlr.stl.Stl]) – env_fix
initial_wirings (List[Wiring]) – initial_wirings
distance_multiplier (float) – distance_multiplier
name (str, optional, defaults to ‘’) – Name of WiringResult
- class routing.wires.WiringResults(wiring_results: list[WiringResult], env_tempo: VolumeModel | None = None, name: str = '')[source]#
Bases:
Object3DWiringResults object.
- Parameters:
wiring_results (List[WiringResult]) – wiring_results
env_tempo (volmdlr.core.VolumeModel) – env_tempo
name (str, optional, defaults to ‘’) – Name of WiringResults