Skip to content

Commit

Permalink
added local point cloud model for architecture storybook example (#4938)
Browse files Browse the repository at this point in the history
  • Loading branch information
pramod-cog authored Dec 9, 2024
1 parent b1ee799 commit 8389d3a
Show file tree
Hide file tree
Showing 200 changed files with 307 additions and 4 deletions.
19 changes: 15 additions & 4 deletions react-components/stories/Architecture.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import type { Meta, StoryObj } from '@storybook/react';
import { CadModelContainer, RevealButtons, RevealCanvas } from '../src';
import { CadModelContainer, PointCloudContainer, RevealButtons, RevealCanvas } from '../src';
import { Color } from 'three';
import { type ReactNode, type ReactElement } from 'react';
import { RevealStoryContext } from './utilities/RevealStoryContainer';
Expand Down Expand Up @@ -32,11 +32,15 @@ export const Main: Story = {
addModelOptions: getAddModelOptionsFromUrl('/primitives')
},
render: ({ addModelOptions }: { addModelOptions: AddModelOptions }) => {
const pointCloudModelOptions = getAddModelOptionsFromUrl('/pointcloud');
return (
<RevealStoryContext color={new Color(0x4a4a4a)} viewerOptions={{}}>
<PointsOfInterestSidePanel>
<RevealCanvas>
<StoryContent addModelOptions={addModelOptions} />
<StoryContent
cadModelOptions={addModelOptions}
pointCloudModelOptions={pointCloudModelOptions}
/>
</RevealCanvas>
</PointsOfInterestSidePanel>
<MainToolbar />
Expand All @@ -48,16 +52,23 @@ export const Main: Story = {
}
};

function StoryContent({ addModelOptions }: { addModelOptions: AddModelOptions }): ReactElement {
function StoryContent({
cadModelOptions,
pointCloudModelOptions
}: {
cadModelOptions: AddModelOptions;
pointCloudModelOptions: AddModelOptions;
}): ReactElement {
const renderTarget = useRenderTarget();
return (
<>
<CadModelContainer
addModelOptions={addModelOptions}
addModelOptions={cadModelOptions}
onLoad={(_model: CogniteCadModel) => {
renderTarget.onStartup();
}}
/>
<PointCloudContainer addModelOptions={pointCloudModelOptions} />
</>
);
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
198 changes: 198 additions & 0 deletions react-components/stories/public/pointcloud/ept-hierarchy/0-0-0-0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
{
"0-0-0-0": 4421,
"1-0-0-0": 5301,
"1-0-1-0": 15511,
"2-0-2-1": 2602,
"2-1-2-1": 60201,
"3-2-4-3": 62389,
"4-4-8-6": 5649,
"4-4-9-6": 4140,
"4-5-8-6": 41449,
"5-10-17-12": 4591,
"5-11-16-12": 34321,
"5-11-16-13": 4788,
"5-11-17-12": 33123,
"4-5-9-6": 93749,
"3-2-5-3": 14701,
"3-3-4-3": 111921,
"4-6-8-6": 117647,
"5-12-16-12": 102617,
"6-24-33-25": 46643,
"6-25-33-25": 118867,
"7-50-66-51": 3123,
"7-50-67-50": 45884,
"7-50-67-51": 8612,
"7-51-66-51": 2065,
"7-51-67-50": 78076,
"7-51-67-51": 20818,
"5-12-16-13": 17960,
"5-12-17-12": 76283,
"6-24-34-25": 71545,
"6-24-35-25": 41379,
"6-25-34-25": 44913,
"7-50-68-50": 79815,
"7-50-69-50": 108934,
"7-51-68-50": 96653,
"7-51-69-50": 2259,
"6-25-35-25": 55774,
"7-50-70-50": 67982,
"7-50-71-50": 5624,
"7-51-70-50": 111371,
"7-51-71-50": 10405,
"5-13-16-12": 117659,
"6-26-33-25": 119083,
"7-52-67-50": 47053,
"7-52-67-51": 16808,
"7-53-66-51": 3476,
"7-53-67-50": 22498,
"7-53-67-51": 3098,
"6-27-33-25": 117752,
"7-54-66-51": 1722,
"7-54-67-50": 69373,
"7-54-67-51": 34399,
"7-55-66-51": 1503,
"7-55-67-50": 103013,
"8-110-134-101": 2402,
"8-110-135-100": 13028,
"8-110-135-101": 7087,
"8-111-134-101": 2967,
"8-111-135-100": 18447,
"8-111-135-101": 9620,
"7-55-67-51": 11176,
"5-13-16-13": 55368,
"5-13-17-12": 84877,
"6-26-34-25": 96896,
"7-52-68-50": 83796,
"7-52-69-50": 61905,
"8-104-138-100": 22309,
"8-104-139-100": 25893,
"8-105-138-100": 7209,
"8-105-138-101": 3110,
"8-105-139-100": 4326,
"7-53-68-50": 16164,
"7-53-69-50": 29082,
"6-26-35-25": 52697,
"7-52-70-50": 50240,
"7-52-71-50": 8187,
"7-53-70-50": 13013,
"7-53-71-50": 3099,
"6-27-34-25": 50827,
"7-54-68-50": 86272,
"7-54-69-50": 98543,
"7-55-68-50": 80370,
"7-55-69-50": 46220,
"6-27-35-25": 52889,
"7-54-70-50": 27286,
"7-54-71-50": 3865,
"7-55-70-50": 73694,
"7-55-71-50": 6026,
"4-6-9-6": 48805,
"5-12-18-12": 112541,
"5-12-19-12": 10338,
"5-13-18-12": 84152,
"5-13-19-12": 51452,
"6-26-38-25": 98677,
"6-26-39-25": 39515,
"6-27-38-25": 51392,
"6-27-39-25": 32082,
"5-13-19-13": 7786,
"4-7-8-6": 117834,
"5-14-16-12": 117709,
"6-28-33-25": 118207,
"7-56-66-51": 3551,
"7-56-67-50": 109184,
"7-56-67-51": 26817,
"7-57-66-51": 10731,
"7-57-67-50": 85488,
"8-114-135-100": 5900,
"8-114-135-101": 3604,
"8-115-134-101": 5832,
"8-115-135-100": 19551,
"8-115-135-101": 5522,
"7-57-67-51": 35764,
"6-29-33-25": 118599,
"7-58-66-50": 2371,
"7-58-66-51": 17338,
"7-58-67-50": 118389,
"8-116-134-101": 13569,
"8-116-135-100": 60201,
"8-116-135-101": 22793,
"8-117-134-100": 4379,
"8-117-134-101": 20557,
"8-117-135-100": 66633,
"8-117-135-101": 23746,
"7-58-67-51": 14265,
"7-59-66-50": 6771,
"7-59-67-50": 117647,
"8-118-134-100": 15322,
"8-118-134-101": 21491,
"8-118-135-100": 33902,
"8-118-135-101": 4105,
"8-119-134-100": 4053,
"8-119-134-101": 6590,
"8-119-135-100": 17779,
"8-119-135-101": 7870,
"7-59-67-51": 30086,
"5-14-16-13": 11902,
"5-14-17-12": 117647,
"6-28-34-25": 117647,
"7-56-68-50": 98599,
"8-112-136-100": 23640,
"8-112-137-100": 10833,
"8-112-137-101": 14121,
"8-113-136-100": 15055,
"8-113-136-101": 3963,
"8-113-137-100": 28033,
"8-113-137-101": 12481,
"7-56-68-51": 9006,
"7-56-69-50": 83016,
"8-112-138-100": 5213,
"8-112-138-101": 10355,
"8-112-139-100": 26262,
"8-113-138-100": 28566,
"8-113-138-101": 15405,
"8-113-139-100": 11470,
"7-56-69-51": 10230,
"7-57-68-50": 62920,
"8-114-136-100": 3877,
"8-114-137-100": 2272,
"8-114-137-101": 2419,
"8-115-136-100": 26650,
"8-115-137-100": 22586,
"7-57-68-51": 17194,
"7-57-69-50": 75621,
"7-57-69-51": 6848,
"6-28-35-25": 64035,
"7-56-70-50": 47187,
"7-56-71-50": 15164,
"7-57-70-50": 20150,
"7-57-71-50": 3741,
"6-29-34-25": 48333,
"7-58-68-50": 51683,
"7-58-69-50": 102329,
"7-59-68-50": 86871,
"7-59-69-50": 93833,
"6-29-35-25": 75497,
"5-15-16-12": 45597,
"6-30-33-25": 78604,
"6-31-33-25": 4183,
"5-15-16-13": 13239,
"5-15-17-12": 54415,
"6-30-34-25": 96412,
"6-30-35-25": 35489,
"6-31-34-25": 7861,
"6-31-35-25": 1490,
"4-7-9-6": 41480,
"5-14-18-12": 65734,
"5-14-19-12": 60316,
"5-14-19-13": 2710,
"5-15-18-12": 30046,
"5-15-19-12": 47317,
"5-15-19-13": 1737,
"3-3-5-3": 3924,
"1-1-1-0": 4215,
"2-2-2-1": 15726,
"3-4-4-3": 38048,
"4-8-8-6": 62525,
"4-8-9-6": 70897
}
71 changes: 71 additions & 0 deletions react-components/stories/public/pointcloud/ept.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"bounds": [
-217.5,
-270.0,
-197.5,
282.5,
230.0,
302.5
],
"hierarchyType": "json",
"points": 7915942,
"span": 256,
"srs": {},
"boundsConforming": [
-180.0,
-270.0,
-5.0,
245.0,
230.0,
110.0
],
"schema": [
{
"name": "X",
"type": "signed",
"size": 4,
"scale": 0.0001,
"offset": -0.0073100000000000005
},
{
"name": "Y",
"type": "signed",
"size": 4,
"scale": 0.0001,
"offset": 3.07735
},
{
"name": "Z",
"type": "signed",
"size": 4,
"scale": 0.0001,
"offset": -1.7703900000000001
},
{
"name": "Red",
"type": "unsigned",
"size": 1
},
{
"name": "Green",
"type": "unsigned",
"size": 1
},
{
"name": "Blue",
"type": "unsigned",
"size": 1
},
{
"name": "Intensity",
"type": "unsigned",
"size": 1
},
{
"name": "Classification",
"type": "unsigned",
"size": 1
}
],
"dataType": "binary"
}
23 changes: 23 additions & 0 deletions react-components/stories/public/pointcloud/filterOptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"useBlackFilter": true,
"useIntensityFilter": true,
"minIntensity": -1,
"useDistanceFilter": false,
"maxDistance": 30.0,
"useDensityFilter": false,
"filterVoxelSize": 0.01,
"minNumberOfPointsInVoxel": 1,
"densityFilterMethod": 2,
"colorFilterMethod": 1,
"outlierFilterType": 1,
"separationDistance": 5.0,
"minNumberOfPointsInOneCluster": 100,
"generateTiles": false,
"tileSize": 5.0,
"rotationAngleInDegrees": 0.0,
"excludeBoundingBoxes": [],
"excludeCylinders": [],
"classificationMethod": "",
"runFilteringInParallel": true,
"extractPhotosphereImages": false
}

0 comments on commit 8389d3a

Please sign in to comment.