bug fix in selection controls
This commit is contained in:
@@ -50,6 +50,7 @@ function ThreadsGroup() {
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBoxLine") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
||||
intersect.object.type !== "TransformControlsPlane" &&
|
||||
intersect.object.type !== "GridHelper"
|
||||
);
|
||||
|
||||
@@ -78,6 +79,7 @@ function ThreadsGroup() {
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBoxLine") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
||||
intersect.object.type !== "TransformControlsPlane" &&
|
||||
intersect.object.type !== "GridHelper"
|
||||
);
|
||||
if (intersects.length > 0) {
|
||||
|
||||
@@ -149,8 +149,10 @@ const SelectionControls3D: React.FC = () => {
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBoxLine") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
||||
intersect.object.type !== "TransformControlsPlane" &&
|
||||
intersect.object.type !== "GridHelper"
|
||||
);
|
||||
console.log("intersects: ", intersects);
|
||||
if (intersects.length > 0) {
|
||||
const intersect = intersects[0];
|
||||
const intersectObject = intersect.object;
|
||||
|
||||
@@ -111,6 +111,7 @@ const MeasurementTool = () => {
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBoxLine") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
||||
intersect.object.type !== "TransformControlsPlane" &&
|
||||
intersect.object.type !== "GridHelper"
|
||||
);
|
||||
|
||||
@@ -176,6 +177,7 @@ const MeasurementTool = () => {
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBoxLine") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
||||
intersect.object.type !== "TransformControlsPlane" &&
|
||||
intersect.object.type !== "GridHelper"
|
||||
);
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ function TriggerConnector() {
|
||||
const { gl, raycaster, scene, pointer, camera } = useThree();
|
||||
const { subModule } = useSubModuleStore();
|
||||
const { eventStore, productStore, versionStore } = useSceneContext();
|
||||
const { products, getPointByUuid, getIsEventInProduct, getActionByUuid, addTrigger, removeTrigger, addEvent, getEventByModelUuid, getPointUuidByActionUuid, getProductById, selectedProduct } = productStore();
|
||||
const { products, getPointByUuid, getIsEventInProduct, getActionByUuid, addTrigger, removeTrigger, addEvent, getEventByModelUuid, getPointUuidByActionUuid, getProductById, selectedProduct } =
|
||||
productStore();
|
||||
const { selectedAsset, clearSelectedAsset } = useSelectedAsset();
|
||||
const [hoveredLineKey, setHoveredLineKey] = useState<string | null>(null);
|
||||
const groupRefs = useRef<Record<string, any>>({});
|
||||
@@ -370,7 +371,25 @@ function TriggerConnector() {
|
||||
useFrame(() => {
|
||||
if (firstSelectedPoint) {
|
||||
raycaster.setFromCamera(pointer, camera);
|
||||
const intersects = raycaster.intersectObjects(scene.children, true).filter((intersect) => !intersect.object.name.includes("Roof") && !intersect.object.name.includes("MeasurementReference") && !intersect.object.name.includes("agv-collider") && !intersect.object.name.includes("zonePlane") && !intersect.object.name.includes("SelectionGroup") && !intersect.object.name.includes("selectionAssetGroup") && !intersect.object.name.includes("SelectionGroupBoundingBoxLine") && !intersect.object.name.includes("SelectionGroupBoundingBox") && !intersect.object.name.includes("SelectionGroupBoundingLine") && intersect.object.type !== "GridHelper" && !intersect.object.name.includes("ArrowWithTube") && !intersect.object.parent?.name.includes("Zone") && intersect.object.type !== "Line2");
|
||||
const intersects = raycaster
|
||||
.intersectObjects(scene.children, true)
|
||||
.filter(
|
||||
(intersect) =>
|
||||
!intersect.object.name.includes("Roof") &&
|
||||
!intersect.object.name.includes("MeasurementReference") &&
|
||||
!intersect.object.name.includes("agv-collider") &&
|
||||
!intersect.object.name.includes("zonePlane") &&
|
||||
!intersect.object.name.includes("SelectionGroup") &&
|
||||
!intersect.object.name.includes("selectionAssetGroup") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBoxLine") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
||||
intersect.object.type !== "GridHelper" &&
|
||||
!intersect.object.name.includes("ArrowWithTube") &&
|
||||
!intersect.object.parent?.name.includes("Zone") &&
|
||||
intersect.object.type !== "TransformControlsPlane" &&
|
||||
intersect.object.type !== "Line2"
|
||||
);
|
||||
|
||||
let point: THREE.Vector3 | null = null;
|
||||
|
||||
@@ -476,7 +495,16 @@ function TriggerConnector() {
|
||||
|
||||
{currentLine && (
|
||||
<>
|
||||
<QuadraticBezierLine start={currentLine.start.toArray()} end={currentLine.end.toArray()} mid={currentLine.mid.toArray()} color={helperLineColor} lineWidth={4} dashed dashSize={1} dashScale={20} />
|
||||
<QuadraticBezierLine
|
||||
start={currentLine.start.toArray()}
|
||||
end={currentLine.end.toArray()}
|
||||
mid={currentLine.mid.toArray()}
|
||||
color={helperLineColor}
|
||||
lineWidth={4}
|
||||
dashed
|
||||
dashSize={1}
|
||||
dashScale={20}
|
||||
/>
|
||||
<ArrowOnQuadraticBezier start={currentLine.start.toArray()} mid={currentLine.mid.toArray()} end={currentLine.end.toArray()} color={helperLineColor} />
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -124,6 +124,7 @@ export default function Dropped3dWidgets() {
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBoxLine") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
||||
intersect.object.type !== "TransformControlsPlane" &&
|
||||
intersect.object.type !== "GridHelper"
|
||||
);
|
||||
|
||||
@@ -166,6 +167,7 @@ export default function Dropped3dWidgets() {
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBoxLine") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
||||
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
||||
intersect.object.type !== "TransformControlsPlane" &&
|
||||
intersect.object.type !== "GridHelper"
|
||||
);
|
||||
// Update widget's position in memory
|
||||
|
||||
Reference in New Issue
Block a user