-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from joe-warren/add-lofts
Add Lofts
- Loading branch information
Showing
45 changed files
with
613 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <BRepBuilderAPI_MakeVertex.hxx> | ||
#include "hs_BRepBuilderAPI_MakeVertex.h" | ||
#include <TopoDS_Vertex.hxx> | ||
|
||
BRepBuilderAPI_MakeVertex * hs_new_BRepBuilderAPI_MakeVertex_fromPnt(gp_Pnt* pnt){ | ||
return new BRepBuilderAPI_MakeVertex(*pnt); | ||
} | ||
|
||
void hs_delete_BRepBuilderAPI_MakeVertex(BRepBuilderAPI_MakeVertex* builder){ | ||
delete builder; | ||
} | ||
|
||
TopoDS_Vertex * hs_BRepBuilderAPI_MakeVertex_vertex(BRepBuilderAPI_MakeVertex * builder){ | ||
return new TopoDS_Vertex(builder->Vertex()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef HS_BREPBUILDERAPI_MAKEVERTEX_H | ||
#define HS_BREPBUILDERAPI_MAKEVERTEX_H | ||
|
||
#include "hs_types.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
BRepBuilderAPI_MakeVertex * hs_new_BRepBuilderAPI_MakeVertex_fromPnt(gp_Pnt* pnt); | ||
|
||
void hs_delete_BRepBuilderAPI_MakeVertex(BRepBuilderAPI_MakeVertex* builder); | ||
|
||
TopoDS_Vertex * hs_BRepBuilderAPI_MakeVertex_vertex(BRepBuilderAPI_MakeVertex * builder); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // HS_BREPBUILDERAPI_MAKEVERTEX_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <BRepOffsetAPI_ThruSections.hxx> | ||
#include "hs_BRepOffsetAPI_ThruSections.h" | ||
|
||
BRepOffsetAPI_ThruSections * hs_new_BRepOffsetAPI_ThruSections(bool isSolid, bool ruled, double pres3d){ | ||
return new BRepOffsetAPI_ThruSections(isSolid, ruled, pres3d); | ||
} | ||
|
||
void hs_delete_BRepOffsetAPI_ThruSections(BRepOffsetAPI_ThruSections* thruSections){ | ||
delete thruSections; | ||
} | ||
|
||
void hs_BRepOffsetAPI_ThruSections_addWire(BRepOffsetAPI_ThruSections* thruSections, TopoDS_Wire * wire){ | ||
thruSections->AddWire(*wire); | ||
} | ||
|
||
void hs_BRepOffsetAPI_ThruSections_addVertex(BRepOffsetAPI_ThruSections* thruSections, TopoDS_Vertex* vertex){ | ||
thruSections->AddVertex(*vertex); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
#ifndef HS_BREPOFFSETAPI_THRUSECTIONS_H | ||
#define HS_BREPOFFSETAPI_THRUSECTIONS_H | ||
|
||
#include "hs_types.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
BRepOffsetAPI_ThruSections * hs_new_BRepOffsetAPI_ThruSections(bool isSolid, bool ruled, double pres3d); | ||
|
||
void hs_delete_BRepOffsetAPI_ThruSections(BRepOffsetAPI_ThruSections* thruSections); | ||
|
||
void hs_BRepOffsetAPI_ThruSections_addWire(BRepOffsetAPI_ThruSections* thruSections, TopoDS_Wire * wire); | ||
|
||
void hs_BRepOffsetAPI_ThruSections_addVertex(BRepOffsetAPI_ThruSections* thruSections, TopoDS_Vertex* vertex); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // HS_BREPOFFSETAPI_THRUSECTIONS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <ShapeExtend_WireData.hxx> | ||
#include "hs_ShapeExtend_WireData.h" | ||
|
||
#include <TopoDS_Wire.hxx> | ||
|
||
ShapeExtend_WireData * hs_new_ShapeExtend_WireData_fromWireChainedAndManifold(TopoDS_Wire* wire, bool chained, bool manifoldMode){ | ||
return new ShapeExtend_WireData(*wire, chained, manifoldMode); | ||
} | ||
|
||
void hs_delete_ShapeExtend_WireData(ShapeExtend_WireData * wireData){ | ||
delete wireData; | ||
} | ||
|
||
void hs_ShapeExtend_WireData_reverse(ShapeExtend_WireData * wireData){ | ||
wireData->Reverse(); | ||
} | ||
|
||
TopoDS_Wire * hs_ShapeExtend_WireData_wire(ShapeExtend_WireData * wireData){ | ||
return new TopoDS_Wire(wireData->Wire()); | ||
} | ||
|
||
|
||
TopoDS_Wire * hs_ShapeExtend_WireData_wireAPIMake(ShapeExtend_WireData * wireData){ | ||
return new TopoDS_Wire(wireData->WireAPIMake()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef HS_SHAPEEXTEND_WIREDATA_H | ||
#define HS_SHAPEEXTEND_WIREDATA_H | ||
|
||
#include "hs_types.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
ShapeExtend_WireData * hs_new_ShapeExtend_WireData_fromWireChainedAndManifold(TopoDS_Wire* wire, bool chained, bool manifoldMode); | ||
|
||
void hs_delete_ShapeExtend_WireData(ShapeExtend_WireData * wireData); | ||
|
||
void hs_ShapeExtend_WireData_reverse(ShapeExtend_WireData * wireData); | ||
|
||
TopoDS_Wire * hs_ShapeExtend_WireData_wire(ShapeExtend_WireData * wireData); | ||
|
||
TopoDS_Wire * hs_ShapeExtend_WireData_wireAPIMake(ShapeExtend_WireData * wireData); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // HS_SHAPEEXTEND_WIREDATA_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
opencascade-hs/src/OpenCascade/BRepBuilderAPI/MakeVertex.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{-# LANGUAGE CApiFFI #-} | ||
module OpenCascade.BRepBuilderAPI.MakeVertex | ||
( MakeVertex | ||
, fromPnt | ||
, vertex | ||
) where | ||
|
||
import OpenCascade.BRepBuilderAPI.Types (MakeVertex) | ||
import OpenCascade.BRepBuilderAPI.Internal.Destructors (deleteMakeVertex) | ||
import qualified OpenCascade.GP as GP | ||
import qualified OpenCascade.TopoDS as TopoDS | ||
import qualified OpenCascade.TopoDS.Internal.Destructors as TopoDS.Destructors | ||
import Foreign.Ptr (Ptr) | ||
import Data.Acquire (Acquire, mkAcquire) | ||
import OpenCascade.Inheritance (upcast) | ||
|
||
foreign import capi unsafe "hs_BRepBuilderAPI_MakeVertex.h hs_new_BRepBuilderAPI_MakeVertex_fromPnt" rawFromPnt :: Ptr GP.Pnt -> IO (Ptr MakeVertex) | ||
|
||
fromPnt :: Ptr GP.Pnt -> Acquire (Ptr MakeVertex) | ||
fromPnt pnt = mkAcquire (rawFromPnt pnt) (deleteMakeVertex) | ||
|
||
|
||
foreign import capi unsafe "hs_BRepBuilderAPI_MakeVertex.h hs_BRepBuilderAPI_MakeVertex_vertex" rawVertex :: Ptr MakeVertex -> IO (Ptr TopoDS.Vertex) | ||
|
||
vertex :: Ptr MakeVertex -> Acquire (Ptr TopoDS.Vertex) | ||
vertex builder = mkAcquire (rawVertex builder) (TopoDS.Destructors.deleteShape . upcast) |
Oops, something went wrong.